mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Add video settings UI and refresh loading assets
This commit is contained in:
parent
77070468b5
commit
6a49a7e01f
9 changed files with 150 additions and 2 deletions
|
|
@ -37,6 +37,11 @@ public:
|
|||
int getHeight() const { return height; }
|
||||
void setSize(int w, int h) { width = w; height = h; }
|
||||
float getAspectRatio() const { return static_cast<float>(width) / height; }
|
||||
bool isFullscreen() const { return fullscreen; }
|
||||
bool isVsyncEnabled() const { return vsync; }
|
||||
void setFullscreen(bool enable);
|
||||
void setVsync(bool enable);
|
||||
void applyResolution(int w, int h);
|
||||
|
||||
SDL_Window* getSDLWindow() const { return window; }
|
||||
SDL_GLContext getGLContext() const { return glContext; }
|
||||
|
|
@ -48,6 +53,10 @@ private:
|
|||
|
||||
int width;
|
||||
int height;
|
||||
int windowedWidth = 0;
|
||||
int windowedHeight = 0;
|
||||
bool fullscreen = false;
|
||||
bool vsync = true;
|
||||
bool shouldCloseFlag = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ private:
|
|||
bool showTeleporter = false;
|
||||
bool showEscapeMenu = false;
|
||||
bool showEscapeSettingsNotice = false;
|
||||
bool showSettingsWindow = false;
|
||||
bool settingsInit = false;
|
||||
bool pendingFullscreen = false;
|
||||
bool pendingVsync = false;
|
||||
int pendingResIndex = 0;
|
||||
|
||||
/**
|
||||
* Render player info window
|
||||
|
|
@ -124,6 +129,7 @@ private:
|
|||
void renderVendorWindow(game::GameHandler& gameHandler);
|
||||
void renderTeleporterPanel();
|
||||
void renderEscapeMenu();
|
||||
void renderSettingsWindow();
|
||||
|
||||
/**
|
||||
* Inventory screen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue