yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::core::ResourceLabelManager Struct Reference

#include <labeling.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_
 

Detailed Description

Definition at line 32 of file labeling.h.

Member Function Documentation

◆ LoadLabels()

bool yaze::app::core::ResourceLabelManager::LoadLabels ( const std::string & filename)

Definition at line 51 of file labeling.cc.

References filename_, labels_, and labels_loaded_.

Referenced by yaze::app::Rom::LoadFromFile().

◆ SaveLabels()

bool yaze::app::core::ResourceLabelManager::SaveLabels ( )

Definition at line 80 of file labeling.cc.

References filename_, labels_, and labels_loaded_.

Referenced by DisplayLabels().

◆ DisplayLabels()

void yaze::app::core::ResourceLabelManager::DisplayLabels ( bool * p_open)

Definition at line 98 of file labeling.cc.

References labels_, labels_loaded_, and SaveLabels().

Here is the call graph for this function:

◆ EditLabel()

void yaze::app::core::ResourceLabelManager::EditLabel ( const std::string & type,
const std::string & key,
const std::string & newValue )

Definition at line 127 of file labeling.cc.

References labels_.

◆ SelectableLabelWithNameEdit()

void yaze::app::core::ResourceLabelManager::SelectableLabelWithNameEdit ( bool selected,
const std::string & type,
const std::string & key,
const std::string & defaultValue )

Definition at line 133 of file labeling.cc.

References CreateOrGetLabel(), ICON_MD_CLOSE, and labels_.

Here is the call graph for this function:

◆ GetLabel()

std::string yaze::app::core::ResourceLabelManager::GetLabel ( const std::string & type,
const std::string & key )

Definition at line 157 of file labeling.cc.

References labels_.

◆ CreateOrGetLabel()

std::string yaze::app::core::ResourceLabelManager::CreateOrGetLabel ( const std::string & type,
const std::string & key,
const std::string & defaultValue )

Definition at line 162 of file labeling.cc.

References labels_.

Referenced by SelectableLabelWithNameEdit().

Member Data Documentation

◆ labels_loaded_

bool yaze::app::core::ResourceLabelManager::labels_loaded_ = false

Definition at line 45 of file labeling.h.

Referenced by DisplayLabels(), LoadLabels(), and SaveLabels().

◆ filename_

std::string yaze::app::core::ResourceLabelManager::filename_

Definition at line 46 of file labeling.h.

Referenced by LoadLabels(), and SaveLabels().

◆ labels_

std::unordered_map<std::string, std::unordered_map<std::string, std::string> > yaze::app::core::ResourceLabelManager::labels_

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