 |
BARE2D
|
|
Go to the documentation of this file.
4 #include <CEGUI/CEGUI.h>
5 #include <CEGUI/RendererModules/OpenGL/GL3Renderer.h>
7 #include <SDL2/SDL_events.h>
28 void init(std::string& resourceDirectory,
unsigned int numContexts);
74 void setFont(std::string fontFile);
85 CEGUI::Window*
createWidget(std::string type, glm::vec4 destRectPercent, glm::vec4 destRectPixels, CEGUI::Window* parent =
nullptr, std::string name =
"");
void setActiveContext(unsigned int contextIndex)
Sets the active context.
void update()
Updates the amount of time passed in CEGUI.
CEGUI::OpenGL3Renderer * getRenderer()
static bool m_initialized
void setMouseCursorShown(bool shown)
Shows/hides the mouse cursor. Useful for cutscenes!
CEGUI::OpenGL3Renderer * renderer
static BARECEGUI * m_instance
CEGUI::GUIContext * getContext()
void handleSDLEvent(SDL_Event &evnt)
Handles and propagates input.
void setMouseCursor(std::string imageFile)
Sets the image of the mouse cursor.
void loadScheme(std::string schemeFile)
Loads a scheme file from resourceDirectory/schemes.
unsigned int m_activeContext
CEGUI::Window * rootWindow
static BARECEGUI * getInstance()
void setFont(std::string fontFile)
Sets the current font to some font.
CEGUI::GUIContext * context
void init(std::string &resourceDirectory, unsigned int numContexts)
Initializes all of the necessary stuff to use CEGUI!
CEGUI::Key::Scan SDLKeyToCEGUIKey(SDL_Keycode key)
CEGUI::Window * createWidget(std::string type, glm::vec4 destRectPercent, glm::vec4 destRectPixels, CEGUI::Window *parent=nullptr, std::string name="")
Creates a widget of some type.
std::vector< CEGUIContextWrapper * > m_contexts
void draw()
Draws the GUI to the screen over top of what's already there.
void destroy()
Frees all necessary memory and unloads resources. Destroys root + children windows.
CEGUI::MouseButton SDLButtonToCEGUIButton(Uint8 sdlButton)