yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dashboard_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_UI_DASHBOARD_PANEL_H_
2#define YAZE_APP_EDITOR_UI_DASHBOARD_PANEL_H_
3
4#include <functional>
5#include <string>
6#include <vector>
7
8#include "app/editor/editor.h"
10#include "imgui/imgui.h"
11
12namespace yaze {
13namespace editor {
14
15class EditorManager;
16
18 public:
19 explicit DashboardPanel(EditorManager* editor_manager);
20 ~DashboardPanel() = default;
21
22 void Draw();
23
24 void Show() { show_ = true; }
25 void Hide() { show_ = false; }
26 bool IsVisible() const { return show_; }
27 bool* visibility_flag() { return &show_; }
28
30 void LoadRecentEditors();
31 void SaveRecentEditors();
32 void ClearRecentEditors();
33
34 private:
35 struct EditorInfo {
36 std::string name;
37 std::string icon;
38 std::string description;
39 std::string shortcut;
41 ImVec4 color;
42 bool recently_used = false;
43 };
44
45 void DrawWelcomeHeader();
46 void DrawRecentEditors();
47 void DrawEditorGrid();
48 void DrawEditorPanel(const EditorInfo& info, int index);
49
52 bool show_ = true;
53
54 std::vector<EditorInfo> editors_;
55 std::vector<EditorType> recent_editors_;
56 static constexpr size_t kMaxRecentEditors = 5;
57};
58
59} // namespace editor
60} // namespace yaze
61
62#endif // YAZE_APP_EDITOR_UI_DASHBOARD_PANEL_H_
std::vector< EditorInfo > editors_
DashboardPanel(EditorManager *editor_manager)
void DrawEditorPanel(const EditorInfo &info, int index)
static constexpr size_t kMaxRecentEditors
std::vector< EditorType > recent_editors_
void MarkRecentlyUsed(EditorType type)
The EditorManager controls the main editor window and manages the various editor classes.
Draggable, dockable panel for editor sub-windows.