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

#include <overworld_toolbar.h>

Collaboration diagram for yaze::editor::OverworldToolbar:

Public Member Functions

 OverworldToolbar ()=default
 
void Draw (int &current_world, int &current_map, bool &current_map_lock, EditingMode &current_mode, EntityEditMode &entity_edit_mode, WorkspaceWindowManager *window_manager, Rom *rom, zelda3::Overworld *overworld, project::YazeProject *project, int game_state, const std::function< void()> &draw_appearance={})
 

Public Attributes

ShortcutManager * shortcuts = nullptr
 Used for shortcut hints in tooltips (GetDisplayString).
 
std::function< void(int)> on_world_changed
 
std::function< void(int)> on_story_changed
 
std::function< void(EditingMode)> on_set_mode
 
std::function< void(EntityEditMode)> on_set_entity_mode
 
std::function< void()> on_insert_item
 
std::function< void()> on_open_map_properties
 
std::function< void()> on_toggle_overlay_preview
 
std::function< bool()> is_overlay_preview_enabled
 
std::function< void()> on_toggle_grid
 
std::function< bool()> is_grid_visible
 
std::function< void()> on_toggle_entities
 
std::function< bool()> are_entities_visible
 
std::function< void()> on_zoom_in
 
std::function< void()> on_zoom_out
 
std::function< void()> on_zoom_fit
 
std::function< void()> on_center_map
 
std::function< float()> get_zoom
 
std::function< void(int)> on_upgrade_rom_version
 

Private Member Functions

std::string WithHint (const char *text, const char *shortcut_name) const
 "Label (Shortcut)" when the shortcut is bound, else "Label".
 
void DrawViewControls (bool in_menu)
 

Detailed Description

Canvas navigation, labeled drawing tools, view controls and editing windows. One row at every dock width; narrow docks expose tools through overflow. Graphics, palette and story preview remain directly on the canvas bar.

Definition at line 41 of file overworld_toolbar.h.

Constructor & Destructor Documentation

◆ OverworldToolbar()

yaze::editor::OverworldToolbar::OverworldToolbar ( )
default

Member Function Documentation

◆ Draw()

void yaze::editor::OverworldToolbar::Draw ( int & current_world,
int & current_map,
bool & current_map_lock,
EditingMode & current_mode,
EntityEditMode & entity_edit_mode,
WorkspaceWindowManager * window_manager,
Rom * rom,
zelda3::Overworld * overworld,
project::YazeProject * project,
int game_state,
const std::function< void()> & draw_appearance = {} )

Definition at line 165 of file overworld_toolbar.cc.

References yaze::editor::BuildOverworldMapMetadata(), yaze::editor::DRAW_TILE, DrawViewControls(), yaze::editor::FILL_TILE, yaze::editor::WorkspaceWindowManager::GetActiveSessionId(), yaze::editor::ShortcutManager::GetDisplayString(), yaze::zelda3::OverworldVersionHelper::GetVersion(), ICON_MD_ANALYTICS, ICON_MD_AUTO_FIX_HIGH, ICON_MD_DRAW, ICON_MD_EDIT, ICON_MD_FORMAT_COLOR_FILL, ICON_MD_GPS_FIXED, ICON_MD_GRASS, ICON_MD_GRID_ON, ICON_MD_GRID_VIEW, ICON_MD_IMAGE, ICON_MD_LAYERS, ICON_MD_LIST, ICON_MD_MORE_HORIZ, ICON_MD_MOUSE, ICON_MD_PLACE, ICON_MD_PUSH_PIN, ICON_MD_TUNE, ICON_MD_UPGRADE, ICON_MD_VISIBILITY, ICON_MD_WINDOW, yaze::gui::WidgetIdRegistry::Instance(), yaze::zelda3::Overworld::is_loaded(), yaze::editor::WorkspaceWindowManager::IsWindowOpen(), yaze::editor::ITEMS, yaze::editor::OverworldPanelIds::kAreaGraphics, yaze::editor::kGameStateNames, yaze::editor::OverworldPanelIds::kGfxGroups, yaze::editor::OverworldPanelIds::kItemList, yaze::editor::OverworldPanelIds::kMapProperties, yaze::editor::OverworldPanelIds::kScratchSpace, yaze::editor::OverworldPanelIds::kTile16Editor, yaze::editor::OverworldPanelIds::kTile16Selector, yaze::editor::OverworldPanelIds::kTile8Selector, yaze::editor::OverworldPanelIds::kUsageStats, yaze::zelda3::kVanilla, yaze::editor::kWorldNames, yaze::editor::MOUSE, yaze::editor::NONE, on_insert_item, on_open_map_properties, on_set_entity_mode, on_set_mode, on_story_changed, on_upgrade_rom_version, on_world_changed, yaze::zelda3::Overworld::overworld_map(), yaze::gui::WidgetIdRegistry::RegisterWidget(), shortcuts, yaze::gui::ThemedIconButton(), yaze::gui::ToggleButton(), yaze::editor::WorkspaceWindowManager::ToggleWindow(), and WithHint().

