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

Handles room and entrance selection UI. More...

#include <dungeon_room_selector.h>

Collaboration diagram for yaze::editor::DungeonRoomSelector:

Public Member Functions

 DungeonRoomSelector (Rom *rom=nullptr)
 
void Draw ()
 
void DrawRoomSelector ()
 
void DrawEntranceSelector ()
 
void set_rom (Rom *rom)
 
Romrom () const
 
void set_current_room_id (uint16_t room_id)
 
int current_room_id () const
 
void set_active_rooms (const ImVector< int > &rooms)
 
const ImVector< int > & active_rooms () const
 
ImVector< int > & mutable_active_rooms ()
 
void set_current_entrance_id (int entrance_id)
 
int current_entrance_id () const
 
void set_rooms (std::array< zelda3::Room, 0x128 > *rooms)
 
void set_entrances (std::array< zelda3::RoomEntrance, 0x8C > *entrances)
 
void set_room_selected_callback (std::function< void(int)> callback)
 

Private Attributes

Romrom_ = nullptr
 
uint16_t current_room_id_ = 0
 
int current_entrance_id_ = 0
 
ImVector< int > active_rooms_
 
std::array< zelda3::Room, 0x128 > * rooms_ = nullptr
 
std::array< zelda3::RoomEntrance, 0x8C > * entrances_ = nullptr
 
std::function< void(int)> room_selected_callback_
 

Detailed Description

Handles room and entrance selection UI.

Definition at line 16 of file dungeon_room_selector.h.

Constructor & Destructor Documentation

◆ DungeonRoomSelector()

yaze::editor::DungeonRoomSelector::DungeonRoomSelector ( Rom rom = nullptr)
inlineexplicit

Definition at line 18 of file dungeon_room_selector.h.

Member Function Documentation

◆ Draw()

void yaze::editor::DungeonRoomSelector::Draw ( )

Definition at line 15 of file dungeon_room_selector.cc.

References DrawEntranceSelector(), and DrawRoomSelector().

Here is the call graph for this function:

◆ DrawRoomSelector()

◆ DrawEntranceSelector()

◆ set_rom()

void yaze::editor::DungeonRoomSelector::set_rom ( Rom rom)
inline

Definition at line 24 of file dungeon_room_selector.h.

References rom(), and rom_.

Referenced by yaze::editor::DungeonEditorV2::set_rom().

Here is the call graph for this function:

◆ rom()

Rom * yaze::editor::DungeonRoomSelector::rom ( ) const
inline

Definition at line 25 of file dungeon_room_selector.h.

References rom_.

Referenced by set_rom().

◆ set_current_room_id()

void yaze::editor::DungeonRoomSelector::set_current_room_id ( uint16_t  room_id)
inline

Definition at line 28 of file dungeon_room_selector.h.

References current_room_id_.

◆ current_room_id()

int yaze::editor::DungeonRoomSelector::current_room_id ( ) const
inline

Definition at line 29 of file dungeon_room_selector.h.

References current_room_id_.

Referenced by yaze::editor::DungeonEditorV2::DrawToolset().

◆ set_active_rooms()

void yaze::editor::DungeonRoomSelector::set_active_rooms ( const ImVector< int > &  rooms)
inline

◆ active_rooms()

const ImVector< int > & yaze::editor::DungeonRoomSelector::active_rooms ( ) const
inline

Definition at line 32 of file dungeon_room_selector.h.

References active_rooms_.

◆ mutable_active_rooms()

ImVector< int > & yaze::editor::DungeonRoomSelector::mutable_active_rooms ( )
inline

Definition at line 33 of file dungeon_room_selector.h.

References active_rooms_.

◆ set_current_entrance_id()

void yaze::editor::DungeonRoomSelector::set_current_entrance_id ( int  entrance_id)
inline

Definition at line 36 of file dungeon_room_selector.h.

References current_entrance_id_.

◆ current_entrance_id()

int yaze::editor::DungeonRoomSelector::current_entrance_id ( ) const
inline

Definition at line 37 of file dungeon_room_selector.h.

References current_entrance_id_.

◆ set_rooms()

void yaze::editor::DungeonRoomSelector::set_rooms ( std::array< zelda3::Room, 0x128 > *  rooms)
inline

Definition at line 40 of file dungeon_room_selector.h.

References rooms_.

Referenced by yaze::editor::DungeonEditorV2::Load().

◆ set_entrances()

void yaze::editor::DungeonRoomSelector::set_entrances ( std::array< zelda3::RoomEntrance, 0x8C > *  entrances)
inline

Definition at line 41 of file dungeon_room_selector.h.

References entrances_.

Referenced by yaze::editor::DungeonEditorV2::Load().

◆ set_room_selected_callback()

void yaze::editor::DungeonRoomSelector::set_room_selected_callback ( std::function< void(int)>  callback)
inline

Definition at line 44 of file dungeon_room_selector.h.

References room_selected_callback_.

Referenced by yaze::editor::DungeonEditorV2::Load().

Member Data Documentation

◆ rom_

Rom* yaze::editor::DungeonRoomSelector::rom_ = nullptr
private

Definition at line 49 of file dungeon_room_selector.h.

Referenced by DrawEntranceSelector(), DrawRoomSelector(), rom(), and set_rom().

◆ current_room_id_

uint16_t yaze::editor::DungeonRoomSelector::current_room_id_ = 0
private

Definition at line 50 of file dungeon_room_selector.h.

Referenced by current_room_id(), DrawRoomSelector(), and set_current_room_id().

◆ current_entrance_id_

int yaze::editor::DungeonRoomSelector::current_entrance_id_ = 0
private

◆ active_rooms_

ImVector<int> yaze::editor::DungeonRoomSelector::active_rooms_
private

Definition at line 52 of file dungeon_room_selector.h.

Referenced by active_rooms(), mutable_active_rooms(), and set_active_rooms().

◆ rooms_

std::array<zelda3::Room, 0x128>* yaze::editor::DungeonRoomSelector::rooms_ = nullptr
private

Definition at line 54 of file dungeon_room_selector.h.

Referenced by set_rooms().

◆ entrances_

std::array<zelda3::RoomEntrance, 0x8C>* yaze::editor::DungeonRoomSelector::entrances_ = nullptr
private

Definition at line 55 of file dungeon_room_selector.h.

Referenced by DrawEntranceSelector(), and set_entrances().

◆ room_selected_callback_

std::function<void(int)> yaze::editor::DungeonRoomSelector::room_selected_callback_
private

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