mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-03-25 21:11:30 +01:00
19 lines
461 B
Java
19 lines
461 B
Java
package com.minelittlepony.gui;
|
|
|
|
import net.minecraft.client.gui.GuiButton;
|
|
|
|
public class Button extends GuiButton implements IActionable {
|
|
|
|
private IGUIAction<Button> action;
|
|
|
|
public Button(int x, int y, int width, int height, String label, IGUIAction<Button> callback) {
|
|
super(0, x, y, width, height, GameGui.translate(label));
|
|
action = callback;
|
|
}
|
|
|
|
@Override
|
|
public void perform() {
|
|
action.perform(this);
|
|
}
|
|
|
|
}
|