From 2de216842f34313e24ce387c38fdca33f0ff3431 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 27 Jul 2018 14:27:32 +0200 Subject: [PATCH] Move the gui stuff to a common sourceset so I can use it in HDSkins --- build.gradle | 5 +++++ .../java/com/minelittlepony/gui/Button.java | 19 +++++++++++++++++ .../java/com/minelittlepony/gui/Checkbox.java | 6 ++++++ .../java/com/minelittlepony/gui/GameGui.java | 21 +++++++++++++++++++ .../com/minelittlepony/gui/IActionable.java | 0 .../com/minelittlepony/gui/IGUIAction.java | 0 .../java/com/minelittlepony/gui/Label.java | 6 ++++++ .../minelittlepony/gui/SettingsPanel.java} | 19 +++++++++++------ .../java/com/minelittlepony/gui/Slider.java | 6 ++++++ .../minelittlepony/LiteModMineLittlePony.java | 4 ++-- .../minelittlepony/gui/GuiPonySettings.java | 21 ++----------------- 11 files changed, 80 insertions(+), 27 deletions(-) create mode 100644 src/common/java/com/minelittlepony/gui/Button.java rename src/{main => common}/java/com/minelittlepony/gui/Checkbox.java (86%) create mode 100644 src/common/java/com/minelittlepony/gui/GameGui.java rename src/{main => common}/java/com/minelittlepony/gui/IActionable.java (100%) rename src/{main => common}/java/com/minelittlepony/gui/IGUIAction.java (100%) rename src/{main => common}/java/com/minelittlepony/gui/Label.java (92%) rename src/{main/java/com/minelittlepony/gui/PonySettingsPanel.java => common/java/com/minelittlepony/gui/SettingsPanel.java} (83%) rename src/{main => common}/java/com/minelittlepony/gui/Slider.java (94%) diff --git a/build.gradle b/build.gradle index 3b9f6693..4588cc4c 100644 --- a/build.gradle +++ b/build.gradle @@ -38,12 +38,17 @@ minecraft { sourceSets { hdskins { compileClasspath += main.compileClasspath + compileClasspath += common.compileClasspath ext.refMap = 'hdskins.mixin.refmap.json' } main { compileClasspath += hdskins.output + compileClasspath += common.output ext.refMap = 'minelp.mixin.refmap.json' } + common { + + } } dependencies { diff --git a/src/common/java/com/minelittlepony/gui/Button.java b/src/common/java/com/minelittlepony/gui/Button.java new file mode 100644 index 00000000..0d8a21c2 --- /dev/null +++ b/src/common/java/com/minelittlepony/gui/Button.java @@ -0,0 +1,19 @@ +package com.minelittlepony.gui; + +import net.minecraft.client.gui.GuiButton; + +public class Button extends GuiButton implements IActionable { + + private IGUIAction