Changed Replay Viewer panel button (from play button to hamburger)

Added quickmode indicator (bottom-right with night vision indicator)
This commit is contained in:
LindaJuffermans
2020-07-15 15:49:44 +02:00
parent 2ab92f554f
commit 2dcfbd6435
4 changed files with 71 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ public class HotkeyButtons extends EventRegistrations implements Extra {
public Gui(ReplayMod mod, GuiReplayOverlay overlay) {
toggleButton = new GuiTexturedButton(overlay).setSize(20, 20)
.setTexture(ReplayMod.TEXTURE, ReplayMod.TEXTURE_SIZE).setTexturePosH(0, 0)
.setTexture(ReplayMod.TEXTURE, ReplayMod.TEXTURE_SIZE).setTexturePosH(0, 120)
.onClick(new Runnable() {
@Override
public void run() {
@@ -74,7 +74,7 @@ public class HotkeyButtons extends EventRegistrations implements Extra {
final KeyBindingRegistry keyBindingRegistry = mod.getKeyBindingRegistry();
keyBindingRegistry.getKeyBindings().values().stream()
.sorted(Comparator.comparing(it -> I18n.translate(it.getId())))
.sorted(Comparator.comparing(it -> I18n.translate(it.getTranslationKey())))
.forEachOrdered(keyBinding -> {
GuiButton button = new GuiButton(){
@Override
@@ -83,10 +83,10 @@ public class HotkeyButtons extends EventRegistrations implements Extra {
String keyName = "???";
try {
//#if MC>=11600
//$$ keyName = keyBinding.getBoundKeyLocalizedText().asString();
keyName = keyBinding.getBoundKeyLocalizedText().asString();
//#else
//#if MC>=11400
keyName = keyBinding.getLocalizedName();
//$$ keyName = keyBinding.getLocalizedName();
//#else
//$$ keyName = Keyboard.getKeyName(keyBinding.getKeyCode());
//#endif
@@ -115,7 +115,7 @@ public class HotkeyButtons extends EventRegistrations implements Extra {
return new Dimension(Math.max(10, button.getMinSize().getWidth()) + 10, 20);
}
}).addElements(null, button),
new GuiLabel().setI18nText(keyBinding.getId())
new GuiLabel().setI18nText(keyBinding.getTranslationKey())
));
});