2022-01-12 04:44:08 -06:00
|
|
|
package noppes.npcs.scripted.event;
|
|
|
|
|
|
|
|
|
|
import cpw.mods.fml.common.eventhandler.Event;
|
2022-05-11 16:43:14 -05:00
|
|
|
import noppes.npcs.scripted.interfaces.gui.ICustomGui;
|
|
|
|
|
import noppes.npcs.scripted.interfaces.item.IItemStack;
|
|
|
|
|
import noppes.npcs.scripted.interfaces.entity.IPlayer;
|
2022-01-12 04:44:08 -06:00
|
|
|
|
|
|
|
|
public class CustomGuiEvent extends Event {
|
|
|
|
|
public final IPlayer player;
|
|
|
|
|
public final ICustomGui gui;
|
|
|
|
|
|
|
|
|
|
public CustomGuiEvent(IPlayer player, ICustomGui gui) {
|
|
|
|
|
this.player = player;
|
|
|
|
|
this.gui = gui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class ButtonEvent extends CustomGuiEvent {
|
|
|
|
|
public final int buttonId;
|
|
|
|
|
|
|
|
|
|
public ButtonEvent(IPlayer player, ICustomGui gui, int buttonId) {
|
|
|
|
|
super(player, gui);
|
|
|
|
|
this.buttonId = buttonId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-14 16:09:27 -06:00
|
|
|
public static class UnfocusedEvent extends CustomGuiEvent {
|
|
|
|
|
public final int textfieldId;
|
|
|
|
|
|
|
|
|
|
public UnfocusedEvent(IPlayer player, ICustomGui gui, int textfieldId) {
|
|
|
|
|
super(player, gui);
|
|
|
|
|
this.textfieldId = textfieldId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-12 04:44:08 -06:00
|
|
|
public static class CloseEvent extends CustomGuiEvent {
|
|
|
|
|
public CloseEvent(IPlayer player, ICustomGui gui) {
|
|
|
|
|
super(player, gui);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class ScrollEvent extends CustomGuiEvent {
|
|
|
|
|
public final int scrollId;
|
|
|
|
|
public final String[] selection;
|
|
|
|
|
public final boolean doubleClick;
|
|
|
|
|
public final int scrollIndex;
|
|
|
|
|
|
|
|
|
|
public ScrollEvent(IPlayer player, ICustomGui gui, int scrollId, int scrollIndex, String[] selection, boolean doubleClick) {
|
|
|
|
|
super(player, gui);
|
|
|
|
|
this.scrollId = scrollId;
|
|
|
|
|
this.selection = selection;
|
|
|
|
|
this.doubleClick = doubleClick;
|
|
|
|
|
this.scrollIndex = scrollIndex;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class SlotEvent extends CustomGuiEvent {
|
|
|
|
|
public final int slotId;
|
|
|
|
|
public final IItemStack stack;
|
|
|
|
|
|
|
|
|
|
public SlotEvent(IPlayer player, ICustomGui gui, int slotId, IItemStack stack) {
|
|
|
|
|
super(player, gui);
|
|
|
|
|
this.slotId = slotId;
|
|
|
|
|
this.stack = stack;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|