diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index 98bbe859c..deb1116d0 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -126,7 +126,8 @@ namespace MWGui { MyGUI::ScrollBar* scroll = current->castType(); std::string valueStr; - if (getSettingValueType(current) == "Float") + std::string valueType = getSettingValueType(current); + if (valueType == "Float" || valueType == "Integer") { // TODO: ScrollBar isn't meant for this. should probably use a dedicated FloatSlider widget float min,max; @@ -423,14 +424,18 @@ namespace MWGui if (getSettingType(scroller) == "Slider") { std::string valueStr; - if (getSettingValueType(scroller) == "Float") + std::string valueType = getSettingValueType(scroller); + if (valueType == "Float" || valueType == "Integer") { float value = pos / float(scroller->getScrollRange()-1); float min,max; getSettingMinMax(scroller, min, max); value = min + (max-min) * value; - Settings::Manager::setFloat(getSettingName(scroller), getSettingCategory(scroller), value); + if (valueType == "Float") + Settings::Manager::setFloat(getSettingName(scroller), getSettingCategory(scroller), value); + else + Settings::Manager::setInt(getSettingName(scroller), getSettingCategory(scroller), (int)value); valueStr = MyGUI::utility::toString(int(value)); } else diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index 58be98cca..2341bfa19 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -53,12 +53,12 @@ - - + + - + @@ -83,11 +83,11 @@ - + - + @@ -309,12 +309,12 @@ - - + + - + @@ -353,18 +353,19 @@ - + - + + @@ -372,18 +373,20 @@ - + - + - + + +