Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I dont want to keep making accessors #325

Open
wants to merge 4 commits into
base: 1.21
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ static EventStream<OnToggled> newStream() {
}
}

protected static class SpinnyBoiComponent extends LabelComponent {
public static class SpinnyBoiComponent extends LabelComponent {

protected float rotation = 90;
protected float targetRotation = 90;
public float rotation = 90;
public float targetRotation = 90;

public SpinnyBoiComponent() {
super(Text.literal(">"));
Expand Down
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
Loading