#include <dashboard_panel.h>

Classes | |
| struct | EditorInfo |
Public Member Functions | |
| DashboardPanel (EditorManager *editor_manager) | |
| ~DashboardPanel ()=default | |
| void | Draw () |
| void | Show () |
| void | Hide () |
| bool | IsVisible () const |
| bool * | visibility_flag () |
| void | MarkRecentlyUsed (EditorType type) |
| void | LoadRecentEditors () |
| void | SaveRecentEditors () |
| void | ClearRecentEditors () |
Private Member Functions | |
| void | DrawWelcomeHeader () |
| void | DrawRecentEditors () |
| void | DrawEditorGrid () |
| void | DrawEditorPanel (const EditorInfo &info, int index) |
Private Attributes | |
| EditorManager * | editor_manager_ |
| gui::PanelWindow | window_ |
| bool | show_ = true |
| std::vector< EditorInfo > | editors_ |
| std::vector< EditorType > | recent_editors_ |
Static Private Attributes | |
| static constexpr size_t | kMaxRecentEditors = 5 |
Definition at line 17 of file dashboard_panel.h.
|
explicit |
Definition at line 21 of file dashboard_panel.cc.
References yaze::gui::PanelWindow::Center, editors_, yaze::gui::GetCtrlDisplayName(), ICON_MD_CASTLE, ICON_MD_CHAT_BUBBLE, ICON_MD_CODE, ICON_MD_COLOR_LENS, ICON_MD_DATA_ARRAY, ICON_MD_EMOJI_EMOTIONS, ICON_MD_MAP, ICON_MD_MUSIC_NOTE, ICON_MD_PALETTE, ICON_MD_SMART_TOY, ICON_MD_TV, ICON_MD_VIDEOGAME_ASSET, yaze::editor::kAgent, yaze::editor::kAssembly, yaze::editor::kDungeon, yaze::editor::kEmulator, yaze::editor::kGraphics, yaze::editor::kHex, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, yaze::editor::kPalette, yaze::editor::kScreen, yaze::editor::kSprite, LoadRecentEditors(), yaze::gui::PanelWindow::SetDefaultSize(), yaze::gui::PanelWindow::SetPosition(), and window_.

|
default |
| void yaze::editor::DashboardPanel::Draw | ( | ) |
Definition at line 72 of file dashboard_panel.cc.
References yaze::gui::PanelWindow::Begin(), DrawEditorGrid(), DrawRecentEditors(), DrawWelcomeHeader(), yaze::gui::PanelWindow::End(), recent_editors_, show_, and window_.
|
inline |
Definition at line 24 of file dashboard_panel.h.
References show_.
|
inline |
Definition at line 25 of file dashboard_panel.h.
References show_.
|
inline |
Definition at line 26 of file dashboard_panel.h.
References show_.
|
inline |
Definition at line 27 of file dashboard_panel.h.
References show_.
| void yaze::editor::DashboardPanel::MarkRecentlyUsed | ( | EditorType | type | ) |
Definition at line 305 of file dashboard_panel.cc.
References kMaxRecentEditors, recent_editors_, and SaveRecentEditors().
Referenced by DrawEditorPanel(), and DrawRecentEditors().

| void yaze::editor::DashboardPanel::LoadRecentEditors | ( | ) |
Definition at line 323 of file dashboard_panel.cc.
References kMaxRecentEditors, yaze::editor::kSettings, yaze::util::LoadFileFromConfigDir(), and recent_editors_.
Referenced by DashboardPanel().

| void yaze::editor::DashboardPanel::SaveRecentEditors | ( | ) |
Definition at line 343 of file dashboard_panel.cc.
References recent_editors_, and yaze::util::SaveFile().
Referenced by ClearRecentEditors(), and MarkRecentlyUsed().

| void yaze::editor::DashboardPanel::ClearRecentEditors | ( | ) |
Definition at line 355 of file dashboard_panel.cc.
References recent_editors_, and SaveRecentEditors().

|
private |
|
private |
Definition at line 107 of file dashboard_panel.cc.
References editor_manager_, editors_, ICON_MD_HISTORY, MarkRecentlyUsed(), recent_editors_, show_, and yaze::editor::EditorManager::SwitchToEditor().
Referenced by Draw().

|
private |
Definition at line 153 of file dashboard_panel.cc.
References DrawEditorPanel(), editors_, and ICON_MD_APPS.
Referenced by Draw().

|
private |
Definition at line 172 of file dashboard_panel.cc.
References yaze::editor::DashboardPanel::EditorInfo::color, yaze::editor::DashboardPanel::EditorInfo::description, editor_manager_, yaze::editor::DashboardPanel::EditorInfo::icon, ICON_MD_KEYBOARD, ICON_MD_STAR, MarkRecentlyUsed(), yaze::editor::DashboardPanel::EditorInfo::name, recent_editors_, yaze::editor::DashboardPanel::EditorInfo::shortcut, show_, yaze::editor::EditorManager::SwitchToEditor(), and yaze::editor::DashboardPanel::EditorInfo::type.
Referenced by DrawEditorGrid().

|
private |
Definition at line 50 of file dashboard_panel.h.
Referenced by DrawEditorPanel(), and DrawRecentEditors().
|
private |
Definition at line 51 of file dashboard_panel.h.
Referenced by DashboardPanel(), and Draw().
|
private |
Definition at line 52 of file dashboard_panel.h.
Referenced by Draw(), DrawEditorPanel(), DrawRecentEditors(), Hide(), IsVisible(), Show(), and visibility_flag().
|
private |
Definition at line 54 of file dashboard_panel.h.
Referenced by DashboardPanel(), DrawEditorGrid(), and DrawRecentEditors().
|
private |
Definition at line 55 of file dashboard_panel.h.
Referenced by ClearRecentEditors(), Draw(), DrawEditorPanel(), DrawRecentEditors(), LoadRecentEditors(), MarkRecentlyUsed(), and SaveRecentEditors().
|
staticconstexprprivate |
Definition at line 56 of file dashboard_panel.h.
Referenced by LoadRecentEditors(), and MarkRecentlyUsed().