Skip to content

Change small buttons to SpriteIconButton#1045

Merged
gniftygnome merged 6 commits into
TerraformersMC:26.2from
samswi:26.2
Jun 22, 2026
Merged

Change small buttons to SpriteIconButton#1045
gniftygnome merged 6 commits into
TerraformersMC:26.2from
samswi:26.2

Conversation

@samswi

@samswi samswi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The goal of this PR is to improve visual compatibility with resource packs that replace vanilla button textures, but don't replace mod menu button textures.

It is done by splitting the button textures into sprites without the vanilla button texture background, and then using them on SpriteIconButton which renders them on top of whatever button texture minecraft is currently using.

Examples on some servers that use custom resource packs:
image

@ThatCuteOne

Copy link
Copy Markdown

would love to see this merged! Im trying to make a mod that moves the small buttons to the bottom and now ill have to do some extra workaround for modmenu

@Jab125 Jab125 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a good time to make the mods icon shadow match the shadows of the icons next to it

Comment thread src/main/java/com/terraformersmc/modmenu/gui/ModsScreen.java Outdated
CONFIGURE_SPRITE_FOCUSED
), 20, 20)
.build();
this.configureButton.setPosition(width - 24, RIGHT_PANE_Y);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to set the position in the builder?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not possible to do in the builder.

Comment thread src/main/java/com/terraformersmc/modmenu/mixin/MixinTitleScreen.java Outdated
Comment thread src/main/resources/assets/modmenu/textures/gui/parent_mod.png
Comment thread src/main/resources/assets/modmenu/java_icon.png
Comment thread src/main/resources/assets/modmenu/minecraft_icon.png
Comment thread src/main/resources/assets/modmenu/unknown_icon.png
Comment thread src/main/resources/assets/modmenu/unknown_parent.png
@samswi

samswi commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

@Jab125 I have reduced all textures filesizes with oxipng, which is why they appear as changed.

@gniftygnome

Copy link
Copy Markdown
Contributor

For future reference, it's a lot nicer for maintainers to get maintenance stuff like reformatting code or compressing all the images in a separate PR from the feature change. That's probably what Jab125 is getting at there.

@samswi

samswi commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Yeah that makes sense. Should i revert the image compression changes?

@gniftygnome

Copy link
Copy Markdown
Contributor

I don't particularly mind in this case. No need to make more work for you.

@samswi samswi requested a review from Jab125 June 20, 2026 12:11
@gniftygnome

Copy link
Copy Markdown
Contributor

This would be a good time to make the mods icon shadow match the shadows of the icons next to it

I agree, but TBH I have looked at it a few times and I can't see the difference, so it's going to have to be somebody else who "fixes" it...

@Jab125

Jab125 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This would be a good time to make the mods icon shadow match the shadows of the icons next to it

I agree, but TBH I have looked at it a few times and I can't see the difference, so it's going to have to be somebody else who "fixes" it...

Screenshot 2026-06-21 at 16 25 53

@samswi

samswi commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

I think matching the shading of vanilla icons would be hard, since they are very inconsistent on that.
Here's how the icon would look with drop shadow matching the accessibility icon:
image
image

@gniftygnome

gniftygnome commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Yes, I seem to recall seeing a Neoforge discussion about matching vanilla recently and they said the same thing -- "match which icon?" It doesn't help my eyesight isn't quite as good as it used to be. I'll merge whatever somebody says is better (unless even I can tell it's not). Until the next person comes with a new "better" version, then I'll merge that.

@samswi

samswi commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

I've made shadows that match the shadows of text

image image

@gniftygnome gniftygnome merged commit df3b351 into TerraformersMC:26.2 Jun 22, 2026
1 check passed
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.

5 participants