blob: 8c2f50bc61d659497fa3c16ff162271b9c3c4b65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/*
* Roughly Enough Items by Danielshe.
* Licensed under the MIT License.
*/
package me.shedaniel.rei.gui.widget;
import me.shedaniel.math.api.Point;
import org.jetbrains.annotations.ApiStatus;
import java.util.function.Consumer;
@ApiStatus.Internal
public class ClickableActionedLabelWidget extends ClickableLabelWidget {
private Consumer<ClickableLabelWidget> onClicked;
ClickableActionedLabelWidget(Point point, String text, Consumer<ClickableLabelWidget> onClicked) {
super(point, text);
this.onClicked = onClicked;
}
@Override
public void onLabelClicked() {
onClicked.accept(this);
}
}
|