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
+26
View File
@@ -0,0 +1,26 @@
#include "dusk/touch_camera.h"
namespace dusk::touch_camera {
namespace {
float s_yaw_dp = 0.0f;
float s_pitch_dp = 0.0f;
} // namespace
void add_delta(float yaw_dp, float pitch_dp) noexcept {
s_yaw_dp += yaw_dp;
s_pitch_dp += pitch_dp;
}
bool consume_delta(float& yaw_dp, float& pitch_dp) noexcept {
yaw_dp = s_yaw_dp;
pitch_dp = s_pitch_dp;
clear();
return yaw_dp != 0.0f || pitch_dp != 0.0f;
}
void clear() noexcept {
s_yaw_dp = 0.0f;
s_pitch_dp = 0.0f;
}
} // namespace dusk::touch_camera