Index: sdl-game.cpp
===================================================================
--- sdl-game.cpp	(revision 187b0f51c66b33a3dd0fd0ca7bd655e77b75364a)
+++ sdl-game.cpp	(revision 85b5fecdb1b2b3249583a225657b9a52d23bc726)
@@ -8,4 +8,6 @@
 
 #include "logger.hpp"
+
+#include "gui/imgui/button-imgui.hpp"
 
 using namespace std;
@@ -343,5 +345,5 @@
       ImGui::NewFrame();
 
-      (this->*currentRenderScreenFn)();
+      (this->*currentRenderScreenFn)(gui->getWindowWidth(), gui->getWindowHeight());
 
       ImGui::Render();
@@ -1009,12 +1011,9 @@
 }
 
-void VulkanGame::renderMainScreen() {
-   unsigned int windowWidth = 640;
-   unsigned int windowHeight = 480;
-
+void VulkanGame::renderMainScreen(int width, int height) {
    {
       int padding = 4;
-      ImGui::SetNextWindowPos(ImVec2(-padding, -padding), ImGuiCond_Once);
-      ImGui::SetNextWindowSize(ImVec2(windowWidth + 2 * padding, windowHeight + 2 * padding), ImGuiCond_Always);
+      ImGui::SetNextWindowPos(vec2(-padding, -padding), ImGuiCond_Once);
+      ImGui::SetNextWindowSize(vec2(width + 2 * padding, height + 2 * padding), ImGuiCond_Always);
       ImGui::Begin("WndMain", nullptr,
          ImGuiWindowFlags_NoTitleBar |
@@ -1022,15 +1021,15 @@
          ImGuiWindowFlags_NoMove);
 
-      ImGui::InvisibleButton("", ImVec2(10, 80));
-      ImGui::InvisibleButton("", ImVec2(285, 18));
-      ImGui::SameLine();
-      if (ImGui::Button("New Game")) {
+      ButtonImGui btn("New Game");
+
+      ImGui::InvisibleButton("", vec2(10, height / 6));
+      if (btn.draw((width - btn.getWidth()) / 2)) {
          goToScreen(&VulkanGame::renderGameScreen);
       }
 
-      ImGui::InvisibleButton("", ImVec2(10, 15));
-      ImGui::InvisibleButton("", ImVec2(300, 18));
-      ImGui::SameLine();
-      if (ImGui::Button("Quit")) {
+      ButtonImGui btn2("Quit");
+
+      ImGui::InvisibleButton("", vec2(10, 15));
+      if (btn2.draw((width - btn2.getWidth()) / 2)) {
          quitGame();
       }
@@ -1040,8 +1039,8 @@
 }
 
-void VulkanGame::renderGameScreen() {
+void VulkanGame::renderGameScreen(int width, int height) {
    {
-      ImGui::SetNextWindowSize(ImVec2(130, 65), ImGuiCond_Once);
-      ImGui::SetNextWindowPos(ImVec2(10, 50), ImGuiCond_Once);
+      ImGui::SetNextWindowSize(vec2(130, 65), ImGuiCond_Once);
+      ImGui::SetNextWindowPos(vec2(10, 50), ImGuiCond_Once);
       ImGui::Begin("WndStats", nullptr,
          ImGuiWindowFlags_NoTitleBar |
@@ -1056,11 +1055,11 @@
 
    {
-      ImGui::SetNextWindowSize(ImVec2(250, 35), ImGuiCond_Once);
-      ImGui::SetNextWindowPos(ImVec2(380, 10), ImGuiCond_Once);
+      ImGui::SetNextWindowSize(vec2(250, 35), ImGuiCond_Once);
+      ImGui::SetNextWindowPos(vec2(width - 260, 10), ImGuiCond_Always);
       ImGui::Begin("WndMenubar", nullptr,
          ImGuiWindowFlags_NoTitleBar |
          ImGuiWindowFlags_NoResize |
          ImGuiWindowFlags_NoMove);
-      ImGui::InvisibleButton("", ImVec2(155, 18));
+      ImGui::InvisibleButton("", vec2(155, 18));
       ImGui::SameLine();
       if (ImGui::Button("Main Menu")) {
@@ -1071,6 +1070,6 @@
 
    {
-      ImGui::SetNextWindowSize(ImVec2(200, 200), ImGuiCond_Once);
-      ImGui::SetNextWindowPos(ImVec2(430, 60), ImGuiCond_Once);
+      ImGui::SetNextWindowSize(vec2(200, 200), ImGuiCond_Once);
+      ImGui::SetNextWindowPos(vec2(width - 210, 60), ImGuiCond_Always);
       ImGui::Begin("WndDebug", nullptr,
          ImGuiWindowFlags_NoTitleBar |
@@ -1089,4 +1088,5 @@
 }
 
+// TODO: Probably turn this into a UI widget class
 void VulkanGame::renderGuiValueList(vector<UIValue>& values) {
    float maxWidth = 0.0f;
@@ -1126,6 +1126,10 @@
 }
 
-void VulkanGame::goToScreen(void (VulkanGame::* renderScreenFn)()) {
+void VulkanGame::goToScreen(void (VulkanGame::* renderScreenFn)(int width, int height)) {
    currentRenderScreenFn = renderScreenFn;
+
+   // TODO: Maybe just set shouldRecreateSwapChain to true instead. Check this render loop logic
+   // to make sure there'd be no issues
+   //recreateSwapChain();
 }
 
