Changeset e1f88a9 in opengl-game for vulkan-game.hpp


Ignore:
Timestamp:
Jun 10, 2020, 2:36:24 AM (4 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master
Children:
699e83a
Parents:
4e705d6
Message:

Create a system to draw and switch between different screens, a Screen class, a MainScreen class that extends it, and some classes for UI elements that can be added to screens.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r4e705d6 re1f88a9  
    33
    44#include <chrono>
     5#include <map>
    56
    67#define GLM_FORCE_RADIANS
     
    1617#include "game-gui-sdl.hpp"
    1718
     19#include "gui/screen.hpp"
     20#include "gui/main-screen.hpp"
     21
    1822using namespace glm;
    1923using namespace std::chrono;
    20 
    21 // TODO: Switch from union to std::variant
    2224
    2325#ifdef NDEBUG
     
    195197      void run(int width, int height, unsigned char guiFlags);
    196198
     199      void goToScreen(Screen* screen);
     200      void quitGame();
     201
     202      map<ScreenType, Screen*> screens;
     203      Screen* currentScreen;
     204
     205      TTF_Font* proggyFont;
     206
    197207      GraphicsPipeline_Vulkan<OverlayVertex, void*> overlayPipeline;
    198208
     
    219229      const int EXPLOSION_PARTICLE_COUNT = 300;
    220230      const vec3 LASER_COLOR = vec3(0.2f, 1.0f, 0.2f);
     231
     232      bool quit;
    221233
    222234      vec3 cam_pos;
Note: See TracChangeset for help on using the changeset viewer.