gdxapp4d/gdxapp4d-lib-imxmi/src/main/java/love/distributedrebirth/imxmi/lang/ImButtonˣᴹᴵ.java

42 lines
830 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package love.distributedrebirth.imxmi.lang;
import imgui.ImGui;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
public class ImButtonˣᴹᴵ extends AbstractImComponentˣᴹᴵ {
private String label;
private Runnable callback;
public ImButtonˣᴹᴵ() {
}
public ImButtonˣᴹᴵ(String label) {
setLabel(label);
}
@Override
public void renderComponent() {
if (ImGui.button(label) && callback != null) {
callback.run();
}
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Runnable getCallback() {
return callback;
}
public void setCallback(Runnable callback) {
this.callback = callback;
}
}