online highscore can now be selected from Options menu
This commit is contained in:
@@ -357,7 +357,7 @@ bool CheckButton (int id, const char* caption, bool checked, int x, int y, int w
|
||||
&& controller->uistate.hotitem == id
|
||||
&& controller->uistate.activeitem == id) {
|
||||
controller->uistate.lastwidget = id;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ bool CheckButton (int id, const char* caption, bool checked, int x, int y, int w
|
||||
controller->uistate.last_keysym = SDLK_CLEAR;
|
||||
// As we (probably) exit the current set of widgets, we have to clear
|
||||
// the uistate.kbditem value.
|
||||
controller->uistate.kbditem = 0;
|
||||
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,12 @@ Variable::Variable (const std::string &name, const std::string &value) {
|
||||
}
|
||||
}
|
||||
|
||||
void Variable::Set (const std::string &value) {
|
||||
mStringValue = value;
|
||||
mFloatValue = atof (value.c_str());
|
||||
mBoolValue = ParseBoolValue (value);
|
||||
}
|
||||
|
||||
void Variable::RegisterVariable (const std::string &name) {
|
||||
if (! VariablesInstance ) {
|
||||
LogError ("Unable to register Variable '%s': Variables System not initialized!", name.c_str());
|
||||
|
||||
@@ -21,6 +21,9 @@ class Variable {
|
||||
*/
|
||||
Variable (const std::string &name, const std::string &value);
|
||||
|
||||
/** \brief Parses and sets the corresponding value */
|
||||
void Set (const std::string &value);
|
||||
|
||||
/** \brief Returns the string value of the Variable */
|
||||
std::string& GetStringValue () {
|
||||
return mStringValue;
|
||||
|
||||
Reference in New Issue
Block a user