Overload  1.1
Game engine with editor
Static Public Member Functions | Static Public Attributes | List of all members
OvCore::Helpers::GUIDrawer Class Reference

#include <GUIDrawer.h>

Static Public Member Functions

static void ProvideEmptyTexture (OvRendering::Resources::Texture &p_emptyTexture)
 
static void CreateTitle (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name)
 
template<typename T >
static void DrawScalar (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, T &p_data, float p_step=1.f, T p_min=std::numeric_limits< T >::min(), T p_max=std::numeric_limits< T >::max())
 
static void DrawBoolean (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, bool &p_data)
 
static void DrawVec2 (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvMaths::FVector2 &p_data, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawVec3 (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvMaths::FVector3 &p_data, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawVec4 (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvMaths::FVector4 &p_data, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawQuat (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvMaths::FQuaternion &p_data, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawString (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::string &p_data)
 
static void DrawColor (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvUI::Types::Color &p_color, bool p_hasAlpha=false)
 
static OvUI::Widgets::Texts::TextDrawMesh (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvRendering::Resources::Model *&p_data, OvTools::Eventing::Event<> *p_updateNotifier=nullptr)
 
static OvUI::Widgets::Visual::ImageDrawTexture (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvRendering::Resources::Texture *&p_data, OvTools::Eventing::Event<> *p_updateNotifier=nullptr)
 
static OvUI::Widgets::Texts::TextDrawShader (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvRendering::Resources::Shader *&p_data, OvTools::Eventing::Event<> *p_updateNotifier=nullptr)
 
static OvUI::Widgets::Texts::TextDrawMaterial (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvCore::Resources::Material *&p_data, OvTools::Eventing::Event<> *p_updateNotifier=nullptr)
 
static OvUI::Widgets::Texts::TextDrawSound (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, OvAudio::Resources::Sound *&p_data, OvTools::Eventing::Event<> *p_updateNotifier=nullptr)
 
template<typename T >
static void DrawScalar (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< T(void)> p_gatherer, std::function< void(T)> p_provider, float p_step=1.f, T p_min=std::numeric_limits< T >::min(), T p_max=std::numeric_limits< T >::max())
 
static void DrawBoolean (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< bool(void)> p_gatherer, std::function< void(bool)> p_provider)
 
static void DrawVec2 (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< OvMaths::FVector2(void)> p_gatherer, std::function< void(OvMaths::FVector2)> p_provider, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawVec3 (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< OvMaths::FVector3(void)> p_gatherer, std::function< void(OvMaths::FVector3)> p_provider, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawVec4 (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< OvMaths::FVector4(void)> p_gatherer, std::function< void(OvMaths::FVector4)> p_provider, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawQuat (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< OvMaths::FQuaternion(void)> p_gatherer, std::function< void(OvMaths::FQuaternion)> p_provider, float p_step=1.f, float p_min=_MIN_FLOAT, float p_max=_MAX_FLOAT)
 
static void DrawDDString (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< std::string(void)> p_gatherer, std::function< void(std::string)> p_provider, const std::string &p_identifier)
 
static void DrawString (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< std::string(void)> p_gatherer, std::function< void(std::string)> p_provider)
 
static void DrawColor (OvUI::Internal::WidgetContainer &p_root, const std::string &p_name, std::function< OvUI::Types::Color(void)> p_gatherer, std::function< void(OvUI::Types::Color)> p_provider, bool p_hasAlpha=false)
 
template<typename T >
static ImGuiDataType_ GetDataType ()
 
template<typename T >
static std::string GetFormat ()
 

Static Public Attributes

static const OvUI::Types::Color TitleColor = { 0.85f, 0.65f, 0.0f }
 
static const OvUI::Types::Color ClearButtonColor = { 0.5f, 0.0f, 0.0f }
 
static const float _MIN_FLOAT = -999999999.f
 
static const float _MAX_FLOAT = +999999999.f
 

Detailed Description

Provide some helpers to draw UI elements

Member Function Documentation

◆ CreateTitle()

void OvCore::Helpers::GUIDrawer::CreateTitle ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name 
)
static

Draw a title with the title color

Parameters
p_root
p_name

◆ DrawBoolean() [1/2]

void OvCore::Helpers::GUIDrawer::DrawBoolean ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
bool &  p_data 
)
static

◆ DrawBoolean() [2/2]

void OvCore::Helpers::GUIDrawer::DrawBoolean ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< bool(void)>  p_gatherer,
std::function< void(bool)>  p_provider 
)
static

◆ DrawColor() [1/2]

void OvCore::Helpers::GUIDrawer::DrawColor ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvUI::Types::Color p_color,
bool  p_hasAlpha = false 
)
static

◆ DrawColor() [2/2]

void OvCore::Helpers::GUIDrawer::DrawColor ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< OvUI::Types::Color(void)>  p_gatherer,
std::function< void(OvUI::Types::Color)>  p_provider,
bool  p_hasAlpha = false 
)
static

◆ DrawDDString()

void OvCore::Helpers::GUIDrawer::DrawDDString ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< std::string(void)>  p_gatherer,
std::function< void(std::string)>  p_provider,
const std::string &  p_identifier 
)
static

◆ DrawMaterial()

OvUI::Widgets::Texts::Text & OvCore::Helpers::GUIDrawer::DrawMaterial ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvCore::Resources::Material *&  p_data,
OvTools::Eventing::Event<> *  p_updateNotifier = nullptr 
)
static

