feat: add map background color

This commit is contained in:
2021-12-12 16:13:05 +01:00
parent 43f21ffd44
commit 1a091baeaf
10 changed files with 32 additions and 4 deletions

View File

@@ -29,6 +29,8 @@ private:
std::unique_ptr<WorldShader> m_WorldShader;
std::unique_ptr<EntityShader> m_EntityShader;
glm::vec3 m_BackgroundColor;
bool m_IsometricView = true;
float m_IsometricShade = m_IsometricView;
glm::vec2 m_CamPos{};
@@ -49,6 +51,8 @@ public:
void setCamPos(const glm::vec2& newPos);
void setIsometricView(bool isometric); // false = 2D true = Isometric
void setBackgroundColor(const glm::vec3& color) { m_BackgroundColor = color; }
glm::vec2 getCursorWorldPos(const glm::vec2& cursorPos, float aspectRatio, float zoom, float windowWidth, float windowHeight);
private:
void updateIsometricView();