◆ WithHint()

std::string yaze::editor::OverworldToolbar::WithHint ( const char * text,
const char * shortcut_name ) const
private

"Label (Shortcut)" when the shortcut is bound, else "Label".

Definition at line 66 of file overworld_toolbar.cc.

References yaze::editor::ShortcutManager::GetDisplayString(), and shortcuts.

Referenced by Draw(), and DrawViewControls().

Here is the call graph for this function:

◆ DrawViewControls()

Member Data Documentation

◆ shortcuts

ShortcutManager* yaze::editor::OverworldToolbar::shortcuts = nullptr

Used for shortcut hints in tooltips (GetDisplayString).

Definition at line 52 of file overworld_toolbar.h.

Referenced by Draw(), DrawViewControls(), and WithHint().

◆ on_world_changed

std::function<void(int)> yaze::editor::OverworldToolbar::on_world_changed

Definition at line 54 of file overworld_toolbar.h.

Referenced by Draw().

◆ on_story_changed

std::function<void(int)> yaze::editor::OverworldToolbar::on_story_changed

Definition at line 55 of file overworld_toolbar.h.

Referenced by Draw().

◆ on_set_mode

std::function<void(EditingMode)> yaze::editor::OverworldToolbar::on_set_mode

Definition at line 56 of file overworld_toolbar.h.

Referenced by Draw().

◆ on_set_entity_mode

std::function<void(EntityEditMode)> yaze::editor::OverworldToolbar::on_set_entity_mode

Definition at line 57 of file overworld_toolbar.h.

Referenced by Draw().

◆ on_insert_item

std::function<void()> yaze::editor::OverworldToolbar::on_insert_item

Definition at line 58 of file overworld_toolbar.h.

Referenced by Draw().

◆ on_open_map_properties

std::function<void()> yaze::editor::OverworldToolbar::on_open_map_properties

Definition at line 59 of file overworld_toolbar.h.

Referenced by Draw().

◆ on_toggle_overlay_preview

std::function<void()> yaze::editor::OverworldToolbar::on_toggle_overlay_preview

Definition at line 62 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ is_overlay_preview_enabled

std::function<bool()> yaze::editor::OverworldToolbar::is_overlay_preview_enabled

Definition at line 63 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_toggle_grid

std::function<void()> yaze::editor::OverworldToolbar::on_toggle_grid

Definition at line 64 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ is_grid_visible

std::function<bool()> yaze::editor::OverworldToolbar::is_grid_visible

Definition at line 65 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_toggle_entities

std::function<void()> yaze::editor::OverworldToolbar::on_toggle_entities

Definition at line 66 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ are_entities_visible

std::function<bool()> yaze::editor::OverworldToolbar::are_entities_visible

Definition at line 67 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_zoom_in

std::function<void()> yaze::editor::OverworldToolbar::on_zoom_in

Definition at line 68 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_zoom_out

std::function<void()> yaze::editor::OverworldToolbar::on_zoom_out

Definition at line 69 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_zoom_fit

std::function<void()> yaze::editor::OverworldToolbar::on_zoom_fit

Definition at line 70 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_center_map

std::function<void()> yaze::editor::OverworldToolbar::on_center_map

Definition at line 71 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ get_zoom

std::function<float()> yaze::editor::OverworldToolbar::get_zoom

Definition at line 72 of file overworld_toolbar.h.

Referenced by DrawViewControls().

◆ on_upgrade_rom_version

std::function<void(int)> yaze::editor::OverworldToolbar::on_upgrade_rom_version

Definition at line 75 of file overworld_toolbar.h.

Referenced by Draw().


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