mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-18 09:49:21 +01:00
Update Screen system
Added FuelScreen (Working buttons) Added SellScreen (Nothing working)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
#include "Button.h"
|
||||
#include "structs.h"
|
||||
#include "Texture.h"
|
||||
#include "../TextureManager.h"
|
||||
@@ -9,18 +12,17 @@ public:
|
||||
Screen() = default;
|
||||
Screen(const std::string& filePath, Point2f pos, Point2f size, TextureManager* manager);
|
||||
|
||||
~Screen();
|
||||
virtual ~Screen();
|
||||
|
||||
void setActive(bool active) { m_Active = active; }
|
||||
void toggleActive() { m_Active = !m_Active; }
|
||||
void AddButton(Button* button) { m_Buttons.push_back(button); }
|
||||
|
||||
void Update(float elapsedSecs);
|
||||
void Draw() const;
|
||||
virtual void Update(float elapsedSecs);
|
||||
virtual void Draw() const;
|
||||
private:
|
||||
Point2f m_Position;
|
||||
Point2f m_Size;
|
||||
|
||||
Texture* m_Background{ nullptr };
|
||||
|
||||
bool m_Active{ false };
|
||||
std::vector<Button*> m_Buttons;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user