mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor: replace references to Events with Input
This commit is contained in:
parent
4c48afbb90
commit
b202d1455b
15 changed files with 160 additions and 116 deletions
|
|
@ -178,10 +178,10 @@ void GUI::actFocused() {
|
|||
focus = nullptr;
|
||||
return;
|
||||
}
|
||||
for (auto codepoint : Events::codepoints) {
|
||||
for (auto codepoint : input.getCodepoints()) {
|
||||
focus->typed(codepoint);
|
||||
}
|
||||
for (auto key : Events::pressedKeys) {
|
||||
for (auto key : input.getPressedKeys()) {
|
||||
focus->keyPressed(key);
|
||||
}
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ void GUI::act(float delta, const Viewport& vp) {
|
|||
updateTooltip(delta);
|
||||
|
||||
const auto& cursor = input.getCursor();
|
||||
if (!Events::isCursorLocked()) {
|
||||
if (!cursor.locked) {
|
||||
actMouse(delta, cursor);
|
||||
} else {
|
||||
if (hover) {
|
||||
|
|
@ -357,3 +357,7 @@ void GUI::toggleDebug() {
|
|||
const Input& GUI::getInput() const {
|
||||
return engine.getInput();
|
||||
}
|
||||
|
||||
Input& GUI::getInput() {
|
||||
return engine.getInput();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue