This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| dev:v3:gui_api:toolbar:toolbarbutton [2020/07/07 09:05] – jedi18 | dev:v3:gui_api:toolbar:toolbarbutton [2020/07/07 09:06] (current) – jedi18 | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| ---- | ---- | ||
| + | |||
| + | ===== Add Callback ===== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Description ==== | ||
| + | |||
| + | Add lua function callback to be called when the toolbar button is clicked. Multiple callbacks can be added. Callbacks can also be named callbacks i.e. associated with a name so that it can be later removed by use of the name. | ||
| + | |||
| + | * Lua Callback - // | ||
| + | * Callback name - //string// , Lua Callback - // | ||
| + | |||
| + | ==== Examples ==== | ||
| + | |||
| + | * <code lua> button1: | ||
| + | * <code lua> button1: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Remove Callback ===== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Description ==== | ||
| + | |||
| + | Remove lua function called associated with the given name. Only named callbacks can be removed. | ||
| + | |||
| + | * Callback name - //string// | ||
| + | |||
| + | ==== Examples ==== | ||
| + | |||
| + | * <code lua> button1: | ||
| + | |||
| + | ---- | ||
| + | |||
| ===== Set tooltip ===== | ===== Set tooltip ===== | ||