yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
controller.h
Go to the documentation of this file.
1#ifndef YAZE_APP_CORE_CONTROLLER_H
2#define YAZE_APP_CORE_CONTROLLER_H
3
4#include <SDL.h>
5
6#include <memory>
7
8#include "absl/status/status.h"
13#include "imgui/backends/imgui_impl_sdl2.h"
14#include "imgui/backends/imgui_impl_sdlrenderer2.h"
15#include "imgui/imconfig.h"
16#include "imgui/imgui.h"
17
18int main(int argc, char **argv);
19
20namespace yaze {
21namespace core {
22
30 public:
31 bool IsActive() const { return active_; }
32 absl::Status OnEntry(std::string filename = "");
33 void Initialize(std::string filename = "");
34 void OnInput();
35 absl::Status OnLoad();
36 void DoRender() const;
37 void OnExit();
38
39 absl::Status CreateWindow();
40 absl::Status CreateRenderer();
41 absl::Status CreateGuiContext();
42 absl::Status LoadConfigFiles();
43
44 auto window() -> SDL_Window * { return window_.get(); }
45 void set_active(bool active) { active_ = active; }
46 auto active() const { return active_; }
47
48 private:
49 friend int ::main(int argc, char **argv);
50
51 bool active_ = false;
53 std::shared_ptr<SDL_Window> window_;
55};
56
57} // namespace core
58} // namespace yaze
59
60#endif // YAZE_APP_CORE_CONTROLLER_H
Main controller for the application.
Definition controller.h:29
absl::Status OnLoad()
absl::Status CreateWindow()
auto window() -> SDL_Window *
Definition controller.h:44
auto active() const
Definition controller.h:46
bool IsActive() const
Definition controller.h:31
core::PlatformBackend< Sdl2Backend > backend_
Definition controller.h:54
void Initialize(std::string filename="")
Definition controller.cc:58
absl::Status CreateGuiContext()
void set_active(bool active)
Definition controller.h:45
absl::Status OnEntry(std::string filename="")
Definition controller.cc:44
editor::EditorManager editor_manager_
Definition controller.h:52
std::shared_ptr< SDL_Window > window_
Definition controller.h:53
absl::Status CreateRenderer()
absl::Status LoadConfigFiles()
The EditorManager controls the main editor window and manages the various editor classes.
int main(int argc, char **argv)
Definition emu.cc:20
Main namespace for the application.
Definition controller.cc:18