This commit is contained in:
Alex Zebra 2026-11-03 20:25:14 +03:00 • committed by GitHub
commit e78b0f0367
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
64 changed files with 8634 additions and 387 deletions

View file

@ -15,6 +15,11 @@ public:
void onOpen() override;
// the bar covers the top getDecorationHeight() pixels, no widgets there
int getContentInset(const Window&) const override {
return 0;
}
void update(float delta) override;
void draw(float delta) override;

View file

@ -1,4 +1,5 @@
#include "Screen.hpp"
#include "window/Window.hpp"
#include "graphics/core/Batch2D.hpp"
#include "engine/Engine.hpp"
@ -10,3 +11,7 @@ Screen::Screen(Engine& engine)
Screen::~Screen() {
}
int Screen::getContentInset(const Window& window) const {
return window.getDecorationHeight();
}

View file

@ -4,6 +4,7 @@
class Engine;
class Batch2D;
class Window;
/// @brief Screen is a mainloop state
class Screen : public util::ObjectsKeeper {
@ -18,4 +19,7 @@ public:
virtual void draw(float delta) = 0;
virtual void onEngineShutdown() {};
virtual const char* getName() const = 0;
/// @brief Inset of the GUI content from the top of the window
virtual int getContentInset(const Window& window) const;
};