Skip to content
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

Hide Mod Options API Button if unused #43

Conversation

matthewperiut
Copy link
Contributor

No description provided.

@@ -14,7 +15,8 @@
public class PauseMenuMixin extends Screen {
@Inject(method = "initVanillaScreen", at = @At("RETURN"))
private void modoptionsapi$addButton(CallbackInfo ci) {
this.buttons.add(new ButtonWidget(30, this.width / 2 - 100, this.height / 4 + 148 + -16, "Mod World Options"));
if (ModOptionsAPI.getAllMods().length > 0)
Copy link
Member

Choose a reason for hiding this comment

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

I would make this check into a method, but otherwise this looks good.

@thecatcore thecatcore merged commit 0b59fc7 into FabricCompatibilityLayers:b1.7.3 Nov 3, 2023
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
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants