Skip to main content

Defining whether the SUIButton will be clickable or not by script using Java

In your Java class, do the following:

public class YourClass extends Component {

// boolean to control whether SUIButton is clickable or not
public boolean value; // select the value (true or false) from the properties

// creates a new SUIButton, @AutoWired selects the component from this object
@AutoWired
private SUIButton button;

@Override
public void start() {

}

@Override
public void repeat() {

// defines whether the SUIButton will be clickable or not according to the value of the Boolean (true or false) "value"
button.setClickable(value);
}
}