mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
refactor: reduce Window references
This commit is contained in:
parent
896ab3597a
commit
74a94f869c
19 changed files with 151 additions and 155 deletions
|
|
@ -68,11 +68,11 @@ void guiutil::alert(
|
|||
));
|
||||
panel->refresh();
|
||||
|
||||
panel->keepAlive(Events::keyCallbacks[keycode::ENTER].add([on_hidden_final](){
|
||||
panel->keepAlive(Events::addKeyCallback(keycode::ENTER, [on_hidden_final](){
|
||||
on_hidden_final();
|
||||
return true;
|
||||
}));
|
||||
panel->keepAlive(Events::keyCallbacks[keycode::ESCAPE].add([on_hidden_final](){
|
||||
panel->keepAlive(Events::addKeyCallback(keycode::ESCAPE, [on_hidden_final](){
|
||||
on_hidden_final();
|
||||
return true;
|
||||
}));
|
||||
|
|
@ -130,11 +130,11 @@ void guiutil::confirm(
|
|||
}));
|
||||
|
||||
panel->add(subpanel);
|
||||
panel->keepAlive(Events::keyCallbacks[keycode::ENTER].add([=](){
|
||||
panel->keepAlive(Events::addKeyCallback(keycode::ENTER, [=](){
|
||||
on_confirm_final();
|
||||
return true;
|
||||
}));
|
||||
panel->keepAlive(Events::keyCallbacks[keycode::ESCAPE].add([=](){
|
||||
panel->keepAlive(Events::addKeyCallback(keycode::ESCAPE, [=](){
|
||||
on_deny_final();
|
||||
return true;
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue