mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add scrollbaroptions FormSpec element (#8530)
This commit is contained in:
parent
9a5d43a4f5
commit
4f45bfd08b
5 changed files with 159 additions and 36 deletions
|
@ -23,6 +23,12 @@ public:
|
|||
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);
|
||||
|
@ -39,6 +45,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 +54,7 @@ private:
|
|||
|
||||
IGUIButton *up_button;
|
||||
IGUIButton *down_button;
|
||||
ArrowVisibility arrow_visibility = DEFAULT;
|
||||
bool is_dragging;
|
||||
bool is_horizontal;
|
||||
bool is_auto_scaling;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue