19#include <RmlUi/Core/Context.h>
20#include <RmlUi/Core/ElementDocument.h>
21#include <RmlUi/Core/EventListener.h>
22#include <RmlUi/Core/EventListenerInstancer.h>
23#include <RmlUi/Core/RenderInterface.h>
25#include <spdlog/spdlog.h>
78 std::unique_ptr<Scene> ptr = std::make_unique<T>(*
this);
107 Rml::ElementDocument*
LoadDocument(
const std::string& path);
126 void DrawText(
const std::string& text,
float x,
float y);
127 void DrawText(
const std::string& text,
const glm::vec3& color,
float x,
float y);
128 void DrawText(
const std::string& text,
float x,
float y,
float size);
129 void DrawText(
const std::string& text,
const glm::vec3& color,
float x,
float y,
float size);
187 m_game = std::make_unique<T>();
242 std::unique_ptr<cqsp::engine::GameState>
m_game;
Definition: assetmanager.h:145
A shader program.
Definition: shader.h:69
Definition: clientoptions.h:27
Definition: application.h:166
virtual ~CqspEventInstancer()
Rml::EventListener * InstanceEventListener(const Rml::String &value, Rml::Element *element) override
Instances a new event handle for Invaders.
Definition: application.cpp:557
Definition: application.h:177
void ProcessEvent(Rml::Event &event)
Definition: application.cpp:565
CqspEventListener(const std::string &name)
Definition: application.h:179
std::string name
Definition: application.h:182
Definition: application.h:49
int init()
Definition: application.cpp:60
void SetWindowDimensions(int width, int height)
Definition: application.cpp:549
void InitRmlUi()
Definition: application.cpp:171
bool to_halt
Definition: application.h:256
Rml::ElementDocument * ReloadDocument(const std::string &path)
Reloads the document from the file How to hotload the a document.
Definition: application.cpp:404
bool ButtonIsPressed(KeyInput btn)
Definition: application.h:93
Window * GetWindow()
Definition: application.h:123
bool ButtonIsHeld(int btn)
Definition: application.h:86
double GetTime()
Time since glfw was initialized in seconds
Definition: application.cpp:457
int GetWindowWidth() const
Definition: application.h:62
void SetFontShader(cqsp::asset::ShaderProgram *shader)
Definition: application.h:134
Rml::ElementDocument * LoadDocument(const std::string &path)
Definition: application.cpp:381
bool draw_fps
Definition: application.h:258
cqsp::engine::SceneManager m_scene_manager
Definition: application.h:230
bool MouseButtonIsHeld(int btn)
Definition: application.h:103
bool ButtonIsHeld(KeyInput btn)
Definition: application.h:87
bool ButtonIsReleased(int btn)
Definition: application.h:89
glm::mat4 two_dim_projection
Definition: application.h:253
std::map< std::string, std::string > properties
Definition: application.h:247
void LogInfo()
Definition: application.cpp:531
void InitImgui()
Definition: application.cpp:83
void run()
Definition: application.cpp:287
void SetFont(cqsp::asset::Font *font)
Definition: application.h:133
bool MouseButtonIsPressed(int btn)
Definition: application.h:105
void SetScene()
Definition: application.h:77
void CalculateProjections()
Definition: application.cpp:257
double MouseButtonLastReleased(int btn)
Definition: application.h:95
Application(int _argc, char *_argv[])
Definition: application.cpp:268
glm::mat4 Get3DProj()
Definition: application.h:148
double GetScrollAmount()
Definition: application.h:98
bool ButtonIsPressed(int btn)
Definition: application.h:92
glm::mat4 three_dim_projection
Definition: application.h:254
ax::NodeEditor::EditorContext * m_ne_context
Definition: application.h:226
void SetIcon()
Definition: application.cpp:507
bool ButtonIsReleased(KeyInput btn)
Definition: application.h:90
glm::mat4 rmlui_projection
Definition: application.h:255
cqsp::engine::audio::IAudioInterface & GetAudioInterface()
Definition: application.h:84
cqsp::asset::AssetManager & GetAssetManager()
Definition: application.h:67
std::unique_ptr< SystemInterface_GLFW > m_system_interface
Definition: application.h:224
void SetFullScreen(bool screen)
Definition: application.cpp:551
cqsp::asset::Font * m_font
Definition: application.h:244
std::unique_ptr< CqspEventInstancer > m_event_instancer
Definition: application.h:228
cqsp::asset::ShaderProgram * fontShader
Definition: application.h:245
std::map< std::string, Rml::ElementDocument * > loaded_documents
Definition: application.h:251
int destroy()
Definition: application.cpp:212
void InitFonts()
Definition: application.cpp:493
double fps
Definition: application.h:234
void ResetGame()
Definition: application.h:209
std::vector< std::string > & GetCmdLineArgs()
Definition: application.h:151
bool MouseDragged()
Definition: application.h:142
std::string icon_path
Definition: application.h:221
void LoggerInit()
Definition: application.cpp:523
void(* EventListener)(Rml::Event &)
Definition: application.h:175
void ProcessRmlUiUserInput()
Definition: application.cpp:102
std::vector< std::string > cmd_line_args
Definition: application.h:218
void DrawText(const std::string &text, float x, float y)
Definition: application.cpp:422
void InitGame()
Definition: application.h:186
Rml::Context * rml_context
Definition: application.h:223
cqsp::asset::Font *& GetFont()
Definition: application.h:125
void CloseDocument(const std::string &path)
Definition: application.cpp:395
bool HasCmdLineArgs(const std::string &arg)
Definition: application.h:153
bool MouseButtonDoubleClicked(int btn)
Definition: application.h:96
bool Screenshot(const char *path=NULL)
Screenshots the current framebuffer to the filename
Definition: application.cpp:459
client::ClientOptions & GetClientOptions()
Definition: application.h:58
double lastFrame
Definition: application.h:236
std::string locale
Definition: application.h:238
Rml::Context * GetRmlUiContext()
Definition: application.h:164
double GetMouseX()
Definition: application.h:100
bool full_screen
Definition: application.h:219
double deltaTime
Definition: application.h:236
std::unique_ptr< cqsp::engine::GameState > m_game
Definition: application.h:242
std::unique_ptr< Rml::RenderInterface > m_render_interface
Definition: application.h:225
double GetFps() const
Definition: application.h:65
void GlInit()
Definition: application.cpp:509
cqsp::engine::audio::IAudioInterface * m_audio_interface
Definition: application.h:249
glm::mat4 Get2DProj()
Definition: application.h:147
Window * m_window
Definition: application.h:220
double GetDeltaTime() const
Definition: application.h:64
void ExitApplication()
Definition: application.cpp:379
double GetMouseY()
Definition: application.h:101
client::ClientOptions m_client_options
Definition: application.h:232
void InitAudio()
Definition: application.cpp:162
cqsp::engine::GameState * GetGame()
Definition: application.h:82
void DrawTextNormalized(const std::string &text, float x, float y)
Definition: application.cpp:450
cqsp::asset::AssetManager manager
Definition: application.h:240
int GetWindowHeight() const
Definition: application.h:60
bool ShouldExit()
Definition: application.cpp:377
glm::mat4 GetRmlUiProj()
Definition: application.h:149
bool MouseButtonIsReleased(int btn)
Definition: application.h:104
Definition: gamestate.h:20
Manages scenes for the application.
Definition: scenemanager.h:28
void SetScene(std::unique_ptr< Scene > scene)
Sets the next scene, and the scene will be switched when SwitchScene is executed.
Definition: scenemanager.cpp:31
The window handles the initialization of the callbacks, and all the input and output....
Definition: window.h:25
virtual int GetWindowHeight() const =0
virtual bool MouseButtonIsHeld(int btn) const =0
virtual bool ButtonIsPressed(int btn) const =0
virtual double MouseButtonLastReleased(int btn) const =0
virtual bool MouseDragged() const =0
virtual int GetScrollAmount() const =0
virtual bool MouseButtonDoubleClicked(int btn) const =0
virtual double GetMouseX() const =0
virtual bool ButtonIsReleased(int btn) const =0
virtual bool ButtonIsHeld(int btn) const =0
virtual double GetMouseY() const =0
virtual bool MouseButtonIsPressed(int btn) const =0
virtual bool MouseButtonIsReleased(int btn) const =0
virtual int GetWindowWidth() const =0
Definition: iaudiointerface.h:29
int GetGlfwKey(KeyInput key)
Definition: userinput.cpp:444
KeyInput
Definition: userinput.h:25
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:21
EventListener(common::Universe *universe)
Definition: turnsavewindow.h:1