generated from LabyMod/addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move activity into main menu button instead of navigation tab
- Loading branch information
Showing
5 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
core/src/main/java/com/rappytv/signsearch/gui/navigation/SignSearchNavigationElement.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
core/src/main/java/com/rappytv/signsearch/listeners/PauseMenuListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.rappytv.signsearch.listeners; | ||
|
||
import com.rappytv.signsearch.gui.settings.SignSearchSettingsActivity; | ||
import net.labymod.api.Laby; | ||
import net.labymod.api.client.component.Component; | ||
import net.labymod.api.client.gui.icon.Icon; | ||
import net.labymod.api.client.resources.ResourceLocation; | ||
import net.labymod.api.event.Subscribe; | ||
import net.labymod.api.event.client.gui.screen.IngameMenuInitializeEvent; | ||
|
||
public class PauseMenuListener { | ||
|
||
private final Icon icon = Icon.texture(ResourceLocation.create( | ||
"signsearch", | ||
"textures/sign_search.png" | ||
)); | ||
private final SignSearchSettingsActivity activity; | ||
|
||
public PauseMenuListener(SignSearchSettingsActivity activity) { | ||
this.activity = activity; | ||
} | ||
|
||
@Subscribe | ||
public void onMenuOpen(IngameMenuInitializeEvent event) { | ||
event.addLeftButton( | ||
Component.translatable("signsearch.ui.title"), | ||
icon, | ||
() -> Laby.labyAPI().minecraft().minecraftWindow().displayScreen(activity) | ||
); | ||
} | ||
|
||
} |