Handles room and entrance selection UI. More...
#include <dungeon_room_selector.h>
Public Member Functions | |
DungeonRoomSelector (Rom *rom=nullptr) | |
void | Draw () |
void | DrawRoomSelector () |
void | DrawEntranceSelector () |
void | set_rom (Rom *rom) |
Rom * | rom () 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 | |
Rom * | rom_ = 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_ |
Handles room and entrance selection UI.
Definition at line 16 of file dungeon_room_selector.h.
|
inlineexplicit |
Definition at line 18 of file dungeon_room_selector.h.
void yaze::editor::DungeonRoomSelector::Draw | ( | ) |
Definition at line 15 of file dungeon_room_selector.cc.
References DrawEntranceSelector(), and DrawRoomSelector().
void yaze::editor::DungeonRoomSelector::DrawRoomSelector | ( | ) |
Definition at line 29 of file dungeon_room_selector.cc.
References current_room_id_, yaze::util::HexByte(), yaze::gui::InputHexWord(), yaze::Rom::is_loaded(), yaze::zelda3::kRoomNames, yaze::Rom::resource_label(), rom_, room_selected_callback_, and yaze::core::ResourceLabelManager::SelectableLabelWithNameEdit().
Referenced by Draw().
void yaze::editor::DungeonRoomSelector::DrawEntranceSelector | ( | ) |
Definition at line 58 of file dungeon_room_selector.cc.
References current_entrance_id_, entrances_, yaze::util::HexByte(), yaze::gui::InputHexByte(), yaze::gui::InputHexWord(), yaze::Rom::is_loaded(), yaze::zelda3::kEntranceNames, yaze::Rom::resource_label(), rom_, room_selected_callback_, and yaze::core::ResourceLabelManager::SelectableLabelWithNameEdit().
Referenced by Draw().
|
inline |
Definition at line 24 of file dungeon_room_selector.h.
Referenced by yaze::editor::DungeonEditorV2::set_rom().
|
inline |
|
inline |
Definition at line 28 of file dungeon_room_selector.h.
References current_room_id_.
|
inline |
Definition at line 29 of file dungeon_room_selector.h.
References current_room_id_.
Referenced by yaze::editor::DungeonEditorV2::DrawToolset().
|
inline |
Definition at line 31 of file dungeon_room_selector.h.
References active_rooms_.
Referenced by yaze::editor::DungeonEditorV2::Load(), and yaze::editor::DungeonEditorV2::OnRoomSelected().
|
inline |
Definition at line 32 of file dungeon_room_selector.h.
References active_rooms_.
|
inline |
Definition at line 33 of file dungeon_room_selector.h.
References active_rooms_.
|
inline |
Definition at line 36 of file dungeon_room_selector.h.
References current_entrance_id_.
|
inline |
Definition at line 37 of file dungeon_room_selector.h.
References current_entrance_id_.
|
inline |
Definition at line 40 of file dungeon_room_selector.h.
References rooms_.
Referenced by yaze::editor::DungeonEditorV2::Load().
|
inline |
Definition at line 41 of file dungeon_room_selector.h.
References entrances_.
Referenced by yaze::editor::DungeonEditorV2::Load().
|
inline |
Definition at line 44 of file dungeon_room_selector.h.
References room_selected_callback_.
Referenced by yaze::editor::DungeonEditorV2::Load().
|
private |
Definition at line 49 of file dungeon_room_selector.h.
Referenced by DrawEntranceSelector(), DrawRoomSelector(), rom(), and set_rom().
|
private |
Definition at line 50 of file dungeon_room_selector.h.
Referenced by current_room_id(), DrawRoomSelector(), and set_current_room_id().
|
private |
Definition at line 51 of file dungeon_room_selector.h.
Referenced by current_entrance_id(), DrawEntranceSelector(), and set_current_entrance_id().
|
private |
Definition at line 52 of file dungeon_room_selector.h.
Referenced by active_rooms(), mutable_active_rooms(), and set_active_rooms().
|
private |
Definition at line 54 of file dungeon_room_selector.h.
Referenced by set_rooms().
|
private |
Definition at line 55 of file dungeon_room_selector.h.
Referenced by DrawEntranceSelector(), and set_entrances().
|
private |
Definition at line 58 of file dungeon_room_selector.h.
Referenced by DrawEntranceSelector(), DrawRoomSelector(), and set_room_selected_callback().