-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
option to show only own stats for stats overlay, as well as duels div…
…ision and prestige on xp bar (like in bedwars)
- Loading branch information
1 parent
fc6c8c0
commit 02a558b
Showing
9 changed files
with
271 additions
and
89 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
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
55 changes: 55 additions & 0 deletions
55
src/main/java/com/palight/playerinfo/gui/screens/impl/options/modules/gui/StatsGui.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,55 @@ | ||
package com.palight.playerinfo.gui.screens.impl.options.modules.gui; | ||
|
||
import com.palight.playerinfo.PlayerInfo; | ||
import com.palight.playerinfo.gui.screens.CustomGuiScreenScrollable; | ||
import com.palight.playerinfo.gui.widgets.GuiCustomWidget; | ||
import com.palight.playerinfo.gui.widgets.impl.GuiCheckBox; | ||
import com.palight.playerinfo.modules.impl.gui.StatsMod; | ||
import com.palight.playerinfo.options.ModConfiguration; | ||
|
||
import java.util.Arrays; | ||
|
||
public class StatsGui extends CustomGuiScreenScrollable { | ||
|
||
private int buttonX; | ||
private int buttonY; | ||
|
||
private GuiCheckBox onlyShowOwnStats; | ||
|
||
private StatsMod module; | ||
|
||
public StatsGui() { | ||
super("screen.stats"); | ||
} | ||
|
||
@Override | ||
public void initGui() { | ||
super.initGui(); | ||
|
||
if (module == null) { | ||
module = (StatsMod) PlayerInfo.getModules().get("stats"); | ||
} | ||
|
||
buttonX = guiX + 32; | ||
buttonY = guiY + 32; | ||
|
||
onlyShowOwnStats = new GuiCheckBox(1, buttonX, buttonY, "Only show your stats", module.onlyShowOwnStats); | ||
|
||
this.guiElements.addAll(Arrays.asList( | ||
this.onlyShowOwnStats | ||
)); | ||
} | ||
|
||
@Override | ||
protected void widgetClicked(GuiCustomWidget widget) { | ||
if (module == null) { | ||
module = (StatsMod) PlayerInfo.getModules().get("stats"); | ||
} | ||
|
||
super.widgetClicked(widget); | ||
if (widget.id == onlyShowOwnStats.id) { | ||
module.onlyShowOwnStats = onlyShowOwnStats.checked; | ||
} | ||
ModConfiguration.syncFromGUI(); | ||
} | ||
} |
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
Oops, something went wrong.