41 load(
"options_vidmodes");
63 if (tag ==
"VideoModeList")
68 if (widget.
getTag() ==
"VideoModeList") {
75 if ((widget.
getTag() ==
"CancelButton") ||
76 (widget.
getTag() ==
"XButton")) {
83 if (widget.
getTag() ==
"OkButton") {
91 if (widget.
getTag() ==
"ApplyButton") {
100 int maxWidth =
WindowMan.getSystemWidth ();
101 int maxHeight =
WindowMan.getSystemHeight();
102 int curWidth =
WindowMan.getWindowWidth ();
103 int curHeight =
WindowMan.getWindowHeight();
115 size_t currentResolution =
SIZE_MAX;
118 currentResolution = i - maxRes;
124 if (currentResolution ==
SIZE_MAX) {
125 currentResolution = 0;
127 curRes.
height = curHeight;
128 curRes.
width = curWidth;
146 resList.
select(currentResolution);
The global graphics manager.
uint32 _returnCode
The GUI's return code.
A class holding an UTF-8 string.
WidgetListBox * getListBox(const Common::UString &tag, bool vital=false)
The global config manager.
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
virtual void show()
Show the GUI.
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
#define ConfigMan
Shortcut for accessing the config manager.
Utility templates and functions.
The NWN resolution options menu.
void load(const Common::UString &resref)
#define WindowMan
Shortcut for accessing the window manager.
static const Resolution kResolutions[]
void addWidget(Widget *widget)
Add a widget.
A text line widget within a NWN listbox widget.