#include <UIManager.h>
|
| UI_Manager () |
|
| ~UI_Manager () |
|
Canvas * | GetCanvas () |
|
Button * | AddButton (std::string layer, glm::vec4 NBC, glm::vec4 HBC, glm::vec4 ABC, glm::vec4 NTC, glm::vec4 HTC, glm::vec4 ATC, glm::vec4 bounds, std::string text, boost::function< void()> callback) |
|
Slider * | AddSlider (std::string layer, glm::vec4 NBC, glm::vec4 HBC, glm::vec4 ABC, glm::vec4 FBC, glm::vec4 NCC, glm::vec4 HCC, glm::vec4 ACC, glm::vec2 cursorSize, float barHeight, glm::vec4 bounds, float min, float max, float step) |
|
Image * | AddImage (std::string layer, std::string title, glm::vec4 bounds) |
|
void | ChangeImage (Image *bg, std::string title) |
|
void | LoadUI (std::string page) |
|
Main UI management system. Controls one canvas object for drawing UI on it.
◆ UI_Manager()
UI::UI_Manager::UI_Manager |
( |
| ) |
|
Main constructor. Creates and sets up the cavas object.
◆ ~UI_Manager()
UI::UI_Manager::~UI_Manager |
( |
| ) |
|
◆ AddButton()
Button * UI::UI_Manager::AddButton |
( |
std::string |
layer, |
|
|
glm::vec4 |
NBC, |
|
|
glm::vec4 |
HBC, |
|
|
glm::vec4 |
ABC, |
|
|
glm::vec4 |
NTC, |
|
|
glm::vec4 |
HTC, |
|
|
glm::vec4 |
ATC, |
|
|
glm::vec4 |
bounds, |
|
|
std::string |
text, |
|
|
boost::function< void()> |
callback |
|
) |
| |
Primary function for adding a button to a UI layer.
- Parameters
-
[in] | a | string indicating the title of the layer. |
[in] | color | as vec4 indicating default button color. |
[in] | color | as vec4 indicating hover button color. |
[in] | color | as vec4 indicating active button color. |
[in] | color | as vec4 indicating default text color. |
[in] | color | as vec4 indicating hover text color. |
[in] | color | as vec4 indicating active text color. |
[in] | coordinates | for diagonally opposite points of the button(x1,y1,x2,y2) |
[in] | string | to be written on the button. |
[in] | a | callback function indicating the action on click. |
[out] | a | pointer to the button object created |
◆ AddImage()
Image * UI::UI_Manager::AddImage |
( |
std::string |
layer, |
|
|
std::string |
title, |
|
|
glm::vec4 |
bounds |
|
) |
| |
Primary function for adding a background image to a UI layer.
- Parameters
-
[in] | a | string indicating the title of the layer. |
[in] | the | name of the image file with extention as string. |
[in] | coordinates | for diagonally opposite points of the image(x1,y1,x2,y2) |
[out] | a | pointer to the background object created. |
◆ AddSlider()
Slider * UI::UI_Manager::AddSlider |
( |
std::string |
layer, |
|
|
glm::vec4 |
NBC, |
|
|
glm::vec4 |
HBC, |
|
|
glm::vec4 |
ABC, |
|
|
glm::vec4 |
FBC, |
|
|
glm::vec4 |
NCC, |
|
|
glm::vec4 |
HCC, |
|
|
glm::vec4 |
ACC, |
|
|
glm::vec2 |
cursorSize, |
|
|
float |
barHeight, |
|
|
glm::vec4 |
bounds, |
|
|
float |
min, |
|
|
float |
max, |
|
|
float |
step |
|
) |
| |
Primary function for adding a slider onto a layer in UI.
- Parameters
-
[in] | a | string indicating the title of the layer. |
[in] | color | as vec4 indicating default bar color. |
[in] | color | as vec4 indicating hover bar color. |
[in] | color | as vec4 indicating active bar color. |
[in] | color | as vec4 indicating filled bar color. |
[in] | color | as vec4 indicating default cursor color. |
[in] | color | as vec4 indicating hover cursor color. |
[in] | color | as vec4 indicating active cursor color. |
[in] | the | size of the cursor on the bar |
[in] | the | height of the bar |
[in] | coordinates | for diagonally opposite points of the slider box(x1,y1,x2,y2) |
[in] | minimum | slider value in float. |
[in] | maximum | slider value in float. |
[in] | step-size | for the slider in float. |
[out] | pointer | to the created slider object. |
◆ ChangeImage()
void UI::UI_Manager::ChangeImage |
( |
Image * |
bg, |
|
|
std::string |
title |
|
) |
| |
Primary function for changing the image on a pre-existing background object.
- Parameters
-
[in] | pointer | to the background object. |
[in] | the | name of the image file with extention as string. |
◆ GetCanvas()
Canvas* UI::UI_Manager::GetCanvas |
( |
| ) |
|
|
inline |
◆ LoadUI()
void UI::UI_Manager::LoadUI |
( |
std::string |
page | ) |
|
Load the requested layer through its title.
- Parameters
-
[in] | a | string which basically indicates the title of the page for mapping. |
The documentation for this class was generated from the following files:
- D:/RIT/FALCON_ENGINE/Falcon/Falcon/Rendering/PipeLine/UIManager.h
- D:/RIT/FALCON_ENGINE/Falcon/Falcon/Rendering/PipeLine/UIManager.cpp