输出测试,RenderableString基本完成

This commit is contained in:
EmsiaetKadosh
2025-01-17 16:36:39 +08:00
parent 2b7f05d928
commit 1007ac469a
10 changed files with 433 additions and 16 deletions
+8 -6
View File
@@ -5,8 +5,6 @@
#pragma once
#include "Hud.h"
#include "InteractManager.h"
#include "Renderer.h"
#include "Window.h"
class Game {
@@ -15,19 +13,23 @@ class Game {
public:
explicit Game() = default;
void render() const noexcept {
if (window) window->render();
hud.render();
}
void setWindow(Window* window) noexcept {
if (this->window == window) return;
int setWindow(Window* window) noexcept {
if (this->window == window) Success();
if (this->window) this->window->onClose();
this->window = nullptr;
if (window && window->onOpen())
if (window && window->onOpen()) {
this->window = window;
Success();
}
Failed();
}
[[nodiscard]] Window* getWindow() const noexcept { return window; }
};
inline static Game game = Game();