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

Handles all canvas drawing and panel rendering for the overworld editor. More...

#include <overworld_canvas_renderer.h>

Collaboration diagram for yaze::editor::OverworldCanvasRenderer:

Public Member Functions

 OverworldCanvasRenderer (OverworldEditor *editor)
 
void DrawOverworldCanvas ()
 Draw the main overworld canvas with toolbar, maps, and entities. This is the primary entry point called from the OverworldCanvasPanel.
 
absl::Status DrawTile16Selector ()
 Draw the tile16 selector panel.
 
void DrawTile8Selector ()
 Draw the tile8 selector panel (graphics bin)
 
absl::Status DrawAreaGraphics ()
 Draw the area graphics panel.
 
void DrawV3Settings ()
 Draw the v3 settings panel.
 
void DrawMapProperties ()
 Draw the map properties panel (sidebar-based)
 
void DrawOverworldProperties ()
 Draw the overworld properties grid (debug/info view)
 

Private Member Functions

void DrawOverworldMaps ()
 Render the 64 overworld map bitmaps to the canvas.
 

Private Attributes

OverworldEditoreditor_
 Non-owning pointer to the parent editor.
 

Detailed Description

Handles all canvas drawing and panel rendering for the overworld editor.

Extracted from OverworldEditor to separate rendering concerns from editing logic. This class handles:

  • Main overworld canvas drawing (map bitmaps, entities, tile edits)
  • Panel rendering (tile16 selector, tile8 selector, area graphics, etc.)
  • Properties panel rendering

All state is accessed through a pointer to the owning OverworldEditor. The renderer is declared as a friend class of OverworldEditor for direct member access.

Definition at line 26 of file overworld_canvas_renderer.h.

Constructor & Destructor Documentation

◆ OverworldCanvasRenderer()

yaze::editor::OverworldCanvasRenderer::OverworldCanvasRenderer ( OverworldEditor * editor)
explicit

Definition at line 43 of file overworld_canvas_renderer.cc.

Member Function Documentation

◆ DrawOverworldCanvas()

void yaze::editor::OverworldCanvasRenderer::DrawOverworldCanvas ( )

Draw the main overworld canvas with toolbar, maps, and entities. This is the primary entry point called from the OverworldCanvasPanel.

Definition at line 50 of file overworld_canvas_renderer.cc.

References yaze::gui::AcceptTileDrop(), yaze::gui::BeginCanvas(), yaze::gui::BeginChildBothScrollbars(), yaze::gui::BeginNoPadding(), yaze::gui::CanvasFrameOptions::canvas_size, yaze::editor::OverworldEditor::CheckForCurrentMap(), yaze::editor::OverworldEditor::CheckForOverworldEdits(), yaze::gui::Canvas::ClearContextMenuItems(), yaze::editor::OverworldEditor::current_map_, yaze::editor::OverworldEditor::current_map_lock_, yaze::editor::OverworldEditor::current_mode, yaze::editor::OverworldEditor::current_tile16_, yaze::editor::OverworldEditor::current_world_, yaze::editor::Editor::dependencies_, yaze::editor::OverworldEditor::dragged_entity_, yaze::editor::OverworldEditor::dragged_entity_free_movement_, yaze::gui::CanvasFrameOptions::draw_context_menu, yaze::gui::CanvasFrameOptions::draw_grid, yaze::gui::CanvasFrameOptions::draw_overlay, yaze::editor::DRAW_TILE, DrawOverworldMaps(), editor_, yaze::gui::EndCanvas(), yaze::gui::EndNoPadding(), yaze::editor::OverworldEditor::entity_edit_mode_, yaze::editor::OverworldEditor::entity_renderer_, yaze::zelda3::GameEntity::entity_type_, yaze::editor::FILL_TILE, yaze::editor::OverworldEditor::game_state_, yaze::gui::CanvasFrameOptions::grid_step, yaze::editor::OverworldEditor::HandleMapInteraction(), yaze::editor::OverworldEditor::HandleOverworldPan(), yaze::editor::OverworldEditor::HandleOverworldZoom(), yaze::editor::OverworldEditor::ScratchSpace::in_use, yaze::editor::OverworldEditor::is_dragging_entity_, yaze::Rom::is_loaded(), yaze::zelda3::Overworld::is_loaded(), yaze::gui::kEntityManipulation, yaze::zelda3::GameEntity::kExit, yaze::editor::kOverworldCanvasSize(), yaze::gui::kTilePainting, yaze::zelda3::GameEntity::map_id_, yaze::editor::OverworldEditor::map_properties_system_, yaze::editor::MOUSE, yaze::editor::MoveEntityOnGrid(), yaze::editor::OverworldEditor::overworld_, yaze::editor::OverworldEditor::ow_map_canvas_, yaze::editor::EditorDependencies::panel_manager, yaze::gui::CanvasFrameOptions::render_popups, yaze::editor::OverworldEditor::rom_, yaze::editor::OverworldEditor::scratch_space_, yaze::gui::Canvas::select_rect_active(), yaze::gui::Canvas::selected_tiles(), yaze::Rom::set_dirty(), yaze::gui::Canvas::set_scrolling(), yaze::gui::Canvas::SetUsageMode(), yaze::editor::OverworldEditor::show_custom_bg_color_editor_, yaze::editor::OverworldEditor::show_map_properties_panel_, yaze::editor::OverworldEditor::show_overlay_editor_, yaze::editor::OverworldEditor::show_overlay_preview_, yaze::editor::OverworldEditor::status_, yaze::gui::TileDragPayload::tile_id, yaze::editor::OverworldEditor::toolbar_, yaze::zelda3::GameEntity::UpdateMapProperties(), yaze::gui::CanvasFrameOptions::use_child_window, yaze::zelda3::GameEntity::x_, and yaze::zelda3::GameEntity::y_.

◆ DrawTile16Selector()

◆ DrawTile8Selector()

◆ DrawAreaGraphics()

◆ DrawV3Settings()

void yaze::editor::OverworldCanvasRenderer::DrawV3Settings ( )

Draw the v3 settings panel.

Todo
Implement v3 settings UI

Definition at line 466 of file overworld_canvas_renderer.cc.

References yaze::gui::CenterText(), editor_, yaze::Rom::is_loaded(), and yaze::editor::OverworldEditor::rom_.

Here is the call graph for this function:

◆ DrawMapProperties()

◆ DrawOverworldProperties()

◆ DrawOverworldMaps()

Member Data Documentation

◆ editor_

OverworldEditor* yaze::editor::OverworldCanvasRenderer::editor_
private

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