diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-29 17:25:30 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:31 +0100 |
commit | a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1 (patch) | |
tree | 7bf54f8141c513650130e8d3cc6bd8ce3f71b1fe /src/Render.hpp | |
parent | 2017-08-27 (diff) | |
download | AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.tar AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.tar.gz AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.tar.bz2 AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.tar.lz AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.tar.xz AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.tar.zst AltCraft-a0d5862d99186f317a0f7364e8b6cd3cfeccfdf1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Render.hpp | 24 |
1 files changed, 20 insertions, 4 deletions
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 <SFML/Window.hpp> +#include <SDL.h> #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<RendererWorld> world; bool renderWorld = false; RenderState renderState; LoopExecutionTimeController timer; - std::map<sf::Keyboard::Key, bool> isKeyPressed; + std::map<SDL_Scancode, bool> 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(); |