SpaghettiKart
Loading...
Searching...
No Matches
UIWidgets Namespace Reference

Namespaces

namespace  Sizes
 

Data Structures

struct  ButtonOptions
 
struct  CheckboxOptions
 
struct  ComboboxOptions
 
struct  FloatSliderOptions
 
struct  IntSliderOptions
 
struct  TextFilters
 
struct  WidgetOptions
 

Typedefs

using SectionFunc = void(*)()
 

Enumerations

enum  Colors {
  Red , DarkRed , Orange , Green ,
  DarkGreen , LightBlue , Blue , DarkBlue ,
  Indigo , Violet , Purple , Brown ,
  Gray , DarkGray , Pink , Yellow ,
  Cyan , Black , LightGray , White ,
  NoColor
}
 
enum  LabelPosition {
  Near , Far , Above , None ,
  Within
}
 
enum  ComponentAlignment { Left , Right }
 
enum  MenuExtent { Condensed , Stretched }
 

Functions

std::string WrappedText (const char *text, unsigned int charactersPerLine)
 
std::string WrappedText (const std::string &text, unsigned int charactersPerLine)
 
void Tooltip (const char *text)
 
void PushStyleMenu (const ImVec4 &color)
 
void PushStyleMenu (Colors color)
 
void PopStyleMenu ()
 
bool BeginMenu (const char *label, Colors color)
 
void PushStyleMenuItem (const ImVec4 &color)
 
void PushStyleMenuItem (Colors color)
 
void PopStyleMenuItem ()
 
bool MenuItem (const char *label, const char *shortcut, Colors color)
 
void PushStyleButton (const ImVec4 &color)
 
void PushStyleButton (Colors color)
 
void PopStyleButton ()
 
bool Button (const char *label, const ButtonOptions &options)
 
bool WindowButton (const char *label, const char *cvarName, std::shared_ptr< Ship::GuiWindow > windowPtr, const ButtonOptions &options)
 
void PushStyleCheckbox (const ImVec4 &color)
 
void PushStyleCheckbox (Colors color)
 
void PopStyleCheckbox ()
 
void RenderText (ImVec2 pos, const char *text, const char *text_end, bool hide_text_after_hash)
 
bool Checkbox (const char *_label, bool *value, const CheckboxOptions &options)
 
bool CVarCheckbox (const char *label, const char *cvarName, const CheckboxOptions &options)
 
void PushStyleCombobox (const ImVec4 &color)
 
void PushStyleCombobox (Colors color)
 
void PopStyleCombobox ()
 
void PushStyleSlider (Colors color_)
 
void PopStyleSlider ()
 
bool SliderInt (const char *label, int32_t *value, const IntSliderOptions &options)
 
bool CVarSliderInt (const char *label, const char *cvarName, const IntSliderOptions &options)
 
void ClampFloat (float *value, float min, float max, float step)
 
bool SliderFloat (const char *label, float *value, const FloatSliderOptions &options)
 
bool CVarSliderFloat (const char *label, const char *cvarName, const FloatSliderOptions &options)
 
bool CVarColorPicker (const char *label, const char *cvarName, Color_RGBA8 defaultColor)
 
void DrawFlagArray32 (const std::string &name, uint32_t &flags)
 
void DrawFlagArray16 (const std::string &name, uint16_t &flags)
 
void DrawFlagArray8 (const std::string &name, uint8_t &flags)
 
void DrawFlagArray8Mask (const std::string &name, uint8_t &flags)
 
template<typename T>
bool Combobox (const char *label, T *value, const std::unordered_map< T, const char * > &comboMap, const ComboboxOptions &options={})
 
template<typename T = size_t>
bool Combobox (const char *label, T *value, const std::vector< const char * > &comboVector, const ComboboxOptions &options={})
 
template<typename T = size_t, size_t N>
bool Combobox (const char *label, T *value, const char *(&comboArray)[N], const ComboboxOptions &options={})
 
template<typename T = int32_t>
bool CVarCombobox (const char *label, const char *cvarName, const std::unordered_map< T, const char * > &comboMap, const ComboboxOptions &options={})
 
template<typename T = int32_t>
bool CVarCombobox (const char *label, const char *cvarName, const std::vector< const char * > &comboVector, const ComboboxOptions &options={})
 
template<typename T = int32_t, size_t N>
bool CVarCombobox (const char *label, const char *cvarName, const char *(&comboArray)[N], const ComboboxOptions &options={})
 

Variables

const std::unordered_map< Colors, ImVec4 > ColorValues
 

Typedef Documentation

◆ SectionFunc

using UIWidgets::SectionFunc = void(*)()

Enumeration Type Documentation

◆ Colors

Enumerator
Red 
DarkRed 
Orange 
Green 
DarkGreen 
LightBlue 
Blue 
DarkBlue 
Indigo 
Violet 
Purple 
Brown 
Gray 
DarkGray 
Pink 
Yellow 
Cyan 
Black 
LightGray 
White 
NoColor 

◆ ComponentAlignment

Enumerator
Left 
Right 

◆ LabelPosition

Enumerator
Near 
Far 
Above 
None 
Within 

◆ MenuExtent

Enumerator
Condensed 
Stretched 

Function Documentation

◆ BeginMenu()

bool UIWidgets::BeginMenu ( const char * label,
Colors color )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Button()

bool UIWidgets::Button ( const char * label,
const ButtonOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Checkbox()

bool UIWidgets::Checkbox ( const char * _label,
bool * value,
const CheckboxOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClampFloat()

void UIWidgets::ClampFloat ( float * value,
float min,
float max,
float step )
Here is the caller graph for this function:

◆ Combobox() [1/3]

template<typename T = size_t, size_t N>
bool UIWidgets::Combobox ( const char * label,
T * value,
const char *(&) comboArray[N],
const ComboboxOptions & options = {} )

◆ Combobox() [2/3]

template<typename T>
bool UIWidgets::Combobox ( const char * label,
T * value,
const std::unordered_map< T, const char * > & comboMap,
const ComboboxOptions & options = {} )
Here is the caller graph for this function:

◆ Combobox() [3/3]

template<typename T = size_t>
bool UIWidgets::Combobox ( const char * label,
T * value,
const std::vector< const char * > & comboVector,
const ComboboxOptions & options = {} )

◆ CVarCheckbox()

bool UIWidgets::CVarCheckbox ( const char * label,
const char * cvarName,
const CheckboxOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CVarColorPicker()

bool UIWidgets::CVarColorPicker ( const char * label,
const char * cvarName,
Color_RGBA8 defaultColor )
Here is the call graph for this function:

◆ CVarCombobox() [1/3]

template<typename T = int32_t, size_t N>
bool UIWidgets::CVarCombobox ( const char * label,
const char * cvarName,
const char *(&) comboArray[N],
const ComboboxOptions & options = {} )

◆ CVarCombobox() [2/3]

template<typename T = int32_t>
bool UIWidgets::CVarCombobox ( const char * label,
const char * cvarName,
const std::unordered_map< T, const char * > & comboMap,
const ComboboxOptions & options = {} )
Here is the caller graph for this function:

◆ CVarCombobox() [3/3]

template<typename T = int32_t>
bool UIWidgets::CVarCombobox ( const char * label,
const char * cvarName,
const std::vector< const char * > & comboVector,
const ComboboxOptions & options = {} )

◆ CVarSliderFloat()

bool UIWidgets::CVarSliderFloat ( const char * label,
const char * cvarName,
const FloatSliderOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CVarSliderInt()

bool UIWidgets::CVarSliderInt ( const char * label,
const char * cvarName,
const IntSliderOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawFlagArray16()

void UIWidgets::DrawFlagArray16 ( const std::string & name,
uint16_t & flags )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawFlagArray32()

void UIWidgets::DrawFlagArray32 ( const std::string & name,
uint32_t & flags )
Here is the call graph for this function:

◆ DrawFlagArray8()

void UIWidgets::DrawFlagArray8 ( const std::string & name,
uint8_t & flags )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawFlagArray8Mask()

void UIWidgets::DrawFlagArray8Mask ( const std::string & name,
uint8_t & flags )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MenuItem()

bool UIWidgets::MenuItem ( const char * label,
const char * shortcut,
Colors color )
Here is the call graph for this function:

◆ PopStyleButton()

void UIWidgets::PopStyleButton ( )
Here is the caller graph for this function:

◆ PopStyleCheckbox()

void UIWidgets::PopStyleCheckbox ( )
Here is the caller graph for this function:

◆ PopStyleCombobox()

void UIWidgets::PopStyleCombobox ( )
Here is the caller graph for this function:

◆ PopStyleMenu()

void UIWidgets::PopStyleMenu ( )
Here is the caller graph for this function:

◆ PopStyleMenuItem()

void UIWidgets::PopStyleMenuItem ( )
Here is the caller graph for this function:

◆ PopStyleSlider()

void UIWidgets::PopStyleSlider ( )
Here is the caller graph for this function:

◆ PushStyleButton() [1/2]

void UIWidgets::PushStyleButton ( Colors color)
Here is the call graph for this function:

◆ PushStyleButton() [2/2]

void UIWidgets::PushStyleButton ( const ImVec4 & color)
Here is the caller graph for this function:

◆ PushStyleCheckbox() [1/2]

void UIWidgets::PushStyleCheckbox ( Colors color)
Here is the call graph for this function:

◆ PushStyleCheckbox() [2/2]

void UIWidgets::PushStyleCheckbox ( const ImVec4 & color)
Here is the caller graph for this function:

◆ PushStyleCombobox() [1/2]

void UIWidgets::PushStyleCombobox ( Colors color)
Here is the call graph for this function:

◆ PushStyleCombobox() [2/2]

void UIWidgets::PushStyleCombobox ( const ImVec4 & color)
Here is the caller graph for this function:

◆ PushStyleMenu() [1/2]

void UIWidgets::PushStyleMenu ( Colors color)
Here is the call graph for this function:

◆ PushStyleMenu() [2/2]

void UIWidgets::PushStyleMenu ( const ImVec4 & color)
Here is the caller graph for this function:

◆ PushStyleMenuItem() [1/2]

void UIWidgets::PushStyleMenuItem ( Colors color)
Here is the call graph for this function:

◆ PushStyleMenuItem() [2/2]

void UIWidgets::PushStyleMenuItem ( const ImVec4 & color)
Here is the caller graph for this function:

◆ PushStyleSlider()

void UIWidgets::PushStyleSlider ( Colors color_)
Here is the caller graph for this function:

◆ RenderText()

void UIWidgets::RenderText ( ImVec2 pos,
const char * text,
const char * text_end,
bool hide_text_after_hash )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SliderFloat()

bool UIWidgets::SliderFloat ( const char * label,
float * value,
const FloatSliderOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SliderInt()

bool UIWidgets::SliderInt ( const char * label,
int32_t * value,
const IntSliderOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Tooltip()

void UIWidgets::Tooltip ( const char * text)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WindowButton()

bool UIWidgets::WindowButton ( const char * label,
const char * cvarName,
std::shared_ptr< Ship::GuiWindow > windowPtr,
const ButtonOptions & options )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WrappedText() [1/2]

std::string UIWidgets::WrappedText ( const char * text,
unsigned int charactersPerLine )
Here is the caller graph for this function:

◆ WrappedText() [2/2]

std::string UIWidgets::WrappedText ( const std::string & text,
unsigned int charactersPerLine )
Here is the call graph for this function:

Variable Documentation

◆ ColorValues

const std::unordered_map<Colors, ImVec4> UIWidgets::ColorValues
Initial value:
= {
{ Colors::Pink, ImVec4(0.87f, 0.3f, 0.87f, 1.0f) },
{ Colors::Red, ImVec4(0.55f, 0.0f, 0.0f, 1.0f) },
{ Colors::DarkRed, ImVec4(0.3f, 0.0f, 0.0f, 1.0f) },
{ Colors::Orange, ImVec4(0.85f, 0.55f, 0.0f, 1.0f) },
{ Colors::Yellow, ImVec4(0.95f, 0.95f, 0.0f, 1.0f) },
{ Colors::Green, ImVec4(0.0f, 0.55f, 0.0f, 1.0f) },
{ Colors::DarkGreen, ImVec4(0.0f, 0.3f, 0.0f, 1.0f) },
{ Colors::Cyan, ImVec4(0.0f, 0.9f, 0.9f, 1.0f) },
{ Colors::LightBlue, ImVec4(0.0f, 0.24f, 0.8f, 1.0f) },
{ Colors::Blue, ImVec4(0.08f, 0.03f, 0.65f, 1.0f) },
{ Colors::DarkBlue, ImVec4(0.03f, 0.0f, 0.5f, 1.0f) },
{ Colors::Indigo, ImVec4(0.35f, 0.0f, 0.87f, 1.0f) },
{ Colors::Violet, ImVec4(0.5f, 0.0f, 0.9f, 1.0f) },
{ Colors::Purple, ImVec4(0.31f, 0.0f, 0.67f, 1.0f) },
{ Colors::Brown, ImVec4(0.37f, 0.18f, 0.0f, 1.0f) },
{ Colors::LightGray, ImVec4(0.75f, 0.75f, 0.75f, 1.0f) },
{ Colors::Gray, ImVec4(0.45f, 0.45f, 0.45f, 1.0f) },
{ Colors::DarkGray, ImVec4(0.15f, 0.15f, 0.15f, 1.0f) },
{ Colors::Black, ImVec4(0.0f, 0.0f, 0.0f, 1.0f)},
{ Colors::White, ImVec4(1.0f, 1.0f, 1.0f, 1.0f) },
{ Colors::NoColor, ImVec4(0.0f, 0.0f, 0.0f, 0.0f)},
}
@ Blue
Definition UIWidgets.h:47
@ Red
Definition UIWidgets.h:41
@ DarkRed
Definition UIWidgets.h:42
@ Purple
Definition UIWidgets.h:51
@ DarkGray
Definition UIWidgets.h:54
@ Violet
Definition UIWidgets.h:50
@ LightGray
Definition UIWidgets.h:60
@ Brown
Definition UIWidgets.h:52
@ Green
Definition UIWidgets.h:44
@ Gray
Definition UIWidgets.h:53
@ DarkBlue
Definition UIWidgets.h:48
@ White
Definition UIWidgets.h:61
@ Indigo
Definition UIWidgets.h:49
@ NoColor
Definition UIWidgets.h:62
@ Pink
Definition UIWidgets.h:56
@ Cyan
Definition UIWidgets.h:58
@ Orange
Definition UIWidgets.h:43
@ Yellow
Definition UIWidgets.h:57
@ DarkGreen
Definition UIWidgets.h:45
@ Black
Definition UIWidgets.h:59
@ LightBlue
Definition UIWidgets.h:46