blob: 0ffad581a4a9cf1ac5e064790762920282a4a3d7 (
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
|
/*
* Copyright (c) 2018, 2019, 2020 shedaniel
* Licensed under the MIT License (the "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);
}
}
|