get_description() gets mode, so tools can provide diff. instructions.
This commit is contained in:
parent
c9dfc4d1d8
commit
2e5508842f
32 changed files with 102 additions and 50 deletions
|
|
@ -284,16 +284,24 @@ then the names of your functions must begin with "<code><b>zoom_</b></code>"
|
|||
<br>
|
||||
|
||||
<li><code><b>char * get_description(magic_api * api,
|
||||
int which)</b></code><br>
|
||||
This should return a string containing the description of a magic tool.
|
||||
int which, int mode)</b></code><br>
|
||||
This should return a string containing the description of how to
|
||||
use a particular magic tool.
|
||||
This will appear as a help tip, explained by Tux the Penguin, within
|
||||
Tux Paint.<br>
|
||||
<br>
|
||||
Tux Paint will <code>free()</code> the string upon exit, so you should
|
||||
wrap it in a C <code>strdup()</code> call.<br>
|
||||
<br>
|
||||
<b>Note:</b> Called once for each Magic tool your plugin claims to
|
||||
contain (by your "<code>get_tool_count()</code>").<br>
|
||||
<b>Note:</b> For each Magic tool your plugin claims to
|
||||
contain (reported by your "<code>get_tool_count()</code>" function),
|
||||
this function will be called for each mode the tool claims to support
|
||||
(reported by your "<code>modes()</code>" function).<br>
|
||||
<br>
|
||||
In other words, if your plugin contains two tools, one which works in
|
||||
paint mode only, and the other that works in both paint mode and
|
||||
full-image mode, your plugin's "<code>get_description()</code>" will be
|
||||
called three times.<br>
|
||||
<br>
|
||||
|
||||
<li><code><b>int requires_colors(magic_api * api,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue