Adds a button to the control panel, in the shocks section, that runs the func
function when pressed. This method is aliased by the @button
function decorator, which is simpler to use.
Parameters
text — str, required
The text to be displayed on the button.
func — func(model), required
The function to be executed when the button is pressed. The function takes one argument, the model object.
desc — str, optional
A long description to display as a tooltip.
Default value: None
charwick
Mar 27, 2020 at 23:02This example creates a button that zeroes out agents’ gold holdings when pressed.