From: Christian S. <blu...@us...> - 2005-04-30 10:54:56
|
Update of /cvsroot/planeshift/planeshift/src/client/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7804/src/client/gui Modified Files: pawsconfigmouse.cpp pawsconfigmouse.h Log Message: - Fixed the mouse sensitivity controlls on the config screen Index: pawsconfigmouse.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/pawsconfigmouse.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pawsconfigmouse.cpp 13 Mar 2005 09:34:46 -0000 1.18 --- pawsconfigmouse.cpp 30 Apr 2005 10:54:41 -0000 1.19 *************** *** 102,105 **** --- 102,119 ---- bool ok1, ok2, ok3; + // Transfer the settings + /*pawsSeqTreeNode* invertN = (pawsSeqTreeNode*)FindWidget("InvertMouse"); + pawsSeqTreeNode* vertN = (pawsSeqTreeNode*)FindWidget("VertSensitivity"); + pawsSeqTreeNode* hertN = (pawsSeqTreeNode*)FindWidget("HorzSensitivity"); + + pawsSpinBox* vert = (pawsSpinBox*)vertN->GetSeqWidget(1); + pawsSpinBox* hert = (pawsSpinBox*)hertN->GetSeqWidget(1); + + pawsButton* invert = (pawsButton*)invertN->GetSeqWidget(1); + + binds.SetOnOff("InvertMouse", invert->GetState() ); + binds.SetInt("VertSensitivity", vert->GetValue() ); + binds.SetInt("HorzSensitivity", hert->GetValue() ); */ + ok1 = binds.SaveToFile(psengine->GetObjectRegistry(), MOUSE_FILE); dirty = false; *************** *** 111,114 **** --- 125,139 ---- } + bool pawsConfigMouse::OnChange(pawsWidget* widget) + { + dirty=true; + pawsSpinBox* box = dynamic_cast<pawsSpinBox*>(widget); + if(!box) + return true; + + binds.SetInt(box->GetParent()->GetName(),box->GetValue()); + return true; + } + void pawsConfigMouse::SetDefault() { Index: pawsconfigmouse.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/gui/pawsconfigmouse.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pawsconfigmouse.h 13 Mar 2005 09:34:46 -0000 1.5 --- pawsconfigmouse.h 30 Apr 2005 10:54:41 -0000 1.6 *************** *** 52,55 **** --- 52,57 ---- // from pawsWidget: virtual bool OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget ); + + virtual bool OnChange(pawsWidget* widget); protected: |