-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Improvement: Cake Tracker Scrollable and AH Tips #2939
Conversation
I have detected some issues with your pull request: Body issues: Please fix these issues. For the correct format, refer to the pull request template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After scrolling 2–3 times in the new year cake tracker, the size of lines visible at any time is changing by one line.
The last line "more items below" is already disappearing on the second last scroll, instead of just on the last scroll.
The first issue is probably an underlying issue with the way that |
After changing the size in the config and then opening the cake bag
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cant reproduce the original two bugs reported.
But the pixel error is visible and ideally fixed before merging the pr.
use this patch to see it clearly:
Patch
Index: src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt
--- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt(revision 72dc1a5ed5bda9acccacda29313c7260fb81b0e6)
+++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt(date 1733059457763)
@@ -998,8 +998,9 @@
private val end get() = scroll.asInt() + height
override fun render(posX: Int, posY: Int) {
+ val hovered = isHovered(posX, posY)
scroll.update(
- isHovered(posX, posY) && shouldAllowLink(true, bypassChecks),
+ hovered && shouldAllowLink(true, bypassChecks),
)
var renderY = 0
@@ -1008,9 +1009,13 @@
// If showScrollableTipsInList is true, and we are scrolled 'down', display a tip indicating
// there are more items above
- if (showScrollableTipsInList && scroll.asInt() > 0) {
+ if (hovered) {
width = maxOf(width, scrollUpTip.width)
- scrollUpTip.renderXAligned(posX, posY, width)
+ if (showScrollableTipsInList && scroll.asInt() > 0) {
+ scrollUpTip.renderXAligned(posX, posY, width)
+ } else {
+ string("§7§ono items above (dont scroll)").renderXAligned(posX, posY, width)
+ }
GlStateManager.translate(0f, scrollUpTip.height.toFloat(), 0f)
renderY += scrollUpTip.height
virtualY += scrollUpTip.height
This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes. |
Conflicts have been resolved! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those few pixels will not break the pr
What
Instead of having a maximum length, make cake tracker implement scrollable, and add tips about there being entries above/below. I tried to do a scroll bar renderable, that failed, so I instead added common logic for adding these tips that's default false. (See images).
Also adds a note to the on-hover for prices that indicates that clicking them will open AH.
Images
Changelog Improvements