Index: game-gui-glfw.cpp
===================================================================
--- game-gui-glfw.cpp	(revision df2cc24412ac561853397000d4d4c5d7d73f2904)
+++ game-gui-glfw.cpp	(revision f133da0e6c0bd2262bec5cd74873703ddb01e55b)
@@ -60,8 +60,10 @@
    // I think glfwGetWindowSize(window, width, height) works fine.
 
+   return window;
+}
+
+void GameGui_GLFW::bindEventHandlers() {
    glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);
    glfwSetKeyCallback(window, glfw_key_callback);
-
-   return window;
 }
 
Index: game-gui-glfw.hpp
===================================================================
--- game-gui-glfw.hpp	(revision df2cc24412ac561853397000d4d4c5d7d73f2904)
+++ game-gui-glfw.hpp	(revision f133da0e6c0bd2262bec5cd74873703ddb01e55b)
@@ -29,4 +29,5 @@
       void destroyWindow();
 
+      void bindEventHandlers();
       void processEvents();
       int pollEvent(UIEvent* event);
Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision df2cc24412ac561853397000d4d4c5d7d73f2904)
+++ new-game.cpp	(revision f133da0e6c0bd2262bec5cd74873703ddb01e55b)
@@ -397,4 +397,5 @@
    cout << "MAX_UNIFORMS: " << MAX_UNIFORMS << endl;
 
+/*** START OF REFACTORED CODE ***/
    // Setup Dear ImGui binding
    IMGUI_CHECKVERSION();
@@ -411,4 +412,5 @@
    glfwSetMouseButtonCallback(window, mouse_button_callback);
    glfwSetKeyCallback(window, key_callback);
+/*** END OF REFACTORED CODE ***/
 
    glfwSetWindowSizeCallback(window, window_size_callback);
@@ -2446,4 +2448,5 @@
 }
 
+/*** START OF REFACTORED CODE ***/
 void renderMainMenuGui() {
    ImGui_ImplGlfwGL3_NewFrame();
@@ -2478,4 +2481,5 @@
    ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
 }
+/*** END OF REFACTORED CODE ***/
 
 void initGuiValueLists(map<string, vector<UIValue>> valueLists) {
Index: opengl-game.cpp
===================================================================
--- opengl-game.cpp	(revision df2cc24412ac561853397000d4d4c5d7d73f2904)
+++ opengl-game.cpp	(revision f133da0e6c0bd2262bec5cd74873703ddb01e55b)
@@ -87,4 +87,20 @@
       cout << "OpenGL debug message callback is not supported" << endl;
    }
+
+   // Setup Dear ImGui binding
+   IMGUI_CHECKVERSION();
+   ImGui::CreateContext();
+   ImGuiIO& io = ImGui::GetIO(); (void)io;
+   //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
+   //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;   // Enable Gamepad Controls
+   ImGui_ImplGlfwGL3_Init(window, true);
+
+   // Setup style
+   ImGui::StyleColorsDark();
+   //ImGui::StyleColorsClassic();
+
+   // The glfw event handlers have to be bound after ImGui is initialized.
+   // Otherwise, it seems they get overridden by ImGui
+   ((GameGui_GLFW*)gui)->bindEventHandlers();
 }
 
@@ -103,4 +119,5 @@
                break;
             case UI_EVENT_KEY:
+               cout << "Got a key event" << endl;
                if (e.key.keycode == GLFW_KEY_ESCAPE) {
                   quit = true;
@@ -121,9 +138,48 @@
       //glViewport(0, 0, gui->getWindowWidth(), gui->getWindowHeight());
 
+      renderScene();
+      renderUI();
+
       glfwSwapBuffers(window);
    }
 }
 
+void OpenGLGame::renderScene() {
+
+}
+
+void OpenGLGame::renderUI() {
+   ImGui_ImplGlfwGL3_NewFrame();
+
+   {
+      int padding = 4;
+      ImGui::SetNextWindowPos(ImVec2(-padding, -padding), ImGuiCond_Once);
+      ImGui::SetNextWindowSize(ImVec2(gui->getWindowWidth() + 2 * padding, gui->getWindowHeight() + 2 * padding), ImGuiCond_Always);
+      ImGui::Begin("WndMain", NULL,
+         ImGuiWindowFlags_NoTitleBar |
+         ImGuiWindowFlags_NoResize |
+         ImGuiWindowFlags_NoMove);
+
+      ImGui::InvisibleButton("", ImVec2(10, 80));
+      ImGui::InvisibleButton("", ImVec2(285, 18));
+      ImGui::SameLine();
+      ImGui::Button("New Game");
+
+      ImGui::InvisibleButton("", ImVec2(10, 15));
+      ImGui::InvisibleButton("", ImVec2(300, 18));
+      ImGui::SameLine();
+      ImGui::Button("Quit");
+
+      ImGui::End();
+   }
+
+   ImGui::Render();
+   ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
+}
+
 void OpenGLGame::cleanup() {
+   ImGui_ImplGlfwGL3_Shutdown();
+   ImGui::DestroyContext();
+
    gui->destroyWindow();
    gui->shutdown();
Index: opengl-game.hpp
===================================================================
--- opengl-game.hpp	(revision df2cc24412ac561853397000d4d4c5d7d73f2904)
+++ opengl-game.hpp	(revision f133da0e6c0bd2262bec5cd74873703ddb01e55b)
@@ -1,4 +1,7 @@
 #ifndef _OPENGL_GAME_H
 #define _OPENGL_GAME_H
+
+#include "IMGUI/imgui.h"
+#include "imgui_impl_glfw_gl3.h"
 
 #include "game-gui-glfw.hpp"
@@ -18,4 +21,6 @@
       void initOpenGL();
       void mainLoop();
+      void renderScene();
+      void renderUI();
       void cleanup();
 };
