#include <project.h>
Classes | |
struct | ResourceType |
Public Member Functions | |
bool | LoadLabels (const std::string &filename) |
bool | SaveLabels () |
void | DisplayLabels (bool *p_open) |
void | EditLabel (const std::string &type, const std::string &key, const std::string &newValue) |
void | SelectableLabelWithNameEdit (bool selected, const std::string &type, const std::string &key, const std::string &defaultValue) |
std::string | GetLabel (const std::string &type, const std::string &key) |
std::string | CreateOrGetLabel (const std::string &type, const std::string &key, const std::string &defaultValue) |
Public Attributes | |
bool | labels_loaded_ = false |
std::string | filename_ |
std::unordered_map< std::string, std::unordered_map< std::string, std::string > > | labels_ |
bool yaze::core::ResourceLabelManager::LoadLabels | ( | const std::string & | filename | ) |
Definition at line 770 of file project.cc.
References filename_, labels_, and labels_loaded_.
Referenced by yaze::Rom::LoadFromFile(), and yaze::editor::EditorManager::OpenProject().
bool yaze::core::ResourceLabelManager::SaveLabels | ( | ) |
Definition at line 805 of file project.cc.
void yaze::core::ResourceLabelManager::DisplayLabels | ( | bool * | p_open | ) |
Definition at line 828 of file project.cc.
References labels_, and labels_loaded_.
Referenced by yaze::editor::EditorManager::DrawMenuBar().
void yaze::core::ResourceLabelManager::EditLabel | ( | const std::string & | type, |
const std::string & | key, | ||
const std::string & | newValue | ||
) |
Definition at line 850 of file project.cc.
References labels_.
void yaze::core::ResourceLabelManager::SelectableLabelWithNameEdit | ( | bool | selected, |
const std::string & | type, | ||
const std::string & | key, | ||
const std::string & | defaultValue | ||
) |
Definition at line 855 of file project.cc.
References GetLabel().
Referenced by yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::DungeonRoomSelector::DrawEntranceSelector(), yaze::editor::PaletteEditor::DrawPaletteGroup(), yaze::editor::GfxGroupEditor::DrawPaletteViewer(), yaze::editor::DungeonRoomSelector::DrawRoomSelector(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::editor::SpriteEditor::DrawSpritesList(), and yaze::editor::GfxGroupEditor::Update().
std::string yaze::core::ResourceLabelManager::GetLabel | ( | const std::string & | type, |
const std::string & | key | ||
) |
Definition at line 864 of file project.cc.
References labels_.
Referenced by CreateOrGetLabel(), and SelectableLabelWithNameEdit().
std::string yaze::core::ResourceLabelManager::CreateOrGetLabel | ( | const std::string & | type, |
const std::string & | key, | ||
const std::string & | defaultValue | ||
) |
Definition at line 874 of file project.cc.
References GetLabel(), and labels_.
Referenced by yaze::editor::PaletteEditor::Load(), and yaze::editor::OverworldEditor::UpdateUsageStats().
bool yaze::core::ResourceLabelManager::labels_loaded_ = false |
Definition at line 227 of file project.h.
Referenced by DisplayLabels(), yaze::cli::resources::CommandContext::EnsureLabelsLoaded(), yaze::cli::agent::HandleTestConversationCommand(), yaze::cli::InitializeMockRom(), LoadLabels(), and yaze::editor::AgentChatWidget::SetRomContext().
std::string yaze::core::ResourceLabelManager::filename_ |
Definition at line 228 of file project.h.
Referenced by yaze::editor::EditorManager::DrawMenuBar(), LoadLabels(), and SaveLabels().
std::unordered_map<std::string, std::unordered_map<std::string, std::string> > yaze::core::ResourceLabelManager::labels_ |
Definition at line 235 of file project.h.
Referenced by CreateOrGetLabel(), DisplayLabels(), yaze::editor::EditorManager::DrawMenuBar(), EditLabel(), yaze::cli::resources::CommandContext::EnsureLabelsLoaded(), yaze::cli::ResourceContextBuilder::ExtractDungeonLabels(), yaze::cli::ResourceContextBuilder::ExtractEntranceLabels(), yaze::cli::ResourceContextBuilder::ExtractOverworldLabels(), yaze::cli::ResourceContextBuilder::ExtractRoomLabels(), yaze::cli::ResourceContextBuilder::ExtractSpriteLabels(), GetLabel(), yaze::cli::agent::HandleTestConversationCommand(), yaze::cli::InitializeMockRom(), LoadLabels(), SaveLabels(), yaze::editor::AgentChatWidget::SetRomContext(), and yaze::cli::agent::anonymous_namespace{general_commands.cc}::TryLoadProjectAndLabels().