yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_toolbar.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_TOOLBAR_H
2#define YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_TOOLBAR_H
3
4#include <functional>
5#include <string>
6
7#include "absl/status/status.h"
10#include "app/gui/core/icons.h"
12#include "imgui/imgui.h"
13#include "rom/rom.h"
15
16namespace yaze::project {
17struct YazeProject;
18} // namespace yaze::project
19
20namespace yaze::editor {
21
22class WorkspaceWindowManager;
23struct SharedClipboard;
24
27 static constexpr const char* kCanvas = "overworld.canvas";
28 static constexpr const char* kTile16Editor = "overworld.tile16_editor";
29 static constexpr const char* kTile16Selector = "overworld.tile16_selector";
30 static constexpr const char* kTile8Selector = "overworld.tile8_selector";
31 static constexpr const char* kAreaGraphics = "overworld.area_graphics";
32 static constexpr const char* kGfxGroups = "overworld.gfx_groups";
33 static constexpr const char* kUsageStats = "overworld.usage_stats";
34 static constexpr const char* kItemList = "overworld.item_list";
35 static constexpr const char* kScratchSpace = "overworld.scratch";
36 static constexpr const char* kMapProperties = "overworld.properties";
37 static constexpr const char* kV3Settings = "overworld.v3_settings";
38 static constexpr const char* kDebugWindow = "overworld.debug";
39};
40
42 public:
43 OverworldToolbar() = default;
44
45 void Draw(int& current_world, int& current_map, bool& current_map_lock,
46 EditingMode& current_mode, EntityEditMode& entity_edit_mode,
47 WorkspaceWindowManager* window_manager, bool has_selection,
48 bool scratch_has_data, Rom* rom, zelda3::Overworld* overworld,
49 project::YazeProject* project, int game_state,
50 SharedClipboard* shared_clipboard = nullptr);
51
52 // Callback for when properties change
53 std::function<void()> on_property_changed;
54 std::function<void()> on_refresh_graphics;
55 std::function<void()> on_refresh_palette;
56 std::function<void()> on_refresh_map;
57 std::function<void(int)> on_world_changed;
58 std::function<void()> on_toggle_overlay_preview;
59 std::function<bool()> is_overlay_preview_enabled;
60 std::function<absl::Status(const OverworldPropertyEdit&)>
62 std::function<absl::Status(const std::string&, int, const std::string&)>
64
65 // Scratch space callbacks
66 std::function<void()> on_save_to_scratch;
67 std::function<void()> on_load_from_scratch;
68
69 // ROM version upgrade callback
70 std::function<void(int)> on_upgrade_rom_version;
71};
72
73} // namespace yaze::editor
74
75#endif // YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_TOOLBAR_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:28
std::function< void()> on_refresh_map
std::function< void()> on_property_changed
std::function< void()> on_refresh_graphics
std::function< void()> on_load_from_scratch
std::function< void()> on_save_to_scratch
std::function< void(int)> on_upgrade_rom_version
void Draw(int &current_world, int &current_map, bool &current_map_lock, EditingMode &current_mode, EntityEditMode &entity_edit_mode, WorkspaceWindowManager *window_manager, bool has_selection, bool scratch_has_data, Rom *rom, zelda3::Overworld *overworld, project::YazeProject *project, int game_state, SharedClipboard *shared_clipboard=nullptr)
std::function< bool()> is_overlay_preview_enabled
std::function< void(int)> on_world_changed
std::function< absl::Status(const std::string &, int, const std::string &) on_rename_resource_label)
std::function< void()> on_toggle_overlay_preview
std::function< absl::Status(const OverworldPropertyEdit &) on_apply_property_edit)
std::function< void()> on_refresh_palette
Central registry for all editor cards with session awareness and dependency injection.
Represents the full Overworld data, light and dark world.
Definition overworld.h:389
Editors are the view controllers for the application.
Panel IDs for overworld editor panels.
static constexpr const char * kMapProperties
static constexpr const char * kTile8Selector
static constexpr const char * kAreaGraphics
static constexpr const char * kV3Settings
static constexpr const char * kItemList
static constexpr const char * kScratchSpace
static constexpr const char * kTile16Editor
static constexpr const char * kTile16Selector
static constexpr const char * kCanvas
static constexpr const char * kDebugWindow
static constexpr const char * kGfxGroups
static constexpr const char * kUsageStats
Modern project structure with comprehensive settings consolidation.
Definition project.h:172