mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
Settings menu + TrackBar
This commit is contained in:
parent
f375e66ad1
commit
7608300750
9 changed files with 158 additions and 18 deletions
|
|
@ -45,11 +45,11 @@ void GUI::act(float delta) {
|
|||
}
|
||||
this->hover = hover;
|
||||
|
||||
if (Events::clicked(0)) {
|
||||
if (Events::jclicked(0)) {
|
||||
if (pressed == nullptr && this->hover) {
|
||||
pressed = hover;
|
||||
pressed->click(this, mx, my);
|
||||
if (focus) {
|
||||
if (focus && focus != pressed) {
|
||||
focus->defocus();
|
||||
}
|
||||
focus = pressed;
|
||||
|
|
@ -75,6 +75,9 @@ void GUI::act(float delta) {
|
|||
for (auto key : Events::pressedKeys) {
|
||||
focus->keyPressed(key);
|
||||
}
|
||||
if (Events::clicked(mousecode::BUTTON_1)) {
|
||||
focus->mouseMove(this, mx, my);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue