Skip to content

Fix texture trim handling - #247

Open
ZZZank wants to merge 2 commits into
CleanroomMC:cleanroomfrom
ZZZank:trim-fix
Open

Fix texture trim handling#247
ZZZank wants to merge 2 commits into
CleanroomMC:cleanroomfrom
ZZZank:trim-fix

Conversation

@ZZZank

@ZZZank ZZZank commented Sep 8, 2026

Copy link
Copy Markdown
Contributor
  • TextureInfo#trim(int,int,int,int) now actually uses provided args
  • DrawableNineSliceTexture will now make use of texture trim params

for a 14 * 50 texture (expanded to 64*64) setup as:

this.scrollbarBackground = registerGuiSprite("scrollbar_background", 64, 64)
	.trim(0, 64 - 14, 0, 64 - 50)
	.slice(1, 1, 1, 1);
Before After
before after
  • removed .trim(...) call for arrow icon texture, because this breaks arrow shadow and overall shape
after-fixing-trim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant