mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
added category update function
This commit is contained in:
parent
3a5238bebc
commit
04a11679fb
@ -4,6 +4,7 @@
|
||||
#include <stdexcept>
|
||||
|
||||
#include "setting.hpp"
|
||||
#include "state.hpp"
|
||||
|
||||
CSMPrefs::Category::Category (State *parent, const std::string& key)
|
||||
: mParent (parent), mKey (key)
|
||||
@ -42,3 +43,9 @@ CSMPrefs::Setting& CSMPrefs::Category::operator[] (const std::string& key)
|
||||
|
||||
throw std::logic_error ("Invalid user setting: " + key);
|
||||
}
|
||||
|
||||
void CSMPrefs::Category::update()
|
||||
{
|
||||
for (Iterator iter = mSettings.begin(); iter!=mSettings.end(); ++iter)
|
||||
mParent->update (**iter);
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ namespace CSMPrefs
|
||||
Iterator end();
|
||||
|
||||
Setting& operator[] (const std::string& key);
|
||||
|
||||
void update();
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user