diff --git a/source/glest_game/menu/menu_state_options.cpp b/source/glest_game/menu/menu_state_options.cpp index 354a2815c..1bd12f6a9 100644 --- a/source/glest_game/menu/menu_state_options.cpp +++ b/source/glest_game/menu/menu_state_options.cpp @@ -201,6 +201,20 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu): listBoxShadows.setSelectedItemIndex(clamp(Renderer::strToShadows(str), 0, Renderer::sCount-1)); currentLine-=lineOffset; + //shadows + labelShadowTextureSize.registerGraphicComponent(containerName,"labelShadowTextureSize"); + labelShadowTextureSize.init(currentLabelStart, currentLine); + labelShadowTextureSize.setText(lang.get("ShadowTextureSize")); + + listBoxShadowTextureSize.registerGraphicComponent(containerName,"listBoxShadowTextureSize"); + listBoxShadowTextureSize.init(currentColumnStart, currentLine, 170); + listBoxShadowTextureSize.pushBackItem("256"); + listBoxShadowTextureSize.pushBackItem("512"); + listBoxShadowTextureSize.pushBackItem("1024"); + listBoxShadowTextureSize.setSelectedItemIndex(1,false); + listBoxShadowTextureSize.setSelectedItem(intToStr(config.getInt("ShadowTextureSize","512")),false); + currentLine-=lineOffset; + //textures 3d labelTextures3D.registerGraphicComponent(containerName,"labelTextures3D"); labelTextures3D.init(currentLabelStart, currentLine); @@ -610,6 +624,7 @@ void MenuStateOptions::reloadUI() { labelShadows.setText(lang.get("Shadows")); + labelShadowTextureSize.setText(lang.get("ShadowTextureSize")); listboxData.clear(); for(int i= 0; i(index))); + string texSizeString= listBoxShadowTextureSize.getSelectedItem(); + config.setInt("ShadowTextureSize",strToInt(texSizeString) ); + config.setBool("Windowed", checkBoxFullscreenWindowed.getValue()); config.setString("Filter", listBoxFilter.getSelectedItem()); config.setFloat("GammaValue", strToFloat(listBoxGammaCorrection.getSelectedItem())); diff --git a/source/glest_game/menu/menu_state_options.h b/source/glest_game/menu/menu_state_options.h index 4b7d73c1f..32437f5e4 100644 --- a/source/glest_game/menu/menu_state_options.h +++ b/source/glest_game/menu/menu_state_options.h @@ -128,6 +128,9 @@ private: GraphicLabel labelGammaCorrection; GraphicListBox listBoxGammaCorrection; + GraphicLabel labelShadowTextureSize; + GraphicListBox listBoxShadowTextureSize; + map languageList; public: