2012-05-22 19:40:42 +00:00
|
|
|
#ifndef MWGUI_SETTINGS_H
|
|
|
|
#define MWGUI_SETTINGS_H
|
|
|
|
|
2013-04-10 04:32:05 +00:00
|
|
|
#include "windowbase.hpp"
|
2012-05-22 19:40:42 +00:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
class WindowManager;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
class SettingsWindow : public WindowBase
|
|
|
|
{
|
|
|
|
public:
|
2013-04-10 18:46:21 +00:00
|
|
|
SettingsWindow();
|
2012-05-22 19:40:42 +00:00
|
|
|
|
2017-09-22 15:10:53 +00:00
|
|
|
virtual void onOpen();
|
2012-08-12 23:26:15 +00:00
|
|
|
|
|
|
|
void updateControlsBox();
|
|
|
|
|
2017-09-23 20:07:30 +00:00
|
|
|
void onResChange(int, int) { center(); }
|
|
|
|
|
2014-03-22 18:02:14 +00:00
|
|
|
protected:
|
2015-06-04 20:09:40 +00:00
|
|
|
MyGUI::TabControl* mSettingsTab;
|
2012-05-22 19:40:42 +00:00
|
|
|
MyGUI::Button* mOkButton;
|
2012-05-24 09:50:48 +00:00
|
|
|
|
|
|
|
// graphics
|
2012-05-22 23:32:36 +00:00
|
|
|
MyGUI::ListBox* mResolutionList;
|
2012-05-23 03:28:25 +00:00
|
|
|
MyGUI::Button* mFullscreenButton;
|
2014-12-24 14:09:50 +00:00
|
|
|
MyGUI::Button* mWindowBorderButton;
|
2013-11-05 18:50:24 +00:00
|
|
|
MyGUI::ComboBox* mTextureFilteringButton;
|
2012-05-29 02:54:54 +00:00
|
|
|
MyGUI::Widget* mAnisotropyBox;
|
2015-10-28 20:49:01 +00:00
|
|
|
|
|
|
|
MyGUI::ComboBox* mWaterTextureSize;
|
2019-02-21 16:14:18 +00:00
|
|
|
MyGUI::ComboBox* mWaterReflectionDetail;
|
2012-05-22 19:40:42 +00:00
|
|
|
|
2012-08-12 23:26:15 +00:00
|
|
|
// controls
|
|
|
|
MyGUI::ScrollView* mControlsBox;
|
2012-08-13 00:55:22 +00:00
|
|
|
MyGUI::Button* mResetControlsButton;
|
2014-12-09 03:57:32 +00:00
|
|
|
MyGUI::Button* mKeyboardSwitch;
|
|
|
|
MyGUI::Button* mControllerSwitch;
|
|
|
|
bool mKeyboardMode; //if true, setting up the keyboard. Otherwise, it's controller
|
2012-08-12 23:26:15 +00:00
|
|
|
|
2015-06-04 20:09:40 +00:00
|
|
|
void onTabChanged(MyGUI::TabControl* _sender, size_t index);
|
2012-05-22 19:40:42 +00:00
|
|
|
void onOkButtonClicked(MyGUI::Widget* _sender);
|
2013-11-05 18:50:24 +00:00
|
|
|
void onTextureFilteringChanged(MyGUI::ComboBox* _sender, size_t pos);
|
2012-05-22 23:32:36 +00:00
|
|
|
void onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos);
|
2012-05-23 03:28:25 +00:00
|
|
|
void onButtonToggled(MyGUI::Widget* _sender);
|
|
|
|
void onResolutionSelected(MyGUI::ListBox* _sender, size_t index);
|
|
|
|
void onResolutionAccept();
|
2012-05-28 10:34:29 +00:00
|
|
|
void onResolutionCancel();
|
2015-07-13 16:00:41 +00:00
|
|
|
void highlightCurrentResolution();
|
2012-05-24 02:34:53 +00:00
|
|
|
|
2015-10-28 20:49:01 +00:00
|
|
|
void onWaterTextureSizeChanged(MyGUI::ComboBox* _sender, size_t pos);
|
2019-02-21 16:14:18 +00:00
|
|
|
void onWaterReflectionDetailChanged(MyGUI::ComboBox* _sender, size_t pos);
|
2015-10-28 20:49:01 +00:00
|
|
|
|
2012-08-12 23:26:15 +00:00
|
|
|
void onRebindAction(MyGUI::Widget* _sender);
|
2012-08-13 00:55:22 +00:00
|
|
|
void onInputTabMouseWheel(MyGUI::Widget* _sender, int _rel);
|
|
|
|
void onResetDefaultBindings(MyGUI::Widget* _sender);
|
|
|
|
void onResetDefaultBindingsAccept ();
|
2014-12-09 03:57:32 +00:00
|
|
|
void onKeyboardSwitchClicked(MyGUI::Widget* _sender);
|
|
|
|
void onControllerSwitchClicked(MyGUI::Widget* _sender);
|
2012-08-12 23:26:15 +00:00
|
|
|
|
2014-10-16 13:07:26 +00:00
|
|
|
void onWindowResize(MyGUI::Window* _sender);
|
|
|
|
|
2012-05-24 02:34:53 +00:00
|
|
|
void apply();
|
2014-03-22 18:02:14 +00:00
|
|
|
|
|
|
|
void configureWidgets(MyGUI::Widget* widget);
|
2016-01-05 21:37:36 +00:00
|
|
|
void updateSliderLabel(MyGUI::ScrollBar* scroller, const std::string& value);
|
2016-11-01 15:37:00 +00:00
|
|
|
|
|
|
|
void layoutControlsBox();
|
2015-06-04 20:09:40 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void resetScrollbars();
|
2012-05-22 19:40:42 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|