summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-08-15 21:46:55 +0200
committerKahrl <kahrl@gmx.net>2013-08-16 00:08:19 +0200
commitd8337034b532638d246227d850154ee6b21c7ac9 (patch)
tree33dba2b884200976b720f5e5a14c3ee2f811865b /src/guiFormSpecMenu.h
parent7921fe2cd1b284b35c28419fdf78873af456fded (diff)
downloadminetest-d8337034b532638d246227d850154ee6b21c7ac9.tar.gz
minetest-d8337034b532638d246227d850154ee6b21c7ac9.tar.bz2
minetest-d8337034b532638d246227d850154ee6b21c7ac9.zip
Formspec textlist: Black Irrlicht magic to detect fake doubleclicks
Diffstat (limited to 'src/guiFormSpecMenu.h')
-rw-r--r--src/guiFormSpecMenu.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h
index 84124afc3..28f11d2e7 100644
--- a/src/guiFormSpecMenu.h
+++ b/src/guiFormSpecMenu.h
@@ -228,9 +228,9 @@ public:
void updateSelectedItem();
ItemStack verifySelectedItem();
- void acceptInput(int evttype=-1);
+ void acceptInput();
bool OnEvent(const SEvent& event);
-
+
int getListboxIndex(std::string listboxname);
protected:
@@ -272,6 +272,12 @@ protected:
ItemStack m_selected_content_guess;
InventoryLocation m_selected_content_guess_inventory;
+ // WARNING: BLACK IRRLICHT MAGIC, see checkListboxClick()
+ std::wstring m_listbox_click_fname;
+ int m_listbox_click_index;
+ u32 m_listbox_click_time;
+ bool m_listbox_doubleclick;
+
v2s32 m_pointer;
gui::IGUIStaticText *m_tooltip_element;
@@ -301,6 +307,10 @@ private:
fs_key_pendig current_keys_pending;
+ // Determine whether listbox click was double click
+ // (Using some black Irrlicht magic)
+ bool checkListboxClick(std::wstring wlistboxname, int eventtype);
+
void parseElement(parserData* data,std::string element);
void parseSize(parserData* data,std::string element);