mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update gui.create_frame return value
This commit is contained in:
parent
8468ab184d
commit
8ee2edef5c
5 changed files with 37 additions and 21 deletions
|
|
@ -129,7 +129,7 @@ void GUI::actMouse(Frame& frame, float delta, const CursorState& cursor) {
|
|||
doubleClicked = false;
|
||||
doubleClickTimer += delta + mouseDelta * 0.1f;
|
||||
|
||||
auto hover = container->getAt(cursor.pos);
|
||||
auto hover = frame.getAt(cursor.pos);
|
||||
if (this->hover && this->hover != hover) {
|
||||
this->hover->setMouseEnter(false);
|
||||
}
|
||||
|
|
@ -289,8 +289,8 @@ void GUI::draw(const DrawContext& pctx, Assets& assets) {
|
|||
uicamera->setAspectRatio(viewport.x / static_cast<float>(viewport.y));
|
||||
|
||||
auto uishader = assets.get<Shader>("ui");
|
||||
uishader->use();
|
||||
uishader->uniformMatrix("u_projview", uicamera->getProjView());
|
||||
uishader->use();
|
||||
|
||||
batch2D->begin();
|
||||
for (auto& [outputTexture, frame] : frames) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue