summaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2018-04-03 11:15:58 +0200
committerGitHub <noreply@github.com>2018-04-03 11:15:58 +0200
commitbaca933b6bcf8c321748defa19769a54b27a89ba (patch)
tree50af3b97e0d1a599c1a0e7abad204b8fb9739f17 /src/gui/guiFormSpecMenu.h
parent528908a4c3dd190cb7a6007df1e3fcd8e4604bfa (diff)
downloadminetest-baca933b6bcf8c321748defa19769a54b27a89ba.tar.gz
minetest-baca933b6bcf8c321748defa19769a54b27a89ba.tar.bz2
minetest-baca933b6bcf8c321748defa19769a54b27a89ba.zip
Selected ItemStack: Reduce black magic (#6520)
* Selected ItemStack: Reduce black magic Better button variable value naming
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r--src/gui/guiFormSpecMenu.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h
index 7a096a1ea..51d25a4f5 100644
--- a/src/gui/guiFormSpecMenu.h
+++ b/src/gui/guiFormSpecMenu.h
@@ -348,7 +348,7 @@ public:
void regenerateGui(v2u32 screensize);
ItemSpec getItemAtPos(v2s32 p) const;
- void drawList(const ListDrawSpec &s, int phase, bool &item_hovered);
+ void drawList(const ListDrawSpec &s, int layer, bool &item_hovered);
void drawSelectedItem();
void drawMenu();
void updateSelectedItem();
@@ -404,14 +404,9 @@ protected:
std::vector<std::pair<FieldSpec, std::vector<std::string> > > m_dropdowns;
ItemSpec *m_selected_item = nullptr;
- u32 m_selected_amount = 0;
+ u16 m_selected_amount = 0;
bool m_selected_dragging = false;
-
- // WARNING: BLACK MAGIC
- // Used to guess and keep up with some special things the server can do.
- // If name is "", no guess exists.
- ItemStack m_selected_content_guess;
- InventoryLocation m_selected_content_guess_inventory;
+ ItemStack m_selected_swap;
v2s32 m_pointer;
v2s32 m_old_pointer; // Mouse position after previous mouse event