From a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Tue, 29 Aug 2017 20:25:30 +0500 Subject: 2017-08-29 --- src/Render.hpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/Render.hpp') diff --git a/src/Render.hpp b/src/Render.hpp index b7d12d0..0b67218 100644 --- a/src/Render.hpp +++ b/src/Render.hpp @@ -1,21 +1,35 @@ #pragma once -#include +#include #include "Shader.hpp" #include "RendererWorld.hpp" -#include "RendererWidget.hpp" class Render { - sf::Window *window; + SDL_Window *window; + SDL_GLContext glContext; + + bool renderGui = false; bool isRunning = true; bool isMouseCaptured = false; + int prevMouseX, prevMouseY; float mouseXDelta, mouseYDelta; std::unique_ptr world; bool renderWorld = false; RenderState renderState; LoopExecutionTimeController timer; - std::map isKeyPressed; + std::map isKeyPressed; + bool HasFocus=true; + float sensetivity = 0.1f; + + enum GlobalState { + InitialLoading, + MainMenu, + Loading, + Playing, + Paused, + } state = InitialLoading; + std::string stateString; void SetMouseCapture(bool IsCaptured); @@ -32,6 +46,8 @@ class Render { void PrepareToRendering(); void UpdateKeyboard(); + + void RenderGui(); public: Render(unsigned int windowWidth, unsigned int windowHeight, std::string windowTitle); ~Render(); -- cgit v1.2.3