PropertyRows.h file
Namespaces
- namespace Jazz2
- Root namespace of Jazz² Resurrection.
- namespace Jazz2::UI
- User interface and menus.
- namespace Jazz2::UI::Windows
- Toolkit of windows, panels and controls, compiled only if
WITH_UI_WINDOWS. - namespace Jazz2::Editor
Classes
- struct Jazz2::Editor::PropertyChoice
- A value of a dropdown of fixed choices and the text it's shown with, see AddChoiceDropdown().
Functions
-
auto AddChoiceDropdown(Element* row,
ArrayView<const PropertyChoice> choices,
Function<std::
int32_t()>&& getter, Function<void(std:: int32_t)>&& setter, Function<String(std:: int32_t)>&& otherLabel = {}, Function<bool(std:: int32_t)>&& isEnabled = {}) -> Dropdown* - Adds a dropdown of fixed choices bound to a value to a row of a form.
-
auto AddByteBox(Element* row,
Function<std::
uint8_t()>&& getter, Function<void(std:: uint8_t, bool)>&& setter) -> NumberBox* - Adds a number box of a byte bound to a value to a row of a form.
- void ShowRowWhen(Stack* row, Function<bool()>&& isVisible)
- Shows a row of a form only while it applies.
Function documentation
Dropdown* AddChoiceDropdown(Element* row,
ArrayView<const PropertyChoice> choices,
Function<std:: int32_t()>&& getter,
Function<void(std:: int32_t)>&& setter,
Function<String(std:: int32_t)>&& otherLabel = {},
Function<bool(std:: int32_t)>&& isEnabled = {})
Adds a dropdown of fixed choices bound to a value to a row of a form.
It shows the label of the choice the value is, a value that is none of them is shown by otherLabel, or as nothing without it. A choice is checked in the menu while the value is it, isEnabled can leave some of them disabled. choices have to stay as long as the dropdown, a static table of them does.
NumberBox* AddByteBox(Element* row,
Function<std:: uint8_t()>&& getter,
Function<void(std:: uint8_t, bool)>&& setter)
Adds a number box of a byte bound to a value to a row of a form.
The value typed or dragged is rounded and kept from 0 to 255, setter gets whether it's final or only shown while it's dragged, as UI::
void ShowRowWhen(Stack* row, Function<bool()>&& isVisible)
Shows a row of a form only while it applies.
The label of a row of a UI::