19#include <RmlUi/Core/Context.h>
20#include <RmlUi/Core/ElementDocument.h>
22#include <spdlog/spdlog.h>
76 std::unique_ptr<Scene> ptr = std::make_unique<T>(*
this);
105 Rml::ElementDocument*
LoadDocument(
const std::string& path);
124 void DrawText(
const std::string& text,
float x,
float y);
125 void DrawText(
const std::string& text,
const glm::vec3& color,
float x,
float y);
126 void DrawText(
const std::string& text,
float x,
float y,
float size);
127 void DrawText(
const std::string& text,
const glm::vec3& color,
float x,
float y,
float size);
185 m_game = std::make_unique<T>();
240 std::unique_ptr<cqsp::engine::GameState>
m_game;
Definition: assetmanager.h:145
A shader program.
Definition: shader.h:68
Definition: clientoptions.h:27
Definition: application.h:164
virtual ~CqspEventInstancer()
Rml::EventListener * InstanceEventListener(const Rml::String &value, Rml::Element *element) override
Instances a new event handle for Invaders.
Definition: application.cpp:548
Definition: application.h:175
void ProcessEvent(Rml::Event &event)
Definition: application.cpp:556
CqspEventListener(const std::string &name)
Definition: application.h:177
std::string name
Definition: application.h:180
Definition: application.h:47
int init()
Definition: application.cpp:59
void SetWindowDimensions(int width, int height)
Definition: application.cpp:540
void InitRmlUi()
Definition: application.cpp:170
bool to_halt
Definition: application.h:254
Rml::ElementDocument * ReloadDocument(const std::string &path)
Reloads the document from the file How to hotload the a document.
Definition: application.cpp:397
bool ButtonIsPressed(KeyInput btn)
Definition: application.h:91
Window * GetWindow()
Definition: application.h:121
bool ButtonIsHeld(int btn)
Definition: application.h:84
double GetTime()
Time since glfw was initialized in seconds
Definition: application.cpp:448
int GetWindowWidth() const
Definition: application.h:60
void SetFontShader(cqsp::asset::ShaderProgram *shader)
Definition: application.h:132
Rml::ElementDocument * LoadDocument(const std::string &path)
Definition: application.cpp:378
bool draw_fps
Definition: application.h:256
cqsp::engine::SceneManager m_scene_manager
Definition: application.h:228
bool MouseButtonIsHeld(int btn)
Definition: application.h:101
bool ButtonIsHeld(KeyInput btn)
Definition: application.h:85
bool ButtonIsReleased(int btn)
Definition: application.h:87
glm::mat4 two_dim_projection
Definition: application.h:251
std::map< std::string, std::string > properties
Definition: application.h:245
void LogInfo()
Definition: application.cpp:522
void InitImgui()
Definition: application.cpp:82
void run()
Definition: application.cpp:286
void SetFont(cqsp::asset::Font *font)
Definition: application.h:131
bool MouseButtonIsPressed(int btn)
Definition: application.h:103
void SetScene()
Definition: application.h:75
void CalculateProjections()
Definition: application.cpp:256
double MouseButtonLastReleased(int btn)
Definition: application.h:93
Application(int _argc, char *_argv[])
Definition: application.cpp:267
glm::mat4 Get3DProj()
Definition: application.h:146
double GetScrollAmount()
Definition: application.h:96
bool ButtonIsPressed(int btn)
Definition: application.h:90
glm::mat4 three_dim_projection
Definition: application.h:252
ax::NodeEditor::EditorContext * m_ne_context
Definition: application.h:224
void SetIcon()
Definition: application.cpp:498
bool ButtonIsReleased(KeyInput btn)
Definition: application.h:88
glm::mat4 rmlui_projection
Definition: application.h:253
cqsp::engine::audio::IAudioInterface & GetAudioInterface()
Definition: application.h:82
cqsp::asset::AssetManager & GetAssetManager()
Definition: application.h:65
std::unique_ptr< SystemInterface_GLFW > m_system_interface
Definition: application.h:222
void SetFullScreen(bool screen)
Definition: application.cpp:542
cqsp::asset::Font * m_font
Definition: application.h:242
std::unique_ptr< CqspEventInstancer > m_event_instancer
Definition: application.h:226
cqsp::asset::ShaderProgram * fontShader
Definition: application.h:243
std::map< std::string, Rml::ElementDocument * > loaded_documents
Definition: application.h:249
int destroy()
Definition: application.cpp:211
void InitFonts()
Definition: application.cpp:484
double fps
Definition: application.h:232
void ResetGame()
Definition: application.h:207
std::vector< std::string > & GetCmdLineArgs()
Definition: application.h:149
bool MouseDragged()
Definition: application.h:140
std::string icon_path
Definition: application.h:219
void LoggerInit()
Definition: application.cpp:514
void(* EventListener)(Rml::Event &)
Definition: application.h:173
void ProcessRmlUiUserInput()
Definition: application.cpp:101
std::vector< std::string > cmd_line_args
Definition: application.h:216
void DrawText(const std::string &text, float x, float y)
Definition: application.cpp:413
void InitGame()
Definition: application.h:184
Rml::Context * rml_context
Definition: application.h:221
cqsp::asset::Font *& GetFont()
Definition: application.h:123
void CloseDocument(const std::string &path)
Definition: application.cpp:390
bool HasCmdLineArgs(const std::string &arg)
Definition: application.h:151
bool MouseButtonDoubleClicked(int btn)
Definition: application.h:94
bool Screenshot(const char *path=NULL)
Screenshots the current framebuffer to the filename
Definition: application.cpp:450
client::ClientOptions & GetClientOptions()
Definition: application.h:56
double lastFrame
Definition: application.h:234
std::string locale
Definition: application.h:236
Rml::Context * GetRmlUiContext()
Definition: application.h:162
double GetMouseX()
Definition: application.h:98
bool full_screen
Definition: application.h:217
double deltaTime
Definition: application.h:234
std::unique_ptr< cqsp::engine::GameState > m_game
Definition: application.h:240
std::unique_ptr< Rml::RenderInterface > m_render_interface
Definition: application.h:223
double GetFps() const
Definition: application.h:63
void GlInit()
Definition: application.cpp:500
cqsp::engine::audio::IAudioInterface * m_audio_interface
Definition: application.h:247
glm::mat4 Get2DProj()
Definition: application.h:145
Window * m_window
Definition: application.h:218
double GetDeltaTime() const
Definition: application.h:62
void ExitApplication()
Definition: application.cpp:376
double GetMouseY()
Definition: application.h:99
client::ClientOptions m_client_options
Definition: application.h:230
void InitAudio()
Definition: application.cpp:161
cqsp::engine::GameState * GetGame()
Definition: application.h:80
void DrawTextNormalized(const std::string &text, float x, float y)
Definition: application.cpp:441
cqsp::asset::AssetManager manager
Definition: application.h:238
int GetWindowHeight() const
Definition: application.h:58
bool ShouldExit()
Definition: application.cpp:374
glm::mat4 GetRmlUiProj()
Definition: application.h:147
bool MouseButtonIsReleased(int btn)
Definition: application.h:102
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