mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 10:29:47 +00:00
Merge 2c8fd60870 into cb5bebf3ae
This commit is contained in:
commit
e78b0f0367
64 changed files with 8634 additions and 387 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue