Replace "Settings" button with textured button in top left corner
The texture of this button is based on the settings button of the ModMenu mod and was originally under the MIT license "Copyright (c) 2018-2020 Prospector". The derived version is licensed as any other file in this repository.
This commit is contained in:
@@ -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<GuiSelectReplayPopup> {
|
||||
|
||||
33
src/main/resources/assets/replaymod/replay_gui.license
Normal file
33
src/main/resources/assets/replaymod/replay_gui.license
Normal file
@@ -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.
|
||||
|
||||
================================================================================
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user