class GUIToggleGroup

Inherits: IScriptExportable

Object that allows you to group multiple GUI toggle buttons.

Only one button among the grouped ones can be active.

Public

Methods

~GUIToggleGroup

~GUIToggleGroup() noexcept

staticCreate

static SPtr<GUIToggleGroup> Create(bool allowAllOff = false)

Creates a toggle group that you may provide to GUIToggleable upon construction.

Toggles sharing the same group will only have a single element active at a time.

allowAllOff
If true all of the toggle buttons can be turned off, if false one will always be turned on.

Internal

Methods

AddInternal

void AddInternal(GUIToggleable *toggle)

Registers a new toggle button with the group.

RemoveInternal

void RemoveInternal(GUIToggleable *toggle)

Unregisters a toggle button from the group.

Private

Constructors

GUIToggleGroup

GUIToggleGroup(bool allowAllOff)

Methods

Initialize

void Initialize(const SPtr<GUIToggleGroup> &sharedPtr)

Initializes the toggle group.

To be called right after construction.

Fields

mButtons

Vector<GUIToggleable *> mButtons

mAllowAllOff

bool mAllowAllOff

mThis

std::weak_ptr<GUIToggleGroup> mThis