Allows onClickFunction to be altered.
@@ -7,6 +7,8 @@ import com.valkryst.VTerminal.builder.component.ButtonBuilder;
import com.valkryst.VTerminal.font.Font;
import com.valkryst.VTerminal.misc.IntRange;
import lombok.Getter;
+import lombok.NonNull;
+import lombok.Setter;
import java.awt.*;
import java.awt.event.MouseEvent;
@@ -44,7 +46,7 @@ public class Button extends Component {
@Getter private Color foregroundColor_pressed;
/** The function to run when the button is clicked. */
- @Getter private final Runnable onClickFunction;
+ @Getter @Setter @NonNull private Runnable onClickFunction;
/**
* Constructs a new AsciiButton.
