Overload  1.1
Game engine with editor
Public Member Functions | List of all members
OvUI::Core::UIManager Class Reference

#include <UIManager.h>

Public Member Functions

 UIManager (GLFWwindow *p_glfwWindow, Styling::EStyle p_style=Styling::EStyle::IM_DARK_STYLE, const std::string &p_glslVersion="#version 150")
 
 ~UIManager ()
 
void ApplyStyle (Styling::EStyle p_style)
 
bool LoadFont (const std::string &p_id, const std::string &p_path, float p_fontSize)
 
bool UnloadFont (const std::string &p_id)
 
bool UseFont (const std::string &p_id)
 
void UseDefaultFont ()
 
void EnableEditorLayoutSave (bool p_value)
 
bool IsEditorLayoutSaveEnabled () const
 
void SetEditorLayoutSaveFilename (const std::string &p_filename)
 
void SetEditorLayoutAutosaveFrequency (float p_frequency)
 
float GetEditorLayoutAutosaveFrequency (float p_frequeny)
 
void EnableDocking (bool p_value)
 
bool IsDockingEnabled () const
 
void SetCanvas (Modules::Canvas &p_canvas)
 
void RemoveCanvas ()
 
void Render ()
 

Detailed Description

Handle the creation and drawing of the UI

Constructor & Destructor Documentation

◆ UIManager()

OvUI::Core::UIManager::UIManager ( GLFWwindow *  p_glfwWindow,
Styling::EStyle  p_style = Styling::EStyle::IM_DARK_STYLE,
const std::string &  p_glslVersion = "#version 150" 
)

Create the UI manager. Will setup ImGui internally\

Parameters
p_glfwWindow
p_style
p_glslVersion(Ex: #version 150)

@project: Overload

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

◆ ~UIManager()

OvUI::Core::UIManager::~UIManager ( )

Destroy the UI manager. Will handle ImGui destruction internally

Member Function Documentation

◆ ApplyStyle()

void OvUI::Core::UIManager::ApplyStyle ( Styling::EStyle  p_style)

Apply a new style to the UI elements

Parameters
p_style

◆ EnableDocking()

void OvUI::Core::UIManager::EnableDocking ( bool  p_value)

Enable the docking system

Parameters
p_value

◆ EnableEditorLayoutSave()

void OvUI::Core::UIManager::EnableEditorLayoutSave ( bool  p_value)

Allow the user to enable/disable .ini generation to save his editor layout

Parameters
p_value

◆ GetEditorLayoutAutosaveFrequency()

float OvUI::Core::UIManager::GetEditorLayoutAutosaveFrequency ( float  p_frequeny)

Returns the current frequency (in seconds) for the auto saving system of the editor layout

◆ IsDockingEnabled()

bool OvUI::Core::UIManager::IsDockingEnabled ( ) const

Return true if the docking system is enabled

◆ IsEditorLayoutSaveEnabled()

bool OvUI::Core::UIManager::IsEditorLayoutSaveEnabled ( ) const

Return true if the editor layout save system is on

◆ LoadFont()

bool OvUI::Core::UIManager::LoadFont ( const std::string &  p_id,
const std::string &  p_path,
float  p_fontSize 
)

Load a font (Returns true on success)

Parameters
p_id
p_path
p_fontSize

◆ RemoveCanvas()

void OvUI::Core::UIManager::RemoveCanvas ( )

Stop considering the current canvas (if any)

◆ Render()

void OvUI::Core::UIManager::Render ( )

Render ImGui current frane

Note
Should be called once per frame

◆ SetCanvas()

void OvUI::Core::UIManager::SetCanvas ( Modules::Canvas p_canvas)

Defines the canvas to use

Parameters
p_canvas

◆ SetEditorLayoutAutosaveFrequency()

void OvUI::Core::UIManager::SetEditorLayoutAutosaveFrequency ( float  p_frequency)

Defines a frequency (in seconds) for the auto saving system of the editor layout

Parameters
p_frequency

◆ SetEditorLayoutSaveFilename()

void OvUI::Core::UIManager::SetEditorLayoutSaveFilename ( const std::string &  p_filename)

Defines a filename for the editor layout save file

◆ UnloadFont()

bool OvUI::Core::UIManager::UnloadFont ( const std::string &  p_id)

Unload a font (Returns true on success)

Parameters
p_id

◆ UseDefaultFont()

void OvUI::Core::UIManager::UseDefaultFont ( )

Use the default font (ImGui default font)

◆ UseFont()

bool OvUI::Core::UIManager::UseFont ( const std::string &  p_id)

Set the given font as the current one (Returns true on success)


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