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