Skip to content

Commit

Permalink
let me set scroll position and offset manually
Browse files Browse the repository at this point in the history
  • Loading branch information
chyzman committed Oct 19, 2024
1 parent 628062d commit 0fc720f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/io/wispforest/owo/ui/container/ScrollContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,24 @@ public ScrollContainer<C> scrollTo(@Range(from = 0, to = 1) double progress) {
return this;
}

public ScrollContainer<C> setCurrentScrollPosition(double currentScrollPosition) {
this.currentScrollPosition = currentScrollPosition;
return this;
}

public double getCurrentScrollPosition() {
return this.currentScrollPosition;
}

public ScrollContainer<C> setScrollOffset(double scrollOffset) {
this.scrollOffset = scrollOffset;
return this;
}

public double getScrollOffset() {
return this.scrollOffset;
}

/**
* Set the thickness of this container's scrollbar,
* in logical pixels
Expand Down

0 comments on commit 0fc720f

Please sign in to comment.