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

Ultra-compact toolbar that merges mode buttons with settings. More...

#include <editor_layout.h>

Public Member Functions

 Toolset ()=default
 
void Begin ()
 
void End ()
 
void BeginModeGroup ()
 
bool ModeButton (const char *icon, bool selected, const char *tooltip)
 
void EndModeGroup ()
 
void AddSeparator ()
 
void AddRomBadge (uint8_t version, std::function< void()> on_upgrade=nullptr)
 
bool AddProperty (const char *icon, const char *label, uint8_t *value, std::function< void()> on_change=nullptr)
 
bool AddProperty (const char *icon, const char *label, uint16_t *value, std::function< void()> on_change=nullptr)
 
bool AddCombo (const char *icon, int *current, const char *const items[], int count)
 
bool AddToggle (const char *icon, bool *state, const char *tooltip)
 
bool AddAction (const char *icon, const char *tooltip)
 
bool BeginCollapsibleSection (const char *label, bool *p_open)
 
void EndCollapsibleSection ()
 
void AddV3StatusBadge (uint8_t version, std::function< void()> on_settings)
 
bool AddUsageStatsButton (const char *tooltip)
 
int GetButtonCount () const
 

Private Attributes

bool in_toolbar_ = false
 
bool in_section_ = false
 
int button_count_ = 0
 
float current_line_width_ = 0.0f
 
float mode_group_button_size_ = 0.0f
 

Detailed Description

Ultra-compact toolbar that merges mode buttons with settings.

Design Philosophy:

  • Single horizontal bar with everything inline
  • Small icon-only buttons for modes
  • Inline property editing (InputHex with scroll)
  • No wasted vertical space
  • Beautiful, modern appearance

Layout: [Mode Icons] | [ROM Badge] [World] [GFX] [Pal] [Spr] ... | [Quick Actions]

Definition at line 26 of file editor_layout.h.

Constructor & Destructor Documentation

◆ Toolset()

yaze::gui::Toolset::Toolset ( )
default

Member Function Documentation

◆ Begin()

◆ End()

◆ BeginModeGroup()

void yaze::gui::Toolset::BeginModeGroup ( )

Definition at line 44 of file editor_layout.cc.

References mode_group_button_size_.

Referenced by yaze::editor::OverworldEditor::DrawToolset().

◆ ModeButton()

bool yaze::gui::Toolset::ModeButton ( const char *  icon,
bool  selected,
const char *  tooltip 
)

Definition at line 67 of file editor_layout.cc.

References button_count_, yaze::gui::GetAccentColor(), and mode_group_button_size_.

Referenced by yaze::editor::OverworldEditor::DrawToolset().

Here is the call graph for this function:

◆ EndModeGroup()

void yaze::gui::Toolset::EndModeGroup ( )

Definition at line 90 of file editor_layout.cc.

References AddSeparator().

Referenced by yaze::editor::OverworldEditor::DrawToolset().

Here is the call graph for this function:

◆ AddSeparator()

void yaze::gui::Toolset::AddSeparator ( )

◆ AddRomBadge()

void yaze::gui::Toolset::AddRomBadge ( uint8_t  version,
std::function< void()>  on_upgrade = nullptr 
)

Definition at line 103 of file editor_layout.cc.

References ICON_MD_UPGRADE, and yaze::gui::RomVersionBadge().

Referenced by yaze::editor::OverworldEditor::DrawToolset().

Here is the call graph for this function:

◆ AddProperty() [1/2]

bool yaze::gui::Toolset::AddProperty ( const char *  icon,
const char *  label,
uint8_t *  value,
std::function< void()>  on_change = nullptr 
)

Definition at line 121 of file editor_layout.cc.

References yaze::gui::InputHexByte().

Referenced by yaze::editor::OverworldEditor::DrawToolset().

Here is the call graph for this function:

◆ AddProperty() [2/2]

bool yaze::gui::Toolset::AddProperty ( const char *  icon,
const char *  label,
uint16_t *  value,
std::function< void()>  on_change = nullptr 
)

Definition at line 137 of file editor_layout.cc.

References yaze::gui::InputHexWord().

Here is the call graph for this function:

◆ AddCombo()

bool yaze::gui::Toolset::AddCombo ( const char *  icon,
int *  current,
const char *const  items[],
int  count 
)

Definition at line 153 of file editor_layout.cc.

◆ AddToggle()

bool yaze::gui::Toolset::AddToggle ( const char *  icon,
bool *  state,
const char *  tooltip 
)

Definition at line 165 of file editor_layout.cc.

References yaze::gui::ToggleIconButton().

Referenced by yaze::editor::DungeonEditorV2::DrawToolset(), and yaze::editor::OverworldEditor::DrawToolset().

Here is the call graph for this function:

◆ AddAction()

◆ BeginCollapsibleSection()

bool yaze::gui::Toolset::BeginCollapsibleSection ( const char *  label,
bool *  p_open 
)

Definition at line 189 of file editor_layout.cc.

References in_section_.

◆ EndCollapsibleSection()

void yaze::gui::Toolset::EndCollapsibleSection ( )

Definition at line 197 of file editor_layout.cc.

References in_section_.

◆ AddV3StatusBadge()

void yaze::gui::Toolset::AddV3StatusBadge ( uint8_t  version,
std::function< void()>  on_settings 
)

Definition at line 201 of file editor_layout.cc.

References yaze::gui::Default, ICON_MD_TUNE, ICON_MD_UPGRADE, yaze::gui::StatusBadge(), and yaze::gui::Success.

Here is the call graph for this function:

◆ AddUsageStatsButton()

bool yaze::gui::Toolset::AddUsageStatsButton ( const char *  tooltip)

Definition at line 218 of file editor_layout.cc.

References ICON_MD_ANALYTICS.

Referenced by yaze::editor::OverworldEditor::DrawToolset().

◆ GetButtonCount()

int yaze::gui::Toolset::GetButtonCount ( ) const
inline

Definition at line 73 of file editor_layout.h.

References button_count_.

Member Data Documentation

◆ in_toolbar_

bool yaze::gui::Toolset::in_toolbar_ = false
private

Definition at line 76 of file editor_layout.h.

Referenced by Begin(), and End().

◆ in_section_

bool yaze::gui::Toolset::in_section_ = false
private

Definition at line 77 of file editor_layout.h.

Referenced by BeginCollapsibleSection(), and EndCollapsibleSection().

◆ button_count_

int yaze::gui::Toolset::button_count_ = 0
private

Definition at line 78 of file editor_layout.h.

Referenced by Begin(), GetButtonCount(), and ModeButton().

◆ current_line_width_

float yaze::gui::Toolset::current_line_width_ = 0.0f
private

Definition at line 79 of file editor_layout.h.

Referenced by Begin(), and End().

◆ mode_group_button_size_

float yaze::gui::Toolset::mode_group_button_size_ = 0.0f
private

Definition at line 80 of file editor_layout.h.

Referenced by BeginModeGroup(), and ModeButton().


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