From: DaveG <da...@us...> - 2006-01-12 23:42:39
|
Update of /cvsroot/planeshift/planeshift/src/setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27300/src/setup Modified Files: pawssetupwindow.cpp Log Message: Patch from Pogopuschel to handle non-zero minimums for scrollbars correctly and to fix a bug where you could attempt to take 0 from a stack of items. Index: pawssetupwindow.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/setup/pawssetupwindow.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** pawssetupwindow.cpp 22 Dec 2005 00:13:51 -0000 1.23 --- pawssetupwindow.cpp 12 Jan 2006 23:42:30 -0000 1.24 *************** *** 414,417 **** --- 414,418 ---- // Anisotropy float aniso = configClient->GetFloat("Video.OpenGL.TextureFilterAnisotropy",1.0f); + scbAnisotropy->SetMinValue(1.0f); scbAnisotropy->SetMaxValue(10.0f); scbAnisotropy->SetTickValue(0.5f); *************** *** 432,438 **** // Font scaling int fontFactor = configClient->GetInt("Font.ScalePercent",100); ! scbFontScale->SetMaxValue(100.0f); scbFontScale->SetTickValue(5.0f); // handled extra in onscroll ! scbFontScale->SetCurrentValue((float)fontFactor-50,true); // Shift 50 (slider's range is 50% to 150%) } --- 433,440 ---- // Font scaling int fontFactor = configClient->GetInt("Font.ScalePercent",100); ! scbFontScale->SetMinValue(50.0f); ! scbFontScale->SetMaxValue(150.0f); scbFontScale->SetTickValue(5.0f); // handled extra in onscroll ! scbFontScale->SetCurrentValue((float)fontFactor,true); } *************** *** 441,447 **** if(widget == scbAnisotropy) { - if(widget->GetCurrentValue() < 1.0f) - widget->SetCurrentValue(1.0f); - // Easy, just update the label csString lbl; --- 443,446 ---- *************** *** 501,505 **** else if(widget == scbFontScale) { ! int value = (int)widget->GetCurrentValue()+50; // Shifted 50 (slider's range is 50% to 150%) csString lbl; --- 500,504 ---- else if(widget == scbFontScale) { ! int value = (int)widget->GetCurrentValue(); csString lbl; *************** *** 710,714 **** configClient->SetInt ("Video.OpenGL.TextureDownsample" ,(int)scbTextureSample->GetCurrentValue()); ! configClient->SetInt("Font.ScalePercent", (int)scbFontScale->GetCurrentValue()+50 ); // Shifted 50 (slider's range is 50% to 150%) configGlobal->Save(); --- 709,713 ---- configClient->SetInt ("Video.OpenGL.TextureDownsample" ,(int)scbTextureSample->GetCurrentValue()); ! configClient->SetInt("Font.ScalePercent", (int)scbFontScale->GetCurrentValue() ); configGlobal->Save(); |