mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
overlays: get localized values in home menu settings
This commit is contained in:
parent
1211acd59c
commit
070add461f
12 changed files with 139 additions and 13 deletions
|
@ -15,8 +15,10 @@ void fmt_class_string<cfg::node>::format(std::string& out, u64 arg)
|
|||
|
||||
namespace cfg
|
||||
{
|
||||
u32 _base::id_counter = 0;
|
||||
|
||||
_base::_base(type _type)
|
||||
: m_type(_type)
|
||||
: m_type(_type), m_id(id_counter++)
|
||||
{
|
||||
if (_type != type::node)
|
||||
{
|
||||
|
@ -25,7 +27,7 @@ namespace cfg
|
|||
}
|
||||
|
||||
_base::_base(type _type, node* owner, std::string name, bool dynamic)
|
||||
: m_type(_type), m_dynamic(dynamic), m_name(std::move(name))
|
||||
: m_type(_type), m_parent(owner), m_dynamic(dynamic), m_name(std::move(name)), m_id(id_counter++)
|
||||
{
|
||||
for (const auto& node : owner->m_nodes)
|
||||
{
|
||||
|
|
|
@ -51,9 +51,13 @@ namespace cfg
|
|||
const type m_type{};
|
||||
|
||||
protected:
|
||||
_base* m_parent = nullptr;
|
||||
bool m_dynamic = true;
|
||||
const std::string m_name{};
|
||||
|
||||
static u32 id_counter;
|
||||
u32 m_id = 0;
|
||||
|
||||
// Ownerless entry constructor
|
||||
_base(type _type);
|
||||
|
||||
|
@ -67,9 +71,16 @@ namespace cfg
|
|||
|
||||
virtual ~_base() = default;
|
||||
|
||||
// Get unique ID
|
||||
u32 get_id() const { return m_id; }
|
||||
|
||||
// Get parent
|
||||
_base* get_parent() const { return m_parent; }
|
||||
|
||||
// Get type
|
||||
type get_type() const { return m_type; }
|
||||
|
||||
// Get name
|
||||
const std::string& get_name() const { return m_name; }
|
||||
|
||||
// Get dynamic property for reloading configs during games
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue