mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
refactor: reduce Window references
This commit is contained in:
parent
896ab3597a
commit
74a94f869c
19 changed files with 151 additions and 155 deletions
|
|
@ -115,8 +115,10 @@ void GUI::actMouse(float delta) {
|
|||
}
|
||||
if (hover) {
|
||||
hover->setHover(true);
|
||||
if (Events::scroll) {
|
||||
hover->scrolled(Events::scroll);
|
||||
|
||||
int scroll = Events::getScroll();
|
||||
if (scroll) {
|
||||
hover->scrolled(scroll);
|
||||
}
|
||||
}
|
||||
this->hover = hover;
|
||||
|
|
@ -229,6 +231,7 @@ void GUI::draw(const DrawContext& pctx, const Assets& assets) {
|
|||
}
|
||||
menu->setPos((wsize - menu->getSize()) / 2.0f);
|
||||
uicamera->setFov(wsize.y);
|
||||
uicamera->setAspectRatio(viewport.getRatio());
|
||||
|
||||
auto uishader = assets.get<Shader>("ui");
|
||||
uishader->use();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue