mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 15:39:02 +00:00
16856d45c5
Fixes build errors with older OSG builds and some issues with 'shared' layout. Bring back ambient in inventory through lightmodel instead of sun ambient, mirrors scene ambient/sunlight relationship. Forces shaders when certain lighting methods are enabled and finalize settings. Correctly override sun for localmap.
85 lines
2.9 KiB
C++
85 lines
2.9 KiB
C++
#ifndef MWGUI_SETTINGS_H
|
|
#define MWGUI_SETTINGS_H
|
|
|
|
#include "windowbase.hpp"
|
|
|
|
namespace MWGui
|
|
{
|
|
class SettingsWindow : public WindowBase
|
|
{
|
|
public:
|
|
SettingsWindow();
|
|
|
|
void onOpen() override;
|
|
|
|
void updateControlsBox();
|
|
|
|
void updateLightSettings();
|
|
|
|
void onResChange(int, int) override { center(); }
|
|
|
|
protected:
|
|
MyGUI::TabControl* mSettingsTab;
|
|
MyGUI::Button* mOkButton;
|
|
|
|
// graphics
|
|
MyGUI::ListBox* mResolutionList;
|
|
MyGUI::Button* mFullscreenButton;
|
|
MyGUI::Button* mWindowBorderButton;
|
|
MyGUI::ComboBox* mTextureFilteringButton;
|
|
MyGUI::Widget* mAnisotropyBox;
|
|
|
|
MyGUI::ComboBox* mWaterTextureSize;
|
|
MyGUI::ComboBox* mWaterReflectionDetail;
|
|
|
|
MyGUI::ComboBox* mMaxLights;
|
|
MyGUI::ComboBox* mLightingMethodButton;
|
|
MyGUI::Button* mLightsResetButton;
|
|
|
|
// controls
|
|
MyGUI::ScrollView* mControlsBox;
|
|
MyGUI::Button* mResetControlsButton;
|
|
MyGUI::Button* mKeyboardSwitch;
|
|
MyGUI::Button* mControllerSwitch;
|
|
bool mKeyboardMode; //if true, setting up the keyboard. Otherwise, it's controller
|
|
|
|
void onTabChanged(MyGUI::TabControl* _sender, size_t index);
|
|
void onOkButtonClicked(MyGUI::Widget* _sender);
|
|
void onTextureFilteringChanged(MyGUI::ComboBox* _sender, size_t pos);
|
|
void onSliderChangePosition(MyGUI::ScrollBar* scroller, size_t pos);
|
|
void onButtonToggled(MyGUI::Widget* _sender);
|
|
void onResolutionSelected(MyGUI::ListBox* _sender, size_t index);
|
|
void onResolutionAccept();
|
|
void onResolutionCancel();
|
|
void highlightCurrentResolution();
|
|
|
|
void onWaterTextureSizeChanged(MyGUI::ComboBox* _sender, size_t pos);
|
|
void onWaterReflectionDetailChanged(MyGUI::ComboBox* _sender, size_t pos);
|
|
|
|
void onLightingMethodButtonChanged(MyGUI::ComboBox* _sender, size_t pos);
|
|
void onLightsResetButtonClicked(MyGUI::Widget* _sender);
|
|
void onMaxLightsChanged(MyGUI::ComboBox* _sender, size_t pos);
|
|
|
|
void onRebindAction(MyGUI::Widget* _sender);
|
|
void onInputTabMouseWheel(MyGUI::Widget* _sender, int _rel);
|
|
void onResetDefaultBindings(MyGUI::Widget* _sender);
|
|
void onResetDefaultBindingsAccept ();
|
|
void onKeyboardSwitchClicked(MyGUI::Widget* _sender);
|
|
void onControllerSwitchClicked(MyGUI::Widget* _sender);
|
|
|
|
void onWindowResize(MyGUI::Window* _sender);
|
|
|
|
void apply();
|
|
|
|
void configureWidgets(MyGUI::Widget* widget, bool init);
|
|
void updateSliderLabel(MyGUI::ScrollBar* scroller, const std::string& value);
|
|
|
|
void layoutControlsBox();
|
|
|
|
private:
|
|
void resetScrollbars();
|
|
};
|
|
}
|
|
|
|
#endif
|