X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgui%2FguiFormSpecMenu.h;h=d75a108d4a9a36b8a1544055a673dd193a0e5406;hb=f409f4476539f32dcce3ff6832be4bc48bd25634;hp=7a096a1ea14ff185fd057fcce1bc2aaf58f269bc;hpb=2323842dd3dd336b087ca3cf9756e0680b3a1244;p=dragonfireclient.git diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index 7a096a1ea..d75a108d4 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -223,7 +223,7 @@ class GUIFormSpecMenu : public GUIModalMenu struct BoxDrawSpec { - BoxDrawSpec(v2s32 a_pos, v2s32 a_geom,irr::video::SColor a_color): + BoxDrawSpec(v2s32 a_pos, v2s32 a_geom, irr::video::SColor a_color): pos(a_pos), geom(a_geom), color(a_color) @@ -348,7 +348,7 @@ class GUIFormSpecMenu : public GUIModalMenu 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(); @@ -372,13 +372,17 @@ class GUIFormSpecMenu : public GUIModalMenu { return padding + offset + AbsoluteRect.UpperLeftCorner; } + std::wstring getLabelByID(s32 id); + std::string getNameByID(s32 id); + v2s32 getElementBasePos(bool absolute, + const std::vector *v_pos); v2s32 padding; - v2s32 spacing; + v2f32 spacing; v2s32 imgsize; v2s32 offset; - v2s32 pos_offset; - std::stack container_stack; + v2f32 pos_offset; + std::stack container_stack; InventoryManager *m_invmgr; ISimpleTextureSource *m_tsrc; @@ -400,21 +404,15 @@ class GUIFormSpecMenu : public GUIModalMenu std::vector > m_tables; std::vector > m_checkboxes; std::map m_tooltips; + std::vector, TooltipSpec>> m_tooltip_rects; std::vector > m_scrollbars; std::vector > > m_dropdowns; ItemSpec *m_selected_item = nullptr; - u32 m_selected_amount = 0; + u16 m_selected_amount = 0; bool m_selected_dragging = false; + ItemStack m_selected_swap; - // 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; - - v2s32 m_pointer; - v2s32 m_old_pointer; // Mouse position after previous mouse event gui::IGUIStaticText *m_tooltip_element = nullptr; u64 m_tooltip_show_delay; @@ -537,13 +535,6 @@ class GUIFormSpecMenu : public GUIModalMenu int m_btn_height; gui::IGUIFont *m_font = nullptr; - std::wstring getLabelByID(s32 id); - std::string getNameByID(s32 id); -#ifdef __ANDROID__ - v2s32 m_down_pos; - std::string m_JavaDialogFieldName; -#endif - /* 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. *