diff --git a/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java b/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java index 4a52b953..c00321ef 100644 --- a/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java +++ b/src/main/java/com/replaymod/replay/gui/screen/GuiReplayViewer.java @@ -197,12 +197,11 @@ public class GuiReplayViewer extends GuiScreen { } }).setSize(73, 20).setI18nLabel("replaymod.gui.delete").setDisabled(); - public final GuiButton settingsButton = new GuiButton().onClick(new Runnable() { - @Override - public void run() { - new GuiReplaySettings(toMinecraft(), mod.getCore().getSettingsRegistry()).display(); - } - }).setSize(150, 20).setI18nLabel("replaymod.gui.settings"); + public final GuiButton settingsButton = new GuiButton(this) + .setSize(20, 20) + .setTexture(ReplayMod.TEXTURE, ReplayMod.TEXTURE_SIZE).setSpriteUV(20, 0) + .setTooltip(new GuiTooltip().setI18nText("replaymod.gui.settings")) + .onClick(() -> new GuiReplaySettings(toMinecraft(), getMod().getCore().getSettingsRegistry()).display()); public final GuiButton cancelButton = new GuiButton().onClick(new Runnable() { @Override @@ -216,7 +215,7 @@ public class GuiReplayViewer extends GuiScreen { public final GuiPanel editorButton = new GuiPanel(); public final GuiPanel upperButtonPanel = new GuiPanel().setLayout(new HorizontalLayout().setSpacing(5)) - .addElements(null, loadButton, settingsButton); + .addElements(null, loadButton); public final GuiPanel lowerButtonPanel = new GuiPanel().setLayout(new HorizontalLayout().setSpacing(5)) .addElements(null, renameButton, deleteButton, editorButton, cancelButton); public final GuiPanel buttonPanel = new GuiPanel(this).setLayout(new VerticalLayout().setSpacing(5)) @@ -240,10 +239,16 @@ public class GuiReplayViewer extends GuiScreen { pos(list, 0, 30); size(list, width, y(buttonPanel) - 10 - y(list)); + + pos(settingsButton, width - width(settingsButton) - 5, 5); } }); } + public ReplayModReplay getMod() { + return mod; + } + private static final GuiImage DEFAULT_THUMBNAIL = new GuiImage().setTexture(Utils.DEFAULT_THUMBNAIL); public static class GuiSelectReplayPopup extends AbstractGuiPopup { diff --git a/src/main/resources/assets/replaymod/replay_gui.license b/src/main/resources/assets/replaymod/replay_gui.license new file mode 100644 index 00000000..84c37a25 --- /dev/null +++ b/src/main/resources/assets/replaymod/replay_gui.license @@ -0,0 +1,33 @@ +The replay_gui.png file as a whole is governed by the same terms as the entire repository. +Some of its individual icons were originally from other projects and under different licenses. +This file serves to credit the original author(s) and to comply with the terms of the original license (some parts of +which may still apply to the derived replay_gui.png file). + +In particular: + +================================================================================ + +The "Settings" icon (three horizontal sliders) is based on ModMenu's settings icon. +Original: https://github.com/Prospector/ModMenu/blob/74200fb7baa697b4e865b15a707a560757a7ee8f/src/main/resources/assets/modmenu/textures/gui/configure_button.png + +Copyright (c) 2018-2020 Prospector + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +================================================================================ diff --git a/src/main/resources/assets/replaymod/replay_gui.png b/src/main/resources/assets/replaymod/replay_gui.png index 552b93ce..a636691f 100644 Binary files a/src/main/resources/assets/replaymod/replay_gui.png and b/src/main/resources/assets/replaymod/replay_gui.png differ