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
10#include "imgui/imgui.h"
11#include "rom/rom.h"
13
14namespace yaze::editor {
15
16class WorkspaceWindowManager;
17
20 static constexpr const char* kCanvas = "overworld.canvas";
21 static constexpr const char* kTile16Editor = "overworld.tile16_editor";
22 static constexpr const char* kTile16Selector = "overworld.tile16_selector";
23 static constexpr const char* kTile8Selector = "overworld.tile8_selector";
24 static constexpr const char* kAreaGraphics = "overworld.area_graphics";
25 static constexpr const char* kGfxGroups = "overworld.gfx_groups";
26 static constexpr const char* kUsageStats = "overworld.usage_stats";
27 static constexpr const char* kItemList = "overworld.item_list";
28 static constexpr const char* kScratchSpace = "overworld.scratch";
29 static constexpr const char* kMapProperties = "overworld.properties";
30 static constexpr const char* kV3Settings = "overworld.v3_settings";
31 static constexpr const char* kDebugWindow = "overworld.debug";
32};
33
35 public:
36 OverworldToolbar() = default;
37
38 void Draw(int& current_world, int& current_map, bool& current_map_lock,
39 EditingMode& current_mode, EntityEditMode& entity_edit_mode,
40 WorkspaceWindowManager* window_manager, bool has_selection,
41 bool scratch_has_data, Rom* rom, zelda3::Overworld* overworld);
42
43 // Callback for when properties change
44 std::function<void()> on_property_changed;
45 std::function<void()> on_refresh_graphics;
46 std::function<void()> on_refresh_palette;
47 std::function<void()> on_refresh_map;
48 std::function<void(int)> on_world_changed;
49 std::function<void()> on_toggle_overlay_preview;
50 std::function<bool()> is_overlay_preview_enabled;
51
52 // Scratch space callbacks
53 std::function<void()> on_save_to_scratch;
54 std::function<void()> on_load_from_scratch;
55
56 // ROM version upgrade callback
57 std::function<void(int)> on_upgrade_rom_version;
58};
59
60} // namespace yaze::editor
61
62#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
std::function< bool()> is_overlay_preview_enabled
std::function< void(int)> on_world_changed
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)
std::function< void()> on_toggle_overlay_preview
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:261
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