123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /*
- * Roughly Enough Items by Danielshe.
- * Licensed under the MIT License.
- */
- package me.shedaniel.rei.gui.widget;
- import me.shedaniel.math.api.Rectangle;
- import me.shedaniel.rei.api.annotations.ToBeRemoved;
- import net.minecraft.text.Text;
- @ToBeRemoved
- @Deprecated
- public class DetailedButtonWidget extends ButtonWidget {
-
- private DetailedButtonWidget.PressAction pressAction;
-
- public DetailedButtonWidget(Rectangle rectangle, Text text, PressAction pressAction) {
- super(rectangle, text);
- this.pressAction = pressAction;
- }
-
- public DetailedButtonWidget(Rectangle rectangle, String text, PressAction pressAction) {
- super(rectangle, text);
- this.pressAction = pressAction;
- }
-
- public DetailedButtonWidget(int x, int y, int width, int height, String text, PressAction pressAction) {
- super(x, y, width, height, text);
- this.pressAction = pressAction;
- }
-
- public DetailedButtonWidget(int x, int y, int width, int height, Text text, PressAction pressAction) {
- super(x, y, width, height, text);
- this.pressAction = pressAction;
- }
-
- @Override
- public void onPressed() {
- if (pressAction != null)
- pressAction.onPress(this);
- }
-
- public interface PressAction {
- void onPress(ButtonWidget var1);
- }
-
- }
|