ID:175820
 
How do i make a click verb with an icon next to it in a 'stat' panel?
Create an obj for the purpose, and use stat() to display that obj. The obj's Click() verb will be called when the usr clicks on the obj.

<code>mob var/obj/turnip/TheTurnip New() TheTurnip=new() ..() Stat() statpanel("Turnips") stat(TheTurnip) obj/turnip icon='turnip.dmi' Click() usr << "Leave da turnip alone!"</code>
It's as simple as creating an object that is pointed to by a variable.

var/obj = new()
var/a = obj

Then refer to the variable in a statpanel like you would any other variable.
In response to Crispy
Hey thanks a lot both of you! That's a great help.