|
| MRVIEWER_API bool | createButton (std::string_view name) |
| |
template<AllowedValueType T>
requires std::is_arithmetic_v<T> |
| std::optional< T > | createValue (std::string_view name, T value, T min, T max, bool consumeValueOverride=true) |
| |
| MRVIEWER_API std::optional< std::string > | createValue (std::string_view name, std::string value, bool consumeValueOverride=true, std::optional< std::vector< std::string > > allowedValues=std::nullopt) |
| | This overload is for strings.
|
| |
| template<AllowedValueType T> |
| std::optional< T > | createValueTentative (std::string_view name, bool consumeValueOverride=true) |
| |
| MRVIEWER_API void | pushTree (std::string_view name) |
| | Use those to group buttons into named groups.
|
| |
| MRVIEWER_API void | popTree () |
| |
| MRVIEWER_API const GroupEntry & | getRootEntry () |
| | Returns the current entry tree.
|
| |
This is a low-level header for implementing GUIs that can be interacted with programmatically. Most likely you don't need to touch this, just use widgets from MRUIStyle.h.
template<AllowedValueType T>
| std::optional< T > MR::UI::TestEngine::createValueTentative |
( |
std::string_view | name, |
|
|
bool | consumeValueOverride = true ) |
|
nodiscard |
Usually you don't need this function. This is for widgets that require you to specify the value override before drawing it, such as ImGui::CollapsingHeader(). For those, call this version first to read the value override, then draw the widget, then call the normal CreateValue() with the same name and with the new value, and discard its return value.