|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
#include <MyGUI_ListBox.h>
|
|
|
|
|
#include <MyGUI_ScrollView.h>
|
|
|
|
|
#include <MyGUI_Gui.h>
|
|
|
|
|
#include <MyGUI_TabControl.h>
|
|
|
|
|
|
|
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
|
|
#include <boost/math/common_factor_rt.hpp>
|
|
|
|
@ -170,6 +171,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
setTitle("#{sOptions}");
|
|
|
|
|
|
|
|
|
|
getWidget(mSettingsTab, "SettingsTab");
|
|
|
|
|
getWidget(mOkButton, "OkButton");
|
|
|
|
|
getWidget(mResolutionList, "ResolutionList");
|
|
|
|
|
getWidget(mFullscreenButton, "FullscreenButton");
|
|
|
|
@ -208,6 +210,7 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
mMainWidget->castType<MyGUI::Window>()->eventWindowChangeCoord += MyGUI::newDelegate(this, &SettingsWindow::onWindowResize);
|
|
|
|
|
|
|
|
|
|
mSettingsTab->eventTabChangeSelect += MyGUI::newDelegate(this, &SettingsWindow::onTabChanged);
|
|
|
|
|
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onOkButtonClicked);
|
|
|
|
|
mShaderModeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onShaderModeToggled);
|
|
|
|
|
mTextureFilteringButton->eventComboChangePosition += MyGUI::newDelegate(this, &SettingsWindow::onTextureFilteringChanged);
|
|
|
|
@ -275,6 +278,11 @@ namespace MWGui
|
|
|
|
|
mControllerSwitch->setStateSelected(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::onTabChanged(MyGUI::TabControl* /*_sender*/, size_t /*index*/)
|
|
|
|
|
{
|
|
|
|
|
resetScrollbars();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::onOkButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
|
{
|
|
|
|
|
exit();
|
|
|
|
@ -480,6 +488,7 @@ namespace MWGui
|
|
|
|
|
mKeyboardSwitch->setStateSelected(true);
|
|
|
|
|
mControllerSwitch->setStateSelected(false);
|
|
|
|
|
updateControlsBox();
|
|
|
|
|
resetScrollbars();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::onControllerSwitchClicked(MyGUI::Widget* _sender)
|
|
|
|
@ -490,6 +499,7 @@ namespace MWGui
|
|
|
|
|
mKeyboardSwitch->setStateSelected(false);
|
|
|
|
|
mControllerSwitch->setStateSelected(true);
|
|
|
|
|
updateControlsBox();
|
|
|
|
|
resetScrollbars();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::updateControlsBox()
|
|
|
|
@ -584,6 +594,7 @@ namespace MWGui
|
|
|
|
|
void SettingsWindow::open()
|
|
|
|
|
{
|
|
|
|
|
updateControlsBox ();
|
|
|
|
|
resetScrollbars();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::exit()
|
|
|
|
@ -595,4 +606,10 @@ namespace MWGui
|
|
|
|
|
{
|
|
|
|
|
updateControlsBox();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsWindow::resetScrollbars()
|
|
|
|
|
{
|
|
|
|
|
mResolutionList->setScrollPosition(0);
|
|
|
|
|
mControlsBox->setViewOffset(MyGUI::IntPoint(0, 0));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|