[Tuxpaint-devel] Magic tools now report an "order" integer
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Bill K. <nb...@so...> - 2024-01-17 07:24:06
|
Magic tools are now queried for an 'order' value (an integer), which is used as the sorting method for organizing the various tools within each group. I've just assigned some values to every single Magic tool in every plugin (.c) file. Whew! This allows us to place related Magic tools next to each other, rather than having them organized somewhat arbitrarily by their name (which of course differs for each language!) I've been thinking about doing this, especially after adding numerous related tools which make sense to list in a certain order (Isometric, Dimetric, Trimetric, Oblique), rather than alphabetically (in English, they appeared in the order: Dimetric, Isometric, Oblique, Trimetric). Thanks to Shin-ichi for mentioning this, which was the nudge I needed to actually get it done. ;) Note that the numbers are relative to other tools within the same group, and remember that a particular plugin source file may place tools in different groups than each other. (For exmaple, "swirls.c" has both the "Circles" and "Rays" distortion effects, and the "Fur" painting tool.) I thought about creating a 'global' header file for the entire set of Magic tools that ship with Tux Paint, but since it was already an overwhelming task to modify 62 source files, AND think about how to organize the approx. ten dozen tools, I figured this was good enough for now. Time for bed. :-) Please try it out and let me know if you notice any issues, or have suggestions on how to improve the ordering of things. (This WILL have a "who moved my cheese!?" effect on users, but frankly so does adding new Magic tools, which get inserted in the groups... and so did adding groups to begin with!) -- -bill! Sent from my computer |