X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgui%2FguiScrollBar.h;h=29493bb993220f8d8d23c9c6c94240f24daf3ae4;hb=c162340973463580cc5013d8b53ea87975637bf2;hp=2236ff5b989193891e9ea7c5d3bc023adfbd0611;hpb=705630e7d09a2c6b80631186f597671a8db5e34b;p=oweals%2Fminetest.git diff --git a/src/gui/guiScrollBar.h b/src/gui/guiScrollBar.h index 2236ff5b9..29493bb99 100644 --- a/src/gui/guiScrollBar.h +++ b/src/gui/guiScrollBar.h @@ -17,12 +17,19 @@ 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 rectangle, bool horizontal, bool auto_scale); + enum ArrowVisibility + { + HIDE, + SHOW, + DEFAULT + }; + virtual void draw(); virtual void updateAbsolutePosition(); virtual bool OnEvent(const SEvent &event); @@ -39,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(); @@ -47,6 +55,7 @@ private: IGUIButton *up_button; IGUIButton *down_button; + ArrowVisibility arrow_visibility = DEFAULT; bool is_dragging; bool is_horizontal; bool is_auto_scaling;