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; }
void setLargeStep(const s32 &step);
void setPos(const s32 &pos);
void setPageSize(const s32 &size);
+ void setArrowsVisible(ArrowVisibility visible);
private:
void refreshControls();
IGUIButton *up_button;
IGUIButton *down_button;
+ ArrowVisibility arrow_visibility = DEFAULT;
bool is_dragging;
bool is_horizontal;
bool is_auto_scaling;
s32 max_pos;
s32 small_step;
s32 large_step;
- s32 desired_pos;
u32 last_change;
s32 drag_offset;
s32 page_size;
core::rect<s32> slider_rect;
video::SColor current_icon_color;
-};
\ No newline at end of file
+};