◆ DrawMesh()

OvUI::Widgets::Texts::Text & OvCore::Helpers::GUIDrawer::DrawMesh ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvRendering::Resources::Model *&  p_data,
OvTools::Eventing::Event<> *  p_updateNotifier = nullptr 
)
static

◆ DrawQuat() [1/2]

void OvCore::Helpers::GUIDrawer::DrawQuat ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvMaths::FQuaternion p_data,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawQuat() [2/2]

void OvCore::Helpers::GUIDrawer::DrawQuat ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< OvMaths::FQuaternion(void)>  p_gatherer,
std::function< void(OvMaths::FQuaternion)>  p_provider,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawScalar() [1/2]

template<typename T >
void OvCore::Helpers::GUIDrawer::DrawScalar ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< T(void)>  p_gatherer,
std::function< void(T)>  p_provider,
float  p_step = 1.f,
p_min = std::numeric_limits<T>::min(),
p_max = std::numeric_limits<T>::max() 
)
inlinestatic

◆ DrawScalar() [2/2]

template<typename T >
void OvCore::Helpers::GUIDrawer::DrawScalar ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
T &  p_data,
float  p_step = 1.f,
p_min = std::numeric_limits<T>::min(),
p_max = std::numeric_limits<T>::max() 
)
inlinestatic

◆ DrawShader()

OvUI::Widgets::Texts::Text & OvCore::Helpers::GUIDrawer::DrawShader ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvRendering::Resources::Shader *&  p_data,
OvTools::Eventing::Event<> *  p_updateNotifier = nullptr 
)
static

◆ DrawSound()

OvUI::Widgets::Texts::Text & OvCore::Helpers::GUIDrawer::DrawSound ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvAudio::Resources::Sound *&  p_data,
OvTools::Eventing::Event<> *  p_updateNotifier = nullptr 
)
static

◆ DrawString() [1/2]

void OvCore::Helpers::GUIDrawer::DrawString ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< std::string(void)>  p_gatherer,
std::function< void(std::string)>  p_provider 
)
static

◆ DrawString() [2/2]

void OvCore::Helpers::GUIDrawer::DrawString ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::string &  p_data 
)
static

◆ DrawTexture()

OvUI::Widgets::Visual::Image & OvCore::Helpers::GUIDrawer::DrawTexture ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvRendering::Resources::Texture *&  p_data,
OvTools::Eventing::Event<> *  p_updateNotifier = nullptr 
)
static

◆ DrawVec2() [1/2]

void OvCore::Helpers::GUIDrawer::DrawVec2 ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvMaths::FVector2 p_data,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawVec2() [2/2]

void OvCore::Helpers::GUIDrawer::DrawVec2 ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< OvMaths::FVector2(void)>  p_gatherer,
std::function< void(OvMaths::FVector2)>  p_provider,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawVec3() [1/2]

void OvCore::Helpers::GUIDrawer::DrawVec3 ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvMaths::FVector3 p_data,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawVec3() [2/2]

void OvCore::Helpers::GUIDrawer::DrawVec3 ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< OvMaths::FVector3(void)>  p_gatherer,
std::function< void(OvMaths::FVector3)>  p_provider,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawVec4() [1/2]

void OvCore::Helpers::GUIDrawer::DrawVec4 ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
OvMaths::FVector4 p_data,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ DrawVec4() [2/2]

void OvCore::Helpers::GUIDrawer::DrawVec4 ( OvUI::Internal::WidgetContainer p_root,
const std::string &  p_name,
std::function< OvMaths::FVector4(void)>  p_gatherer,
std::function< void(OvMaths::FVector4)>  p_provider,
float  p_step = 1.f,
float  p_min = _MIN_FLOAT,
float  p_max = _MAX_FLOAT 
)
static

◆ GetDataType()

template<typename T >
ImGuiDataType_ OvCore::Helpers::GUIDrawer::GetDataType ( )
inlinestatic

◆ GetFormat()

template<typename T >
std::string OvCore::Helpers::GUIDrawer::GetFormat ( )
inlinestatic

◆ ProvideEmptyTexture()

void OvCore::Helpers::GUIDrawer::ProvideEmptyTexture ( OvRendering::Resources::Texture p_emptyTexture)
static

Defines the texture to use when there is no texture in a texture resource field

Parameters
p_emptyTexture

Member Data Documentation

◆ _MAX_FLOAT

const float OvCore::Helpers::GUIDrawer::_MAX_FLOAT = +999999999.f
static

◆ _MIN_FLOAT

const float OvCore::Helpers::GUIDrawer::_MIN_FLOAT = -999999999.f
static

◆ ClearButtonColor

const OvUI::Types::Color OvCore::Helpers::GUIDrawer::ClearButtonColor = { 0.5f, 0.0f, 0.0f }
static

◆ TitleColor

const OvUI::Types::Color OvCore::Helpers::GUIDrawer::TitleColor = { 0.85f, 0.65f, 0.0f }
static

@project: Overload

Author
: Overload Tech. @restrictions: This software may not be resold, redistributed or otherwise conveyed to a third party.

The documentation for this class was generated from the following files: