93 void OnInit(
const nlohmann::json& initArgs = nlohmann::json::object())
override;
A named Part with a parent/child hierarchy and optional thread safety.
Definition Component.h:34
Abstract base class for all visible GUI elements (windows, menu bars, overlays).
Definition GuiElement.h:34
bool IsVisible()
Returns true if the element is currently visible.
void OnInit(const nlohmann::json &initArgs=nlohmann::json::object()) override
Component initialization hook.
bool mIsVisible
Current visibility state. Subclasses may read this directly.
Definition GuiElement.h:108
GuiElement(const std::string &name)
Constructs a GuiElement that starts hidden.
virtual void DrawElement()=0
Renders the element's content (pure ImGui draw calls).
GuiElement(const std::string &name, bool isVisible)
Constructs a GuiElement with an explicit initial visibility.
virtual void UpdateElement()=0
Per-frame logic update called by Update(). Subclasses perform state updates here.
void Hide()
Hides the element (equivalent to SetVisibility(false)).
void Update()
Updates element state for the current frame (called before Draw).
virtual void Draw()=0
Renders the element for the current frame.
void ToggleVisibility()
Flips the visibility state between shown and hidden.
void Show()
Makes the element visible (equivalent to SetVisibility(true)).
virtual void SetVisibility(bool visible)
Changes the visibility flag and optionally persists it to a CVar.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14