From: Christian S. <blu...@us...> - 2004-09-13 17:49:55
|
Update of /cvsroot/planeshift/planeshift/src/setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10960/src/setup Modified Files: pawssetupwindow.cpp pawssetupwindow.h Log Message: - Added ds3d as a sound renderer and added a Stream buffer value box Index: pawssetupwindow.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/setup/pawssetupwindow.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pawssetupwindow.cpp 18 Aug 2004 13:54:44 -0000 1.5 --- pawssetupwindow.cpp 13 Sep 2004 17:49:45 -0000 1.6 *************** *** 49,63 **** rbgResolution= (pawsRadioButtonGroup*)FindWidget("resbox"); rbgDepth = (pawsRadioButtonGroup*)FindWidget("depthbox"); ! rbgVBO = (pawsRadioButtonGroup*)FindWidget("vbobox"); cbFullScreen = (pawsCheckBox*)FindWidget("fullscreen"); - cbSound = (pawsCheckBox*)FindWidget("sound"); btnOK = (pawsButton*)FindWidget("OKButton"); btnCancel = (pawsButton*)FindWidget("CancelButton"); ! edtCustomWidth = (pawsEditTextBox*)FindWidget("screenwidth"); ! edtCustomHeight = (pawsEditTextBox*)FindWidget("screenheight"); ! edtStencil = (pawsEditTextBox*)FindWidget("stencil"); LoadSettings(); --- 49,66 ---- rbgResolution= (pawsRadioButtonGroup*)FindWidget("resbox"); rbgDepth = (pawsRadioButtonGroup*)FindWidget("depthbox"); ! rbgVBO = (pawsRadioButtonGroup*)FindWidget("vbobox"); ! rbgSound = (pawsRadioButtonGroup*)FindWidget("soundboxes"); cbFullScreen = (pawsCheckBox*)FindWidget("fullscreen"); btnOK = (pawsButton*)FindWidget("OKButton"); btnCancel = (pawsButton*)FindWidget("CancelButton"); ! edtCustomWidth = (pawsEditTextBox*)FindWidget("screenwidth"); ! edtCustomHeight = (pawsEditTextBox*)FindWidget("screenheight"); ! edtStencil = (pawsEditTextBox*)FindWidget("stencil"); ! edtStreamBuffer = (pawsEditTextBox*)FindWidget("streambuffer"); ! ! lblStreamBuffer = (pawsTextBox*)FindWidget("streambufferlbl"); LoadSettings(); *************** *** 78,81 **** --- 81,98 ---- } + if (widget->GetParent() == rbgSound) + { + if(rbgSound->GetActive()=="ds3d") + { + edtStreamBuffer->SetVisibility(true); + lblStreamBuffer->SetVisibility(true); + } + else + { + edtStreamBuffer->SetVisibility(false); + lblStreamBuffer->SetVisibility(false); + } + } + return false; } *************** *** 131,137 **** csString sound = configClient->GetStr("System.PlugIns.iSoundRender"); if (sound=="crystalspace.sound.render.software") { ! cbSound->SetState(true); } } --- 148,166 ---- csString sound = configClient->GetStr("System.PlugIns.iSoundRender"); if (sound=="crystalspace.sound.render.software") + rbgSound->SetActive("software"); + else if(sound=="crystalspace.sound.render.ds3d") + rbgSound->SetActive("ds3d"); + else + rbgSound->SetActive("off"); + + if(rbgSound->GetActive()=="ds3d") { ! edtStreamBuffer->SetVisibility(true); ! lblStreamBuffer->SetVisibility(true); } + + csString v; + v.Format("%.2f",configClient->GetFloat("Sound.ds3d.StreamingBufferLength",0.5)); + edtStreamBuffer->SetText(v); } *************** *** 181,188 **** // sound enabled/disabled ! if (cbSound->GetState()) ! configClient->SetStr("System.PlugIns.iSoundRender","crystalspace.sound.render.software"); else ! configClient->SetStr("System.PlugIns.iSoundRender",""); configGlobal->Save(); --- 210,230 ---- // sound enabled/disabled ! if (rbgSound->GetActive() == "off") ! { ! configClient->DeleteKey("System.PlugIns.iSoundRender"); ! } else ! { ! csString render = "crystalspace.sound.render."; ! render += rbgSound->GetActive(); ! configClient->SetStr("System.PlugIns.iSoundRender",render); ! } ! ! // Stream buffer ! if(rbgSound->GetActive() == "ds3d") ! { ! float v = (float)atof(edtStreamBuffer->GetText()); ! configClient->SetFloat("Sound.ds3d.StreamingBufferLength",v); ! } configGlobal->Save(); Index: pawssetupwindow.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/setup/pawssetupwindow.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pawssetupwindow.h 23 Jul 2004 19:18:14 -0000 1.2 --- pawssetupwindow.h 13 Sep 2004 17:49:45 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- class pawsButton; class pawsEditTextBox; + class pawsTextBox; class pawsSetupWindow : public pawsWidget *************** *** 41,47 **** pawsRadioButtonGroup* rbgDepth; pawsRadioButtonGroup* rbgVBO; pawsCheckBox* cbFullScreen; - pawsCheckBox* cbSound; pawsButton* btnOK; --- 42,48 ---- pawsRadioButtonGroup* rbgDepth; pawsRadioButtonGroup* rbgVBO; + pawsRadioButtonGroup* rbgSound; pawsCheckBox* cbFullScreen; pawsButton* btnOK; *************** *** 51,54 **** --- 52,58 ---- pawsEditTextBox* edtCustomHeight; pawsEditTextBox* edtStencil; + pawsEditTextBox* edtStreamBuffer; + + pawsTextBox* lblStreamBuffer; csRef<iConfigFile> configGlobal; |