fix: pin Add button to top of angle list so it is always visible; 0.9.9+mc26.3 #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bot/add-button-persistently-visible"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed
The + row (AddAngleEntry) was appended as the last entry of the angle list. With enough saved angles to fill the list viewport it scrolls out of view, making it hard to find the button to add a new marker (you had to scroll to the very bottom of a long list). It is not lost from the code — it just falls off the bottom edge of the scroll area.
Fix
addEntryToTop()— the + button is the first row of the list and always visible, however many angles exist. New angles are added below it.add()no longer removes and re-adds the + row; it keeps the + row pinned and scrolls to the newly created entry instead.mod_versionto 0.9.9+mc26.3 (repo convention: mod_version == tag withoutv, so a futurev0.9.9+mc26.3release will be accepted by release.yml).Verification
./gradlew buildgreen (fabric-loom 26.3, JDK 25).AngleSnapListWidgetconstructor callsaddEntryToTop,add()no longer callsremoveEntryon the AddAngleEntry,fabric.mod.jsonversion = 0.9.9+mc26.3.addEntryToTop/scrollToEntry/setFocusedsemantics verified against the 26.3AbstractSelectionListbytecode (addFirst + reposition + scroll clamping; setFocused sets selection without scrolling).Client-only mod — CI does not boot a server; please smoke-test F6 in-game (add a couple of angles, confirm the + stays at the top and new entries appear below it).
Fixes the "where did the + button go?" dead end. (Routing when a world has zero angles was double-checked and is fine: F6 opens the angle list with the + row; the config screen is only reached via the Configure button / ModMenu.)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.