mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
feat: horizontal scroll
This commit is contained in:
parent
2448869bf9
commit
863cc923a0
4 changed files with 26 additions and 19 deletions
|
|
@ -13,10 +13,12 @@ namespace gui {
|
|||
protected:
|
||||
std::vector<std::shared_ptr<UINode>> nodes;
|
||||
std::vector<IntervalEvent> intervalEvents;
|
||||
int scroll = 0;
|
||||
int scrollY = 0;
|
||||
int scrollX = 0;
|
||||
int scrollStep = 40;
|
||||
int scrollBarWidth = 10;
|
||||
int actualLength = 0;
|
||||
int actualLengthY = 0;
|
||||
int actualLengthX = 0;
|
||||
bool scrollable = true;
|
||||
|
||||
bool isScrolling() const {
|
||||
|
|
@ -40,7 +42,7 @@ namespace gui {
|
|||
virtual void setScrollable(bool flag);
|
||||
void listenInterval(float interval, OnTimeOut callback, int repeat=-1);
|
||||
virtual glm::vec2 getContentOffset() const override {
|
||||
return glm::vec2(0.0f, scroll);
|
||||
return glm::vec2(scrollX, scrollY);
|
||||
};
|
||||
virtual void setSize(const glm::vec2& size) override;
|
||||
virtual int getScrollStep() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue