Index: game-gui-glfw.cpp
===================================================================
--- game-gui-glfw.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ game-gui-glfw.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -79,5 +79,5 @@
    if (glfwWindowShouldClose(window)) {
       UIEvent e;
-      e.type = UI_EVENT_QUIT;
+      e.event.type = UI_EVENT_QUIT;
 
       s_events.push(e);
@@ -147,6 +147,6 @@
 void glfw_key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {
    UIEvent e;
-   e.type = action == GLFW_RELEASE ? UI_EVENT_KEYUP : UI_EVENT_KEYDOWN;
-   e.key.keycode = key;
+   e.event.type = action == GLFW_RELEASE ? UI_EVENT_KEYUP : UI_EVENT_KEYDOWN;
+   e.event.key.keycode = key;
 
    GameGui_GLFW::s_events.push(e);
@@ -155,7 +155,7 @@
 void glfw_window_size_callback(GLFWwindow* window, int width, int height) {
    UIEvent e;
-   e.type = UI_EVENT_WINDOWRESIZE;
-   e.windowResize.width = width;
-   e.windowResize.height = height;
+   e.event.type = UI_EVENT_WINDOWRESIZE;
+   e.event.windowResize.width = width;
+   e.event.windowResize.height = height;
 
    GameGui_GLFW::s_events.push(e);
Index: game-gui-sdl.cpp
===================================================================
--- game-gui-sdl.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ game-gui-sdl.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -79,5 +79,5 @@
 }
 
-int GameGui_SDL::pollEvent(UIEvent* event) {
+int GameGui_SDL::pollEvent(UIEvent* uiEvent) {
    SDL_Event e;
 
@@ -87,4 +87,8 @@
 
    if (SDL_PollEvent(&e)) {
+      uiEvent->rawEvent.sdl = e;
+
+      GameEvent* event = &uiEvent->event;
+
       switch(e.type) {
          case SDL_QUIT:
@@ -93,7 +97,10 @@
          case SDL_WINDOWEVENT:
             if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED ||
-               e.window.event == SDL_WINDOWEVENT_MINIMIZED ||
-               e.window.event == SDL_WINDOWEVENT_MAXIMIZED) {
+                  e.window.event == SDL_WINDOWEVENT_MINIMIZED ||
+                  e.window.event == SDL_WINDOWEVENT_MAXIMIZED) {
                event->type = UI_EVENT_WINDOWRESIZE;
+            } else if (e.window.event == SDL_WINDOWEVENT_CLOSE &&
+                  e.window.windowID == SDL_GetWindowID(window)) {
+               event->type = UI_EVENT_QUIT;
             } else {
                event->type = UI_EVENT_WINDOW;
@@ -122,24 +129,23 @@
             event->mouse.y = e.motion.y;
          case SDL_FINGERMOTION:
+            // TODO: Get coordinates for finger events
             event->type = UI_EVENT_MOUSEMOTION;
             break;
-         // Ignore the following events
+         // The following events are not currently supported
          case SDL_AUDIODEVICEADDED:
          case SDL_AUDIODEVICEREMOVED:
          case SDL_TEXTINPUT:
          case SDL_TEXTEDITING:
+         case SDL_MOUSEWHEEL:
             event->type = UI_EVENT_UNKNOWN;
-            event->unknown.eventType = e.type;
             break;
          default:
             event->type = UI_EVENT_UNKNOWN;
-            event->unknown.eventType = 0;
       }
 
       return 1;
+   } else {
+      return 0;
    }
-
-   event = nullptr;
-   return 0;
 }
 
Index: game-gui-sdl.hpp
===================================================================
--- game-gui-sdl.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ game-gui-sdl.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -23,5 +23,5 @@
 
       void processEvents();
-      int pollEvent(UIEvent* event);
+      int pollEvent(UIEvent* uiEvent);
       bool keyPressed(unsigned int key);
 
Index: game-gui.hpp
===================================================================
--- game-gui.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ game-gui.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -8,4 +8,9 @@
    #include <vulkan/vulkan.h>
 #endif
+
+// These are included here so I can implement the RawEvent union, which requires knowledge
+// of the ui event types of all ui libraries I might use for any of the GameGui clases
+// GLFW does not have its own event type though, so SDL is currently the only library this is done for
+#include <SDL2/SDL.h>
 
 using namespace std;
@@ -25,6 +30,6 @@
 };
 
-struct WindowEvent {
-   EventType type;
+union RawEvent {
+   SDL_Event sdl;
 };
 
@@ -45,4 +50,8 @@
 };
 
+struct WindowEvent {
+   EventType type;
+};
+
 struct WindowResizeEvent {
    EventType type;
@@ -53,10 +62,9 @@
 struct UnknownEvent {
    EventType type;
-   unsigned int eventType;
 };
 
 // TODO: Switch from union to std::variant
 
-union UIEvent {
+union GameEvent {
    EventType type;
    WindowEvent window;
@@ -65,4 +73,9 @@
    WindowResizeEvent windowResize;
    UnknownEvent unknown;
+};
+
+struct UIEvent {
+   RawEvent rawEvent;
+   GameEvent event;
 };
 
@@ -80,5 +93,5 @@
 
       virtual void processEvents() = 0;
-      virtual int pollEvent(UIEvent* event) = 0;
+      virtual int pollEvent(UIEvent* uiEvent) = 0;
       virtual bool keyPressed(unsigned int key) = 0;
 
Index: gui/button.cpp
===================================================================
--- gui/button.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/button.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -87,5 +87,5 @@
 }
 
-void Button::handleEvent(UIEvent& e) {
+void Button::handleEvent(GameEvent& e) {
    switch(e.type) {
       case UI_EVENT_MOUSEMOTION:
Index: gui/button.hpp
===================================================================
--- gui/button.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/button.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -21,5 +21,5 @@
    void init() override;
    void render(int x, int y) override;
-   void handleEvent(UIEvent& e) override;
+   void handleEvent(GameEvent& e) override;
 
 private:
Index: gui/game-screen.cpp
===================================================================
--- gui/game-screen.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/game-screen.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -49,5 +49,5 @@
 }
 
-void GameScreen::handleEvent(UIEvent& e) {
+void GameScreen::handleEvent(GameEvent& e) {
    Screen::handleEvent(e);
 }
Index: gui/game-screen.hpp
===================================================================
--- gui/game-screen.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/game-screen.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -13,5 +13,5 @@
       void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) override;
 
-      void handleEvent(UIEvent& e) override;
+      void handleEvent(GameEvent& e) override;
 };
 
Index: gui/main-screen.cpp
===================================================================
--- gui/main-screen.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/main-screen.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -21,5 +21,5 @@
 }
 
-void MainScreen::handleEvent(UIEvent& e) {
+void MainScreen::handleEvent(GameEvent& e) {
    Screen::handleEvent(e);
 }
Index: gui/main-screen.hpp
===================================================================
--- gui/main-screen.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/main-screen.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -13,5 +13,5 @@
       void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) override;
 
-      void handleEvent(UIEvent& e) override;
+      void handleEvent(GameEvent& e) override;
 };
 
Index: gui/panel.cpp
===================================================================
--- gui/panel.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/panel.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -72,5 +72,5 @@
 }
 
-void Panel::handleEvent(UIEvent& e) {
+void Panel::handleEvent(GameEvent& e) {
    for (UIElement*& uiElement : this->uiElements) {
       uiElement->handleEvent(e);
Index: gui/panel.hpp
===================================================================
--- gui/panel.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/panel.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -19,5 +19,5 @@
 
    void render(int x, int y) override;
-   void handleEvent(UIEvent& e) override;
+   void handleEvent(GameEvent& e) override;
 
 private:
Index: gui/screen.cpp
===================================================================
--- gui/screen.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/screen.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -29,5 +29,5 @@
 }
 
-void Screen::handleEvent(UIEvent& e) {
+void Screen::handleEvent(GameEvent& e) {
    for (UIElement*& uiElement : this->uiElements) {
       uiElement->handleEvent(e);
Index: gui/screen.hpp
===================================================================
--- gui/screen.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/screen.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -17,9 +17,4 @@
 class VulkanGame;
 
-template<class Type>
-struct ValueReference {
-   
-};
-
 // TODO: Add a function to create an SDL_Color from a uint32_t
 
@@ -34,5 +29,5 @@
    
    virtual void renderUI();
-   virtual void handleEvent(UIEvent& e);
+   virtual void handleEvent(GameEvent& e);
    void addUIElement(UIElement* element);
 
Index: gui/ui-element.cpp
===================================================================
--- gui/ui-element.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/ui-element.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -21,4 +21,4 @@
 }
 
-void UIElement::handleEvent(UIEvent& e) {
+void UIElement::handleEvent(GameEvent& e) {
 }
Index: gui/ui-element.hpp
===================================================================
--- gui/ui-element.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ gui/ui-element.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -18,5 +18,5 @@
    virtual void init();
    virtual void render(int x, int y) = 0;
-   virtual void handleEvent(UIEvent& e);
+   virtual void handleEvent(GameEvent& e);
 
 protected:
Index: main-vulkan.cpp
===================================================================
--- main-vulkan.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ main-vulkan.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -4,6 +4,6 @@
 #include "crash-logger.hpp"
 
-//#include "vulkan-game.hpp"
-#include "sdl-game.hpp"
+#include "vulkan-game.hpp"
+//#include "sdl-game.hpp"
 
 using namespace std;
@@ -24,7 +24,6 @@
 
    try {
-      //game.run(800, 600, 0);
+      game.run(800, 600, 0);
       //game.run(800, 600, GUI_FLAGS_WINDOW_FULLSCREEN);
-      game.run(1280, 720, 0);
    } catch (const exception& e) {
       cerr << e.what() << endl;
Index: opengl-game.cpp
===================================================================
--- opengl-game.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ opengl-game.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -160,5 +160,5 @@
 
 void OpenGLGame::mainLoop() {
-   UIEvent e;
+   UIEvent uiEvent;
    bool quit = false;
 
@@ -166,5 +166,7 @@
       gui->processEvents();
 
-      while (gui->pollEvent(&e)) {
+      while (gui->pollEvent(&uiEvent)) {
+         GameEvent& e = uiEvent.event;
+
          switch (e.type) {
             case UI_EVENT_QUIT:
Index: opengl-game.hpp
===================================================================
--- opengl-game.hpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ opengl-game.hpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -4,4 +4,5 @@
 #include <glm/glm.hpp>
 
+// TODO: Rewrite this to work with the new version of IMGUI
 #include "IMGUI/imgui.h"
 #include "imgui_impl_glfw_gl3.h"
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision 8b823e70b085fb1894bc004664a0d5f263df62f4)
+++ vulkan-game.cpp	(revision d8cf709c0d0adf8142fb20befd80d09d2e505e77)
@@ -771,5 +771,4 @@
 
 void VulkanGame::mainLoop() {
-   UIEvent e;
    this->quit = false;
 
@@ -799,5 +798,8 @@
       gui->processEvents();
 
-      while (gui->pollEvent(&e)) {
+      UIEvent uiEvent;
+      while (gui->pollEvent(&uiEvent)) {
+         GameEvent& e = uiEvent.event;
+
          switch(e.type) {
             case UI_EVENT_QUIT:
