#include <UI.h>
|
static int | initialize () |
|
static void | eventsFinished () |
|
static void | display () |
|
static void | shutdown () |
|
static void | setSize (glm::i32vec2 s) |
|
static void | setVisible (bool v) |
|
static bool | isVisible () |
|
static void | handleKeyboard (KeyboardButton key, bool pressed) |
|
static void | handleText (char *text, bool notFinished) |
|
static void | handleMouseClick (unsigned int x, unsigned int y, KeyboardButton button, bool released) |
|
static void | handleMouseMotion (int xrel, int yrel, int xabs, int yabs) |
|
static void | handleMouseScroll (int xrel, int yrel) |
|
static void | handleControllerAxis (float value, KeyboardButton axis) |
|
static void | handleControllerButton (KeyboardButton button, bool released) |
|
static void | renderImGui (ImDrawList **const draw_lists, int count) |
|
Definition at line 22 of file UI.h.
- FIXME:
- allow loading other TTF fonts
Definition at line 44 of file UI.cpp.
void UI::eventsFinished |
( |
| ) |
|
|
static |
void UI::setSize |
( |
glm::i32vec2 |
s | ) |
|
|
static |
static void UI::setVisible |
( |
bool |
v | ) |
|
|
inlinestatic |
Definition at line 30 of file UI.h.
static bool UI::isVisible |
( |
| ) |
|
|
inlinestatic |
Definition at line 31 of file UI.h.
void UI::handleText |
( |
char * |
text, |
|
|
bool |
notFinished |
|
) |
| |
|
static |
void UI::handleMouseClick |
( |
unsigned int |
x, |
|
|
unsigned int |
y, |
|
|
KeyboardButton |
button, |
|
|
bool |
released |
|
) |
| |
|
static |
void UI::handleMouseMotion |
( |
int |
xrel, |
|
|
int |
yrel, |
|
|
int |
xabs, |
|
|
int |
yabs |
|
) |
| |
|
static |
void UI::handleMouseScroll |
( |
int |
xrel, |
|
|
int |
yrel |
|
) |
| |
|
static |
void UI::handleControllerButton |
( |
KeyboardButton |
button, |
|
|
bool |
released |
|
) |
| |
|
static |
void UI::renderImGui |
( |
ImDrawList **const |
draw_lists, |
|
|
int |
count |
|
) |
| |
|
static |
- FIXME:
- Don't copy data The GL calls and the shaders can probably be slightly altered to avoid copying all the vertices, uvs and colors again here.
Definition at line 459 of file UI.cpp.
Definition at line 44 of file UI.h.
Definition at line 45 of file UI.h.
std::string UI::iniFilename |
|
staticprivate |
Definition at line 46 of file UI.h.
std::string UI::logFilename |
|
staticprivate |
Definition at line 47 of file UI.h.
bool UI::metaKeyIsActive = false |
|
staticprivate |
Definition at line 48 of file UI.h.
Definition at line 50 of file UI.h.
std::list< std::tuple< unsigned int, unsigned int, KeyboardButton, bool > > UI::clickEvents |
|
staticprivate |
Definition at line 51 of file UI.h.
std::list< std::tuple< int, int, int, int > > UI::motionEvents |
|
staticprivate |
Definition at line 52 of file UI.h.
std::list< std::tuple< int, int > > UI::scrollEvents |
|
staticprivate |
Definition at line 53 of file UI.h.
Definition at line 55 of file UI.h.
const char * UI::imguiShaderVertex |
|
staticprivate |
Initial value:= R"!?!(
#version 330 core
layout(location = 0) in vec2 vertexPosition_screen;
layout(location = 1) in vec2 vertexUV;
layout(location = 2) in vec4 vertexColor;
out vec2 UV;
out vec4 FragColor;
uniform vec2 screen;
void main() {
vec2 halfScreen = screen / 2;
vec2 vertexPosition_homogenous = (vertexPosition_screen - halfScreen) / halfScreen;
gl_Position = vec4(vertexPosition_homogenous.x, -vertexPosition_homogenous.y, 0, 1);
UV = vertexUV;
FragColor = vertexColor;
}
)!?!"
Definition at line 56 of file UI.h.
const char * UI::imguiShaderFragment |
|
staticprivate |
Initial value:= R"!?!(
#version 330 core
in vec2 UV;
in vec4 FragColor;
out vec4 color;
uniform sampler2D textureSampler;
void main() {
color = texture(textureSampler, UV) * FragColor;
}
)!?!"
Definition at line 57 of file UI.h.
The documentation for this class was generated from the following files: