0.5.1: fix UI widget coords — relative not absolute
Build / build (push) Has been cancelled

FTB Library's Widget.setPos(x, y) takes coords RELATIVE to the parent
panel. My code passed (getX() + offset, getY() + offset), so widgets
ended up at panel-pos * 2 + offset, far off-screen to the bottom-right.

Fix: drop getX()/getY() everywhere in alignWidgets. Refresh button,
close button, header bar, sub-panels — all relative now. Plus
BaseBnsScreen.contentTop()/contentBottom() are now plain offsets
(20 and getHeight() - 24) instead of getY()-prefixed.

Visual bug surfaced with user screenshot of HubScreen showing all
buttons stacked on the right edge of the screen with empty dark panel
on the left.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Matt
2026-06-08 14:42:52 +00:00
parent 0b90e94079
commit 1630a8370f
8 changed files with 30 additions and 28 deletions
+1 -1
View File
@@ -19,5 +19,5 @@ loader_version_range=[1,)
mod_id=bnstoolkit
mod_name=Brass and Sigil Toolkit
mod_license=All Rights Reserved
mod_version=0.5.0
mod_version=0.5.1
mod_group_id=uk.sijbers.bnstoolkit