1#ifndef YAZE_APP_EDITOR_OVERWORLD_MAP_PROPERTIES_H
2#define YAZE_APP_EDITOR_OVERWORLD_MAP_PROPERTIES_H
9#include "absl/status/status.h"
10#include "absl/status/statusor.h"
25struct SharedClipboard;
43 const std::vector<OverworldPropertyEdit>&,
const std::string&)>;
45 std::function<absl::Status(
const std::string&,
int,
const std::string&)>;
49 std::array<gfx::Bitmap, zelda3::kExpandedMapCount>* maps_bmp =
nullptr,
50 gui::Canvas* canvas =
nullptr,
int* game_state =
nullptr)
104 std::function<
void()> reset_view, std::function<
void()> zoom_in,
105 std::function<
void()> zoom_out, std::function<
void()> zoom_fit =
nullptr,
106 std::function<
void()> center_map =
nullptr) {
117 std::function<std::string(
const char*)> provider) {
159 bool& show_custom_bg_color_editor);
165 bool show_overlay_preview);
172 bool& current_map_lock,
int current_mode = 0,
178 const std::vector<OverworldPropertyEdit>& edits,
179 const std::string& description = {});
182 const OverworldPropertyEdit& edit)
const;
184 const OverworldPropertyEdit& edit)
const;
213 std::array<gfx::Bitmap, zelda3::kExpandedMapCount>*
maps_bmp_;
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
void RefreshMapProperties(int map_id)
ResourceLabelEditCallback resource_label_edit_callback_
void PrepareMapForGraphicsRefresh(int map_index)
absl::Status ApplyPropertyEdit(const OverworldPropertyEdit &edit)
RefreshCallback refresh_overworld_map_
RefreshMapCallback refresh_map_properties_
std::function< void()> RefreshCallback
RefreshMapPaletteCallback refresh_map_palette_
std::function< void()> reset_view_callback_
std::function< void()> center_map_callback_
void SetPropertyEditCallback(PropertyEditCallback callback)
void SetMapJumpCallback(std::function< void(int)> callback)
void DrawOverlayEditor(int current_map, bool &show_overlay_editor)
PropertyEditBatchCallback property_edit_batch_callback_
void SetShortcutHintProvider(std::function< std::string(const char *)> provider)
std::function< void(int, bool)> map_selection_callback_
void RefreshOverworldMap()
std::function< std::string(const char *) shortcut_hint_)
ContextViewToggle overlay_toggle_
std::function< void()> zoom_out_callback_
RefreshPaletteCallback refresh_tile16_blockset_
void DrawOverlayPreviewOnMap(int current_map, int current_world, bool show_overlay_preview)
std::function< bool(const OverworldContextTarget &) sample_tile16_callback_)
absl::Status ApplyPropertyEdits(const std::vector< OverworldPropertyEdit > &edits, const std::string &description={})
absl::Status CheckPropertyEditSupported(const OverworldPropertyEdit &edit) const
std::function< void(int)> map_jump_callback_
void SetResourceLabelEditCallback(ResourceLabelEditCallback callback)
std::function< void(const std::string &, const OverworldContextTarget &) entity_insert_callback_)
std::function< void(const OverworldContextTarget &) edit_graphics_callback_)
absl::Status RefreshMapPalette(int map_id)
void SetContextViewToggles(ContextViewToggle grid, ContextViewToggle entities, ContextViewToggle overlay_preview)
std::function< void(int)> ForceRefreshGraphicsCallback
ContextViewToggle grid_toggle_
std::function< void()> zoom_fit_callback_
absl::Status RefreshTile16Blockset()
void SetOpenMapPropertiesCallback(std::function< void()> callback)
Opens (and focuses) the Map Properties window for the selected map.
void SetContextNavigationCallbacks(std::function< void()> reset_view, std::function< void()> zoom_in, std::function< void()> zoom_out, std::function< void()> zoom_fit=nullptr, std::function< void()> center_map=nullptr)
void SetPropertyEditBatchCallback(PropertyEditBatchCallback callback)
void SetEntityCallbacks(std::function< void(const std::string &, const OverworldContextTarget &)> insert_callback)
std::function< void(int)> RefreshMapCallback
std::function< void()> zoom_in_callback_
void SetRefreshCallbacks(RefreshMapCallback refresh_map_properties, RefreshCallback refresh_overworld_map, RefreshMapPaletteCallback refresh_map_palette, RefreshPaletteCallback refresh_tile16_blockset=nullptr, ForceRefreshGraphicsCallback force_refresh_graphics=nullptr)
ContextViewToggle entities_toggle_
int CurrentGameState() const
std::function< void(const OverworldContextTarget &) edit_tile16_callback_)
void SetCurrentGameState(int game_state)
void SetTile16SampleCallback(std::function< bool(const OverworldContextTarget &)> callback)
void DrawCustomBackgroundColorEditor(int current_map, bool &show_custom_bg_color_editor)
std::array< gfx::Bitmap, zelda3::kExpandedMapCount > * maps_bmp_
void SetCurrentMapProvider(std::function< int()> provider)
Current map id; hides "Select This Map" when its area is current.
std::function< absl::Status(const OverworldPropertyEdit &)> PropertyEditCallback
absl::StatusOr< int > ReadPropertyValue(const OverworldPropertyEdit &edit) const
std::function< absl::Status( const std::vector< OverworldPropertyEdit > &, const std::string &)> PropertyEditBatchCallback
std::function< void()> open_map_properties_callback_
void SetTile16EditCallback(std::function< void(const OverworldContextTarget &)> callback)
void SetupCanvasContextMenu(gui::Canvas &canvas, const OverworldContextTarget &target, bool ¤t_map_lock, int current_mode=0, project::YazeProject *project=nullptr, SharedClipboard *shared_clipboard=nullptr)
std::function< absl::Status(const std::string &, int, const std::string &)> ResourceLabelEditCallback
absl::Status ApplyPropertyEditDirect(const OverworldPropertyEdit &edit)
std::function< absl::Status(int)> RefreshMapPaletteCallback
zelda3::Overworld * overworld_
void SetMapSelectionCallback(std::function< void(int, bool)> callback)
void ForceRefreshGraphics(int map_index)
std::function< int()> current_map_provider_
std::function< absl::Status()> RefreshPaletteCallback
void RefreshSiblingMapGraphics(int map_index, bool include_self=false)
ForceRefreshGraphicsCallback force_refresh_graphics_
std::string GetOverlayDescription(uint16_t overlay_id)
PropertyEditCallback property_edit_callback_
MapPropertiesSystem(zelda3::Overworld *overworld, Rom *rom, std::array< gfx::Bitmap, zelda3::kExpandedMapCount > *maps_bmp=nullptr, gui::Canvas *canvas=nullptr, int *game_state=nullptr)
void SetTile16GraphicsCallback(std::function< void(const OverworldContextTarget &)> callback)
Modern, robust canvas for drawing and manipulating graphics.
A View-menu toggle that mirrors a toolbar toggle.
std::function< void()> toggle
std::function< bool()> is_on
Modern project structure with comprehensive settings consolidation.