yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::WelcomeScreen Class Reference

Modern welcome screen with project grid and quick actions. More...

#include <welcome_screen.h>

Collaboration diagram for yaze::editor::WelcomeScreen:

Classes

struct  Particle
 

Public Member Functions

 WelcomeScreen ()
 
bool Show (bool *p_open)
 Show the welcome screen.
 
void SetOpenRomCallback (std::function< void()> callback)
 Set callback for opening ROM.
 
void SetNewProjectCallback (std::function< void()> callback)
 Set callback for creating new project.
 
void SetNewProjectWithTemplateCallback (std::function< void(const std::string &)> callback)
 Set callback for creating project with template.
 
void SetOpenProjectCallback (std::function< void(const std::string &)> callback)
 Set callback for opening project.
 
void SetOpenAgentCallback (std::function< void()> callback)
 Set callback for opening AI Agent.
 
void RefreshRecentProjects ()
 Refresh recent projects list from the project manager.
 
void UpdateAnimations ()
 Update animation time for dynamic effects.
 
bool ShouldShow () const
 Check if screen should be shown.
 
void MarkManuallyClosed ()
 Mark as manually closed (don't show again this session)
 
void ResetFirstShow ()
 Reset first show flag (for testing/forcing display)
 
void SetLayoutOffsets (float left, float right)
 Set layout offsets for sidebar awareness.
 

Private Member Functions

void DrawHeader ()
 
void DrawQuickActions ()
 
void DrawRecentProjects ()
 
void DrawProjectPanel (const RecentProject &project, int index)
 
void DrawTemplatesSection ()
 
void DrawTipsSection ()
 
void DrawWhatsNew ()
 

Private Attributes

std::vector< RecentProjectrecent_projects_
 
bool manually_closed_ = false
 
bool first_show_attempt_ = true
 
std::function< void()> open_rom_callback_
 
std::function< void()> new_project_callback_
 
std::function< void(const std::string &) open_project_callback_ )
 
std::function< void(const std::string &) new_project_with_template_callback_ )
 
std::function< void()> open_agent_callback_
 
int selected_template_ = 0
 
float animation_time_ = 0.0f
 
float card_hover_scale_ [6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}
 
int hovered_card_ = -1
 
ImVec2 triforce_positions_ [kNumTriforces] = {}
 
ImVec2 triforce_base_positions_ [kNumTriforces] = {}
 
bool triforce_positions_initialized_ = false
 
Particle particles_ [kMaxParticles] = {}
 
int active_particle_count_ = 0
 
bool show_triforce_settings_ = false
 
float triforce_alpha_multiplier_ = 1.0f
 
float triforce_speed_multiplier_ = 0.3f
 
float triforce_size_multiplier_ = 1.0f
 
bool triforce_mouse_repel_enabled_ = true
 
bool particles_enabled_ = true
 
float particle_spawn_rate_ = 2.0f
 
float left_offset_ = 0.0f
 
float right_offset_ = 0.0f
 

Static Private Attributes

static constexpr int kMaxRecentProjects = 6
 
static constexpr int kNumTriforces = 6
 
static constexpr int kMaxParticles = 50
 

Detailed Description

Modern welcome screen with project grid and quick actions.

Definition at line 30 of file welcome_screen.h.

Constructor & Destructor Documentation

◆ WelcomeScreen()

yaze::editor::WelcomeScreen::WelcomeScreen ( )

Definition at line 139 of file welcome_screen.cc.

References RefreshRecentProjects().

Here is the call graph for this function:

Member Function Documentation

◆ Show()

◆ SetOpenRomCallback()

void yaze::editor::WelcomeScreen::SetOpenRomCallback ( std::function< void()> callback)
inline

Set callback for opening ROM.

Definition at line 44 of file welcome_screen.h.

References open_rom_callback_.

Referenced by yaze::editor::EditorManager::Initialize().

◆ SetNewProjectCallback()

void yaze::editor::WelcomeScreen::SetNewProjectCallback ( std::function< void()> callback)
inline

Set callback for creating new project.

Definition at line 51 of file welcome_screen.h.

References new_project_callback_.

Referenced by yaze::editor::EditorManager::Initialize().

◆ SetNewProjectWithTemplateCallback()

void yaze::editor::WelcomeScreen::SetNewProjectWithTemplateCallback ( std::function< void(const std::string &)> callback)
inline

Set callback for creating project with template.

Definition at line 58 of file welcome_screen.h.

References new_project_with_template_callback_.

Referenced by yaze::editor::EditorManager::Initialize().

◆ SetOpenProjectCallback()

void yaze::editor::WelcomeScreen::SetOpenProjectCallback ( std::function< void(const std::string &)> callback)
inline

Set callback for opening project.

Definition at line 66 of file welcome_screen.h.

References open_project_callback_.

Referenced by yaze::editor::EditorManager::Initialize().

◆ SetOpenAgentCallback()

void yaze::editor::WelcomeScreen::SetOpenAgentCallback ( std::function< void()> callback)
inline

Set callback for opening AI Agent.

Definition at line 74 of file welcome_screen.h.

References open_agent_callback_.

Referenced by yaze::editor::EditorManager::Initialize().

◆ RefreshRecentProjects()

void yaze::editor::WelcomeScreen::RefreshRecentProjects ( )

◆ UpdateAnimations()

void yaze::editor::WelcomeScreen::UpdateAnimations ( )

Update animation time for dynamic effects.

Definition at line 449 of file welcome_screen.cc.

References animation_time_, card_hover_scale_, and hovered_card_.

Referenced by Show().

◆ ShouldShow()

bool yaze::editor::WelcomeScreen::ShouldShow ( ) const
inline

Check if screen should be shown.

Definition at line 91 of file welcome_screen.h.

References manually_closed_.

◆ MarkManuallyClosed()

void yaze::editor::WelcomeScreen::MarkManuallyClosed ( )
inline

Mark as manually closed (don't show again this session)

Definition at line 96 of file welcome_screen.h.

References manually_closed_.

◆ ResetFirstShow()

void yaze::editor::WelcomeScreen::ResetFirstShow ( )
inline

Reset first show flag (for testing/forcing display)

Definition at line 101 of file welcome_screen.h.

References first_show_attempt_.

◆ SetLayoutOffsets()

void yaze::editor::WelcomeScreen::SetLayoutOffsets ( float left,
float right )
inline

Set layout offsets for sidebar awareness.

Parameters
leftLeft sidebar width (0 if hidden)
rightRight panel width (0 if hidden)

Definition at line 108 of file welcome_screen.h.

References left_offset_, and right_offset_.

◆ DrawHeader()

void yaze::editor::WelcomeScreen::DrawHeader ( )
private

Definition at line 513 of file welcome_screen.cc.

References ICON_MD_CASTLE.

Referenced by Show().

◆ DrawQuickActions()

void yaze::editor::WelcomeScreen::DrawQuickActions ( )
private

◆ DrawRecentProjects()

void yaze::editor::WelcomeScreen::DrawRecentProjects ( )
private

Definition at line 626 of file welcome_screen.cc.

References DrawProjectPanel(), ICON_MD_EXPLORE, ICON_MD_HISTORY, and recent_projects_.

Referenced by Show().

Here is the call graph for this function:

◆ DrawProjectPanel()

◆ DrawTemplatesSection()

◆ DrawTipsSection()

void yaze::editor::WelcomeScreen::DrawTipsSection ( )
private

Definition at line 922 of file welcome_screen.cc.

References ICON_MD_CLOSE, ICON_MD_LIGHTBULB, and manually_closed_.

Referenced by Show().

◆ DrawWhatsNew()

void yaze::editor::WelcomeScreen::DrawWhatsNew ( )
private

Member Data Documentation

◆ recent_projects_

std::vector<RecentProject> yaze::editor::WelcomeScreen::recent_projects_
private

Definition at line 122 of file welcome_screen.h.

Referenced by DrawRecentProjects(), and RefreshRecentProjects().

◆ manually_closed_

bool yaze::editor::WelcomeScreen::manually_closed_ = false
private

Definition at line 123 of file welcome_screen.h.

Referenced by DrawTipsSection(), MarkManuallyClosed(), and ShouldShow().

◆ first_show_attempt_

bool yaze::editor::WelcomeScreen::first_show_attempt_ = true
private

Definition at line 124 of file welcome_screen.h.

Referenced by ResetFirstShow(), and Show().

◆ open_rom_callback_

std::function<void()> yaze::editor::WelcomeScreen::open_rom_callback_
private

Definition at line 127 of file welcome_screen.h.

Referenced by DrawQuickActions(), and SetOpenRomCallback().

◆ new_project_callback_

std::function<void()> yaze::editor::WelcomeScreen::new_project_callback_
private

Definition at line 128 of file welcome_screen.h.

Referenced by DrawQuickActions(), DrawTemplatesSection(), and SetNewProjectCallback().

◆ open_project_callback_

std::function<void(const std::string&) yaze::editor::WelcomeScreen::open_project_callback_)
private

Definition at line 129 of file welcome_screen.h.

Referenced by DrawProjectPanel(), and SetOpenProjectCallback().

◆ new_project_with_template_callback_

std::function<void(const std::string&) yaze::editor::WelcomeScreen::new_project_with_template_callback_)
private

Definition at line 130 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and SetNewProjectWithTemplateCallback().

◆ open_agent_callback_

std::function<void()> yaze::editor::WelcomeScreen::open_agent_callback_
private

Definition at line 131 of file welcome_screen.h.

Referenced by DrawQuickActions(), and SetOpenAgentCallback().

◆ selected_template_

int yaze::editor::WelcomeScreen::selected_template_ = 0
private

Definition at line 134 of file welcome_screen.h.

Referenced by DrawTemplatesSection().

◆ kMaxRecentProjects

constexpr int yaze::editor::WelcomeScreen::kMaxRecentProjects = 6
staticconstexprprivate

Definition at line 135 of file welcome_screen.h.

Referenced by RefreshRecentProjects().

◆ animation_time_

float yaze::editor::WelcomeScreen::animation_time_ = 0.0f
private

Definition at line 138 of file welcome_screen.h.

Referenced by Show(), and UpdateAnimations().

◆ card_hover_scale_

float yaze::editor::WelcomeScreen::card_hover_scale_[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}
private

Definition at line 139 of file welcome_screen.h.

Referenced by DrawProjectPanel(), and UpdateAnimations().

◆ hovered_card_

int yaze::editor::WelcomeScreen::hovered_card_ = -1
private

Definition at line 140 of file welcome_screen.h.

Referenced by DrawProjectPanel(), and UpdateAnimations().

◆ kNumTriforces

constexpr int yaze::editor::WelcomeScreen::kNumTriforces = 6
staticconstexprprivate

Definition at line 143 of file welcome_screen.h.

Referenced by Show().

◆ triforce_positions_

ImVec2 yaze::editor::WelcomeScreen::triforce_positions_[kNumTriforces] = {}
private

Definition at line 144 of file welcome_screen.h.

Referenced by Show().

◆ triforce_base_positions_

ImVec2 yaze::editor::WelcomeScreen::triforce_base_positions_[kNumTriforces] = {}
private

Definition at line 145 of file welcome_screen.h.

Referenced by Show().

◆ triforce_positions_initialized_

bool yaze::editor::WelcomeScreen::triforce_positions_initialized_ = false
private

Definition at line 146 of file welcome_screen.h.

Referenced by Show().

◆ kMaxParticles

constexpr int yaze::editor::WelcomeScreen::kMaxParticles = 50
staticconstexprprivate

Definition at line 149 of file welcome_screen.h.

Referenced by Show().

◆ particles_

Particle yaze::editor::WelcomeScreen::particles_[kMaxParticles] = {}
private

Definition at line 158 of file welcome_screen.h.

Referenced by Show().

◆ active_particle_count_

int yaze::editor::WelcomeScreen::active_particle_count_ = 0
private

Definition at line 159 of file welcome_screen.h.

Referenced by Show().

◆ show_triforce_settings_

bool yaze::editor::WelcomeScreen::show_triforce_settings_ = false
private

Definition at line 162 of file welcome_screen.h.

Referenced by DrawTemplatesSection().

◆ triforce_alpha_multiplier_

float yaze::editor::WelcomeScreen::triforce_alpha_multiplier_ = 1.0f
private

Definition at line 163 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and Show().

◆ triforce_speed_multiplier_

float yaze::editor::WelcomeScreen::triforce_speed_multiplier_ = 0.3f
private

Definition at line 164 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and Show().

◆ triforce_size_multiplier_

float yaze::editor::WelcomeScreen::triforce_size_multiplier_ = 1.0f
private

Definition at line 165 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and Show().

◆ triforce_mouse_repel_enabled_

bool yaze::editor::WelcomeScreen::triforce_mouse_repel_enabled_ = true
private

Definition at line 166 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and Show().

◆ particles_enabled_

bool yaze::editor::WelcomeScreen::particles_enabled_ = true
private

Definition at line 167 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and Show().

◆ particle_spawn_rate_

float yaze::editor::WelcomeScreen::particle_spawn_rate_ = 2.0f
private

Definition at line 168 of file welcome_screen.h.

Referenced by DrawTemplatesSection(), and Show().

◆ left_offset_

float yaze::editor::WelcomeScreen::left_offset_ = 0.0f
private

Definition at line 171 of file welcome_screen.h.

Referenced by SetLayoutOffsets(), and Show().

◆ right_offset_

float yaze::editor::WelcomeScreen::right_offset_ = 0.0f
private

Definition at line 172 of file welcome_screen.h.

Referenced by SetLayoutOffsets(), and Show().


The documentation for this class was generated from the following files: