Removed some agame things; Added VSYNC
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
|
||||
namespace Game::AGame {
|
||||
GAME_ENTITY(Background)
|
||||
private:
|
||||
Object::Sound mSound;
|
||||
public:
|
||||
void onWindowResized(int newWidth, int newHeight) override;
|
||||
private:
|
||||
Object::Sound mSound;
|
||||
END_GAME_ENTITY()
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <object/entity.hpp>
|
||||
#include <renderer/texture.hpp>
|
||||
#include <renderer/font.hpp>
|
||||
#include <object/sound.hpp>
|
||||
|
||||
namespace Game::AGame {
|
||||
GAME_ENTITY(CamController)
|
||||
public:
|
||||
void onWindowResized(int newWidth, int newHeight) override {
|
||||
mScreenW = newWidth;
|
||||
mScreenH = newHeight;
|
||||
}
|
||||
|
||||
private:
|
||||
int mScreenW, mScreenH;
|
||||
END_GAME_ENTITY()
|
||||
}
|
||||
24
include/game/agame/sampletextbox.hpp
Normal file
24
include/game/agame/sampletextbox.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include <object/ui/uitextbox.hpp>
|
||||
|
||||
namespace Game::AGame {
|
||||
class SampleTextBox : public Object::UITextBox {
|
||||
using Object::UITextBox::UITextBox; // Inherit constructors
|
||||
|
||||
public:
|
||||
~SampleTextBox() override = default;
|
||||
|
||||
void start() override {
|
||||
// Call the base class start to initialize the text box
|
||||
mZIndex = 1000; // Ensure it renders on top of most other entities
|
||||
Object::UITextBox::start();
|
||||
setText("Hello, World!");
|
||||
|
||||
mIsActive = false;
|
||||
}
|
||||
void update(float deltaTime) override {
|
||||
// Call the base class update to handle input and text refreshing
|
||||
Object::UITextBox::update(deltaTime);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user