From baca933b6bcf8c321748defa19769a54b27a89ba Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 3 Apr 2018 11:15:58 +0200 Subject: Selected ItemStack: Reduce black magic (#6520) * Selected ItemStack: Reduce black magic Better button variable value naming --- src/gui/guiFormSpecMenu.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/gui/guiFormSpecMenu.h') 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 > > 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 -- cgit v1.2.3