OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
settingswindow.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_SETTINGS_H
2 #define MWGUI_SETTINGS_H
3 
4 #include "windowbase.hpp"
5 
6 namespace MWGui
7 {
8  class WindowManager;
9 }
10 
11 namespace MWGui
12 {
13  class SettingsWindow : public WindowBase
14  {
15  public:
17 
18  virtual void open();
19 
20  virtual void exit();
21 
22  void updateControlsBox();
23 
24  protected:
25  MyGUI::TabControl* mSettingsTab;
26  MyGUI::Button* mOkButton;
27 
28  // graphics
29  MyGUI::ListBox* mResolutionList;
30  MyGUI::Button* mFullscreenButton;
31  MyGUI::Button* mWindowBorderButton;
32  MyGUI::ComboBox* mTextureFilteringButton;
33  MyGUI::Widget* mAnisotropyBox;
34 
35  MyGUI::ComboBox* mWaterTextureSize;
36 
37  // controls
38  MyGUI::ScrollView* mControlsBox;
39  MyGUI::Button* mResetControlsButton;
40  MyGUI::Button* mKeyboardSwitch;
41  MyGUI::Button* mControllerSwitch;
42  bool mKeyboardMode; //if true, setting up the keyboard. Otherwise, it's controller
43 
44  void onTabChanged(MyGUI::TabControl* _sender, size_t index);
45  void onOkButtonClicked(MyGUI::Widget* _sender);
46  void onTextureFilteringChanged(MyGUI::ComboBox* _sender, size_t pos);
47  void onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos);
48  void onButtonToggled(MyGUI::Widget* _sender);
49  void onResolutionSelected(MyGUI::ListBox* _sender, size_t index);
50  void onResolutionAccept();
51  void onResolutionCancel();
53 
54  void onWaterTextureSizeChanged(MyGUI::ComboBox* _sender, size_t pos);
55 
56  void onRebindAction(MyGUI::Widget* _sender);
57  void onInputTabMouseWheel(MyGUI::Widget* _sender, int _rel);
58  void onResetDefaultBindings(MyGUI::Widget* _sender);
60  void onKeyboardSwitchClicked(MyGUI::Widget* _sender);
61  void onControllerSwitchClicked(MyGUI::Widget* _sender);
62 
63  void onWindowResize(MyGUI::Window* _sender);
64 
65  void apply();
66 
67  void configureWidgets(MyGUI::Widget* widget);
68  void updateSliderLabel(MyGUI::ScrollBar* scroller, const std::string& value);
69 
70  void layoutControlsBox();
71 
72  private:
73  void resetScrollbars();
74  };
75 }
76 
77 #endif
virtual void open()
Notify that window has been made visible.
Definition: settingswindow.cpp:558
void onSliderChangePosition(MyGUI::ScrollBar *scroller, size_t pos)
Definition: settingswindow.cpp:400
void resetScrollbars()
Definition: settingswindow.cpp:574
MyGUI::Widget * mAnisotropyBox
Definition: settingswindow.hpp:33
MyGUI::Button * mControllerSwitch
Definition: settingswindow.hpp:41
void onResolutionCancel()
Definition: settingswindow.cpp:291
MyGUI::Button * mFullscreenButton
Definition: settingswindow.hpp:30
void onTextureFilteringChanged(MyGUI::ComboBox *_sender, size_t pos)
Definition: settingswindow.cpp:389
void onOkButtonClicked(MyGUI::Widget *_sender)
Definition: settingswindow.cpp:261
void onResolutionSelected(MyGUI::ListBox *_sender, size_t index)
Definition: settingswindow.cpp:266
MyGUI::ComboBox * mWaterTextureSize
Definition: settingswindow.hpp:35
MyGUI::Button * mWindowBorderButton
Definition: settingswindow.hpp:31
void configureWidgets(MyGUI::Widget *widget)
Definition: settingswindow.cpp:107
void onResolutionAccept()
Definition: settingswindow.cpp:279
void onKeyboardSwitchClicked(MyGUI::Widget *_sender)
Definition: settingswindow.cpp:435
void onControllerSwitchClicked(MyGUI::Widget *_sender)
Definition: settingswindow.cpp:446
Definition: settingswindow.hpp:13
MyGUI::Button * mOkButton
Definition: settingswindow.hpp:26
MyGUI::ScrollView * mControlsBox
Definition: settingswindow.hpp:38
void updateControlsBox()
Definition: settingswindow.cpp:457
bool mKeyboardMode
Definition: settingswindow.hpp:42
MyGUI::ComboBox * mTextureFilteringButton
Definition: settingswindow.hpp:32
MyGUI::TabControl * mSettingsTab
Definition: settingswindow.hpp:25
void onWindowResize(MyGUI::Window *_sender)
Definition: settingswindow.cpp:569
void onResetDefaultBindings(MyGUI::Widget *_sender)
Definition: settingswindow.cpp:540
void onResetDefaultBindingsAccept()
Definition: settingswindow.cpp:549
MyGUI::Button * mResetControlsButton
Definition: settingswindow.hpp:39
MyGUI::ListBox * mResolutionList
Definition: settingswindow.hpp:29
void highlightCurrentResolution()
Definition: settingswindow.cpp:296
void layoutControlsBox()
Definition: settingswindow.cpp:500
Definition: windowbase.hpp:16
SettingsWindow()
Definition: settingswindow.cpp:166
MyGUI::Button * mKeyboardSwitch
Definition: settingswindow.hpp:40
virtual void exit()
Gracefully exits the window.
Definition: settingswindow.cpp:564
void onTabChanged(MyGUI::TabControl *_sender, size_t index)
Definition: settingswindow.cpp:256
void onRebindAction(MyGUI::Widget *_sender)
Definition: settingswindow.cpp:519
void onWaterTextureSizeChanged(MyGUI::ComboBox *_sender, size_t pos)
Definition: settingswindow.cpp:316
void onButtonToggled(MyGUI::Widget *_sender)
Definition: settingswindow.cpp:329
void onInputTabMouseWheel(MyGUI::Widget *_sender, int _rel)
Definition: settingswindow.cpp:532
void updateSliderLabel(MyGUI::ScrollBar *scroller, const std::string &value)
Definition: settingswindow.cpp:153
void apply()
Definition: settingswindow.cpp:426