Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Info]
Version = 1-0-0
2 changes: 2 additions & 0 deletions src/Feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "Features/InverseSquareLighting.h"
#include "Features/LODBlending.h"
#include "Features/LightLimitFix.h"
#include "Features/PerformanceOverlay.h"
#include "Features/ScreenSpaceGI.h"
#include "Features/ScreenSpaceShadows.h"
#include "Features/SkySync.h"
Expand Down Expand Up @@ -206,6 +207,7 @@ const std::vector<Feature*>& Feature::GetFeatureList()
globals::features::cloudShadows,
globals::features::waterEffects,
globals::features::weatherPicker,
globals::features::performanceOverlay,
globals::features::subsurfaceScattering,
globals::features::terrainShadows,
globals::features::screenSpaceGI,
Expand Down
36 changes: 36 additions & 0 deletions src/Features/OverlayFeature.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#pragma once

#include "Feature.h"

/**
* @brief Abstract base class for all features that provide an in-game overlay.
*
* Inherit from OverlayFeature if your feature draws an ImGui overlay that can be toggled
* globally and/or individually. This interface allows the menu system to manage overlays
* in a generic way.
*/
struct OverlayFeature : Feature
{
/**
* @brief Draw the overlay for this feature.
*
* This method should render the overlay UI using ImGui. It will only be called if
* IsOverlayVisible() returns true and the global overlay toggle is enabled.
*/
virtual void DrawOverlay() = 0;

/**
* @brief Whether this overlay should be visible when the global overlay is enabled.
*
* Typically, this should return the value of a per-feature setting (e.g., ShowInOverlay).
* If false, the overlay will not be drawn even if the global overlay is enabled.
*/
virtual bool IsOverlayVisible() const = 0;

/**
* @brief Get the category for UI grouping. Overlays default to "Debug".
*
* Subclasses may override this to provide a different category.
*/
virtual std::string_view GetCategory() const override { return "Debug"; }
};
Loading