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

Mode-specific state data. More...

#include <interaction_mode.h>

Public Member Functions

void Clear ()
 Clear all mode state.
 
void ClearPlacementData ()
 Clear only placement preview data.
 
void ClearDragData ()
 Clear only drag-related state.
 
void ClearRectangleData ()
 Clear only rectangle selection state.
 

Public Attributes

std::optional< zelda3::RoomObjectpreview_object
 
std::optional< zelda3::DoorTypepreview_door_type
 
std::optional< uint8_t > preview_sprite_id
 
std::optional< uint8_t > preview_item_id
 
zelda3::DoorDirection detected_door_direction = zelda3::DoorDirection::North
 
uint8_t snapped_door_position = 0
 
ImVec2 drag_start = ImVec2(0, 0)
 
ImVec2 drag_current = ImVec2(0, 0)
 
bool duplicate_on_drag = false
 
bool drag_mutation_started = false
 
bool drag_has_duplicated = false
 
int drag_last_tile_dx = 0
 
int drag_last_tile_dy = 0
 
int rect_start_x = 0
 
int rect_start_y = 0
 
int rect_end_x = 0
 
int rect_end_y = 0
 
ImVec2 entity_drag_start = ImVec2(0, 0)
 
ImVec2 entity_drag_current = ImVec2(0, 0)
 
int paint_brush_radius = 0
 
int paint_last_tile_x = -1
 
int paint_last_tile_y = -1
 
uint8_t paint_collision_value = 0
 
bool is_painting = false
 
bool paint_mutation_started = false
 

Detailed Description

Mode-specific state data.

Centralizes all preview data and drag state that was previously scattered across multiple member variables.

Definition at line 48 of file interaction_mode.h.

Member Function Documentation

◆ Clear()

◆ ClearPlacementData()

void yaze::editor::ModeState::ClearPlacementData ( )
inline

◆ ClearDragData()

void yaze::editor::ModeState::ClearDragData ( )
inline

◆ ClearRectangleData()

void yaze::editor::ModeState::ClearRectangleData ( )
inline

Clear only rectangle selection state.

Definition at line 147 of file interaction_mode.h.

References rect_end_x, rect_end_y, rect_start_x, and rect_start_y.

Referenced by yaze::editor::InteractionModeManager::SetMode().

Member Data Documentation

◆ preview_object

std::optional<zelda3::RoomObject> yaze::editor::ModeState::preview_object

Definition at line 50 of file interaction_mode.h.

Referenced by Clear(), and ClearPlacementData().

◆ preview_door_type

◆ preview_sprite_id

std::optional<uint8_t> yaze::editor::ModeState::preview_sprite_id

◆ preview_item_id

std::optional<uint8_t> yaze::editor::ModeState::preview_item_id

◆ detected_door_direction

zelda3::DoorDirection yaze::editor::ModeState::detected_door_direction = zelda3::DoorDirection::North

Definition at line 56 of file interaction_mode.h.

Referenced by Clear(), and ClearPlacementData().

◆ snapped_door_position

uint8_t yaze::editor::ModeState::snapped_door_position = 0

Definition at line 57 of file interaction_mode.h.

Referenced by Clear(), and ClearPlacementData().

◆ drag_start

ImVec2 yaze::editor::ModeState::drag_start = ImVec2(0, 0)

Definition at line 60 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ drag_current

ImVec2 yaze::editor::ModeState::drag_current = ImVec2(0, 0)

Definition at line 61 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ duplicate_on_drag

bool yaze::editor::ModeState::duplicate_on_drag = false

Definition at line 62 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ drag_mutation_started

bool yaze::editor::ModeState::drag_mutation_started = false

Definition at line 63 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ drag_has_duplicated

bool yaze::editor::ModeState::drag_has_duplicated = false

Definition at line 64 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ drag_last_tile_dx

int yaze::editor::ModeState::drag_last_tile_dx = 0

Definition at line 65 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ drag_last_tile_dy

int yaze::editor::ModeState::drag_last_tile_dy = 0

Definition at line 66 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ rect_start_x

int yaze::editor::ModeState::rect_start_x = 0

Definition at line 69 of file interaction_mode.h.

Referenced by Clear(), and ClearRectangleData().

◆ rect_start_y

int yaze::editor::ModeState::rect_start_y = 0

Definition at line 70 of file interaction_mode.h.

Referenced by Clear(), and ClearRectangleData().

◆ rect_end_x

int yaze::editor::ModeState::rect_end_x = 0

Definition at line 71 of file interaction_mode.h.

Referenced by Clear(), and ClearRectangleData().

◆ rect_end_y

int yaze::editor::ModeState::rect_end_y = 0

Definition at line 72 of file interaction_mode.h.

Referenced by Clear(), and ClearRectangleData().

◆ entity_drag_start

ImVec2 yaze::editor::ModeState::entity_drag_start = ImVec2(0, 0)

Definition at line 75 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ entity_drag_current

ImVec2 yaze::editor::ModeState::entity_drag_current = ImVec2(0, 0)

Definition at line 76 of file interaction_mode.h.

Referenced by Clear(), and ClearDragData().

◆ paint_brush_radius

int yaze::editor::ModeState::paint_brush_radius = 0

Definition at line 79 of file interaction_mode.h.

Referenced by Clear().

◆ paint_last_tile_x

int yaze::editor::ModeState::paint_last_tile_x = -1

Definition at line 80 of file interaction_mode.h.

Referenced by Clear(), and yaze::editor::InteractionModeManager::SetMode().

◆ paint_last_tile_y

int yaze::editor::ModeState::paint_last_tile_y = -1

Definition at line 81 of file interaction_mode.h.

Referenced by Clear(), and yaze::editor::InteractionModeManager::SetMode().

◆ paint_collision_value

uint8_t yaze::editor::ModeState::paint_collision_value = 0

Definition at line 82 of file interaction_mode.h.

Referenced by Clear(), and yaze::editor::CustomCollisionPanel::Draw().

◆ is_painting

bool yaze::editor::ModeState::is_painting = false

◆ paint_mutation_started

bool yaze::editor::ModeState::paint_mutation_started = false

Definition at line 84 of file interaction_mode.h.

Referenced by Clear(), and yaze::editor::InteractionModeManager::SetMode().


The documentation for this struct was generated from the following file: