Touch controls (#2053)

* WIP touch controls

* Action icons

* Updates

* Don't mutate freeCamera config; allow switching between touch and controller cam

* Wow

* Fix build & add Skip button

* Fix build & add settings

* RCSS cleanup

* Dpad and fishing, might redo

* Add menu mouse controls

* More pointer & fix icons

* Optimizations & introduce layout system

* Update aurora

* Implement touch controls layout editor

* Cleanup & fixes

* Allow disabling mouse/touch in menus

* More fixes
This commit is contained in:
Luke Street
2026-06-15 12:48:04 -06:00
committed by GitHub
parent a6e5160c71
commit ad53af5c78
66 changed files with 6372 additions and 136 deletions
+3 -11
View File
@@ -1,4 +1,5 @@
#include "dusk/mouse.h"
#include "dusk/menu_pointer.h"
#include "dusk/settings.h"
#include "dusk/ui/ui.hpp"
#include "d/actor/d_a_alink.h"
@@ -26,16 +27,7 @@ void reset_deltas() {
}
bool queryMouseAimContext() {
if (!getSettings().game.enableMouseAim) {
return false;
}
daAlink_c* link = daAlink_getAlinkActorClass();
if (link == nullptr) {
return false;
}
return link->checkAimContext() && dComIfGp_checkCameraAttentionStatus(link->field_0x317c, 0x10);
return getSettings().game.enableMouseAim.getValue() && dCamera_c::isAimActive();
}
bool wantMouseCapture() {
@@ -50,7 +42,7 @@ bool isWindowFocused(SDL_Window* window) {
}
bool shouldCaptureMouse(SDL_Window* window) {
if (window == nullptr || ui::any_document_visible()) {
if (window == nullptr || ui::any_document_visible() || menu_pointer::active()) {
return false;
}
return wantMouseCapture() && isWindowFocused(window);