mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add crosshair support for Android (#7865)
If enabled, a crosshair will be shown to select object. This will give Android players a way to play like they play on desktop. On third-person back camera mode, player is forced to use crosshair. On third-person front camera mode, player is unable to select anything. Co-authored-by: ROllerozxa <temporaryemail4meh+github@gmail.com> Co-authored-by: rubenwardy <rw@rubenwardy.com>
This commit is contained in:
parent
b1233056b7
commit
3978b9b8ed
6 changed files with 53 additions and 24 deletions
|
@ -194,6 +194,7 @@ public:
|
|||
void step(float dtime);
|
||||
void resetHud();
|
||||
void registerHudItem(int index, const rect<s32> &rect);
|
||||
inline void setUseCrosshair(bool use_crosshair) { m_draw_crosshair = use_crosshair; }
|
||||
void Toggle(bool visible);
|
||||
|
||||
void hide();
|
||||
|
@ -240,6 +241,7 @@ private:
|
|||
bool m_joystick_has_really_moved = false;
|
||||
bool m_fixed_joystick = false;
|
||||
bool m_joystick_triggers_aux1 = false;
|
||||
bool m_draw_crosshair = false;
|
||||
button_info *m_joystick_btn_off = nullptr;
|
||||
button_info *m_joystick_btn_bg = nullptr;
|
||||
button_info *m_joystick_btn_center = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue