39#include "../../TaskSystem/TaskGraphTypes.h"
ComponentTypeID GetComponentTypeID_Static()
Modal dialog for adding, removing, and reordering switch cases on a node.
std::string m_currentVarValue
Current value for context display.
std::vector< SwitchCaseDefinition > m_editingCases
Working copy of switch cases being edited.
void RenderCaseList()
Renders the scrollable list of case rows.
SwitchCaseEditorModal & operator=(const SwitchCaseEditorModal &)=delete
bool m_confirmed
True if the user clicked "Apply" (set to false on Close)
std::vector< std::string > m_caseLabelBuffers
One per case, synced before render.
const std::vector< SwitchCaseDefinition > & GetSwitchCases() const
Returns the edited switch cases (only valid after IsConfirmed() == true).
SwitchCaseEditorModal()
Constructs the modal.
SwitchCaseEditorModal(const SwitchCaseEditorModal &)=delete
std::vector< std::string > m_caseValueBuffers
Temporary edit buffers for value and label fields.
std::string m_switchVarName
Variable being switched (e.g. "mHealth")
bool IsOpen() const
Returns true if the modal is currently open.
void RenderActionButtons()
Renders the "Add Case" and action buttons (Apply / Cancel).
bool m_hasValidationError
Set to true if any case has errors (prevents Apply)
std::string m_switchVarType
Variable type (e.g. "Int", "String")
~SwitchCaseEditorModal()=default
void Open(const std::vector< SwitchCaseDefinition > ¤tCases, const std::string &switchVarName="", const std::string &switchVarType="", const std::string ¤tVarValue="")
Opens the modal, loading the given switch cases for editing.
void Close()
Closes the modal without confirming changes.
void Render()
Renders the modal dialog.
bool IsConfirmed() const
Returns true if the modal was closed via "Apply" rather than "Cancel".
bool m_isOpen
True if the modal is currently open.
bool RenderCaseRow(size_t caseIndex)
Renders a single case row with all controls.
< Provides AssetID and INVALID_ASSET_ID