mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
block.material + minor refactor
This commit is contained in:
parent
8730b03a52
commit
b1a79e3a6e
9 changed files with 35 additions and 16 deletions
|
|
@ -113,16 +113,14 @@ void GUI::actFocused() {
|
|||
}
|
||||
}
|
||||
|
||||
/// @brief Processing user input and UI logic
|
||||
/// @param delta delta time
|
||||
void GUI::act(float delta) {
|
||||
void GUI::act(float delta, const Viewport& vp) {
|
||||
while (!postRunnables.empty()) {
|
||||
runnable callback = postRunnables.back();
|
||||
postRunnables.pop();
|
||||
callback();
|
||||
}
|
||||
|
||||
container->setSize(glm::vec2(Window::width, Window::height));
|
||||
container->setSize(vp.size());
|
||||
container->act(delta);
|
||||
auto prevfocus = focus;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../../delegates.h"
|
||||
|
||||
class Viewport;
|
||||
class GfxContext;
|
||||
class Assets;
|
||||
class Camera;
|
||||
|
|
@ -80,7 +81,8 @@ namespace gui {
|
|||
|
||||
/// @brief Main input handling and logic update method
|
||||
/// @param delta delta time
|
||||
void act(float delta);
|
||||
/// @param viewport window size
|
||||
void act(float delta, const Viewport& viewport);
|
||||
|
||||
/// @brief Draw all visible elements on main container
|
||||
/// @param pctx parent graphics context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue