Remove Mapgen V7 floatlands in preparation for new implementation (#9238)
[oweals/minetest.git] / src / gui / guiScrollBar.h
index be392bc00a483d60c2d7074274fe21f916101f53..29493bb993220f8d8d23c9c6c94240f24daf3ae4 100644 (file)
@@ -17,16 +17,22 @@ the arrow buttons where there is insufficient space.
 using namespace irr;
 using namespace gui;
 
-class guiScrollBar : public IGUIElement
+class GUIScrollBar : public IGUIElement
 {
 public:
-       guiScrollBar(IGUIEnvironment *environment, IGUIElement *parent, s32 id,
+       GUIScrollBar(IGUIEnvironment *environment, IGUIElement *parent, s32 id,
                        core::rect<s32> rectangle, bool horizontal, bool auto_scale);
 
+       enum ArrowVisibility
+       {
+               HIDE,
+               SHOW,
+               DEFAULT
+       };
+
        virtual void draw();
        virtual void updateAbsolutePosition();
        virtual bool OnEvent(const SEvent &event);
-       virtual void OnPostRender(u32 timeMs);
 
        s32 getMax() const { return max_pos; }
        s32 getMin() const { return min_pos; }
@@ -40,6 +46,7 @@ public:
        void setLargeStep(const s32 &step);
        void setPos(const s32 &pos);
        void setPageSize(const s32 &size);
+       void setArrowsVisible(ArrowVisibility visible);
 
 private:
        void refreshControls();
@@ -48,6 +55,7 @@ private:
 
        IGUIButton *up_button;
        IGUIButton *down_button;
+       ArrowVisibility arrow_visibility = DEFAULT;
        bool is_dragging;
        bool is_horizontal;
        bool is_auto_scaling;
@@ -60,7 +68,6 @@ private:
        s32 max_pos;
        s32 small_step;
        s32 large_step;
-       s32 desired_pos;
        u32 last_change;
        s32 drag_offset;
        s32 page_size;
@@ -68,4 +75,4 @@ private:
 
        core::rect<s32> slider_rect;
        video::SColor current_icon_color;
-};
\ No newline at end of file
+};