mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Formspecs: volume and key settings windows can now be closed by doubleclicking/tapping (#10128)
Co-authored-by: Xx_Crazyminer_xX <carlo.digioia@hotmail.it> Co-authored-by: Marco <4279489-marco_a@users.noreply.gitlab.com>
This commit is contained in:
parent
4b4513a67d
commit
cfaef5b1cf
10 changed files with 119 additions and 130 deletions
|
@ -457,30 +457,8 @@ private:
|
|||
*/
|
||||
void legacySortElements(core::list<IGUIElement *>::Iterator from);
|
||||
|
||||
/**
|
||||
* check if event is part of a double click
|
||||
* @param event event to evaluate
|
||||
* @return true/false if a doubleclick was detected
|
||||
*/
|
||||
bool DoubleClickDetection(const SEvent event);
|
||||
|
||||
struct clickpos
|
||||
{
|
||||
v2s32 pos;
|
||||
s64 time;
|
||||
};
|
||||
clickpos m_doubleclickdetect[2];
|
||||
|
||||
int m_btn_height;
|
||||
gui::IGUIFont *m_font = nullptr;
|
||||
|
||||
/* If true, remap a double-click (or double-tap) action to ESC. This is so
|
||||
* that, for example, Android users can double-tap to close a formspec.
|
||||
*
|
||||
* This value can (currently) only be set by the class constructor
|
||||
* and the default value for the setting is true.
|
||||
*/
|
||||
bool m_remap_dbl_click;
|
||||
};
|
||||
|
||||
class FormspecFormSource: public IFormSource
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue