Magic size capabilites on a per-mode basis
e.g., useful to set size for paint-mode blur, but meaningless for fullscreen-mode blur.
This commit is contained in:
parent
5bbfd91c2c
commit
b2535d59ba
13 changed files with 173 additions and 133 deletions
|
|
@ -395,18 +395,18 @@
|
|||
<b>Note:</b> Called once for each Magic tool your plugin claims to contain (by your "<code>get_tool_count()</code>"). </p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>Uint8 accepted_sizes(magic_api * api, int which)</b></code></dt>
|
||||
<dt><code><b>Uint8 accepted_sizes(magic_api * api, int which, int mode)</b></code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Return how many size variations the 'Magic' tool accepts. Return a '0' if the 'Magic' tool should not offer sizing options. Returning '1' is the same as returning '0'. </p>
|
||||
Return how many size variations the 'Magic' tool accepts, in the given mode (i.e., '<code>MODE_PAINT</code>' or '<code>MODE_FULLSCREEN</code>). Return a '0' if the 'Magic' tool should not offer sizing options. Returning '1' is the same as returning '0'. </p>
|
||||
<p>
|
||||
<b>Note:</b> Called once for each Magic tool your plugin claims to contain (by your "<code>get_tool_count()</code>"). </p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>Uint8 default_size(magic_api * api, int which)</b></code></dt>
|
||||
<dt><code><b>Uint8 default_size(magic_api * api, int which, int mode)</b></code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Return the default size the 'Magic' tool accepts. This will be the default setting for the tool the first time it is used during a Tux Paint session. If Tux Paint is being invoked with the sizing option disabled, this will be the only size requested by Tux Paint. Return a number between '1' and the amount you returned in <code>accepted_sizes()</code>. </p>
|
||||
Return the default size the 'Magic' tool accepts, in the given mode. This will be the default setting for the tool the first time it is used during a Tux Paint session. If Tux Paint is being invoked with the sizing option disabled, this will be the only size requested by Tux Paint. Return a number between '1' and the amount you returned in <code>accepted_sizes()</code>. </p>
|
||||
<p>
|
||||
<b>Note:</b> Called once for each Magic tool your plugin claims to contain (by your "<code>get_tool_count()</code>"). </p>
|
||||
</dd>
|
||||
|
|
@ -457,7 +457,7 @@
|
|||
<b>Note:</b> Changed most recently in Tux Paint 0.9.29; Magic API version 0x00000007. </p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>void set_size(magic_api * api, int which, SDL_Surface * canvas, SDL_Surface * last, Uint8 size, SDL_Rect * update_rect) </b></code></dt>
|
||||
<dt><code><b>void set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * last, Uint8 size, SDL_Rect * update_rect) </b></code></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Tux Paint will call this function to inform the plugin of the 'Magic' tool size option chosen. (It will be called whenever one of the plugin's Magic tools that accept sizes becomes active, and whenever the user picks a new size while such a tool is currently active.) </p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue