mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 00:34:28 +00:00
49 lines
1.3 KiB
Java
49 lines
1.3 KiB
Java
package noppes.npcs.client.gui.advanced;
|
|
|
|
import net.minecraft.client.gui.GuiButton;
|
|
import noppes.npcs.client.gui.util.GuiNpcButton;
|
|
import noppes.npcs.client.gui.util.GuiNpcLabel;
|
|
|
|
/**
|
|
* Dialog asking the user whether to Clone (inline copy) or Reference the loaded ability.
|
|
*/
|
|
public class SubGuiAbilityLoadMode extends SubGuiSimpleChoice {
|
|
|
|
public static final int MODE_CLONE = 0;
|
|
public static final int MODE_REFERENCE = 1;
|
|
|
|
public SubGuiAbilityLoadMode() {
|
|
setBackground("menubg.png");
|
|
xSize = 200;
|
|
ySize = 90;
|
|
}
|
|
|
|
@Override
|
|
public void initGui() {
|
|
super.initGui();
|
|
|
|
int y = guiTop + 10;
|
|
addLabel(new GuiNpcLabel(0, "ability.load.mode", guiLeft + 10, y));
|
|
|
|
y += 25;
|
|
addButton(new GuiNpcButton(0, guiLeft + 15, y, 80, 20, "ability.clone"));
|
|
addButton(new GuiNpcButton(1, guiLeft + 105, y, 80, 20, "ability.reference"));
|
|
|
|
y += 25;
|
|
addButton(new GuiNpcButton(2, guiLeft + 55, y, 90, 20, "gui.cancel"));
|
|
}
|
|
|
|
@Override
|
|
public void buttonEvent(GuiButton guibutton) {
|
|
if (guibutton.id == 0) {
|
|
setResult(MODE_CLONE);
|
|
close();
|
|
} else if (guibutton.id == 1) {
|
|
setResult(MODE_REFERENCE);
|
|
close();
|
|
} else if (guibutton.id == 2) {
|
|
close();
|
|
}
|
|
}
|
|
}
|