tips:tapcolor
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tips:tapcolor [2015/03/30 16:40] – [Explanation] jt3 | tips:tapcolor [2015/03/30 19:48] – [Explanation] jt3 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Changing Color Through Tap Action ====== | ====== Changing Color Through Tap Action ====== | ||
- | A feature that's becoming more and more common, especially with paid watches that can't be edited, is the ability to change the color of an item or items on your watch face via tap action. | + | A feature that's becoming more and more common, especially with paid watches that can't be edited, is the ability to change the color of an item or items on your watch face via tap action. |
- | ===== Examples | + | ===== Example |
==== Main Script ==== | ==== Main Script ==== | ||
- | Var_clrnum=1 | + | var_clrnum=1 |
| | ||
Line 19: | Line 19: | ||
- | ==== Tint Field of Object ==== | + | ==== Color Field of Object ==== |
| | ||
==== Tap Action ==== | ==== Tap Action ==== | ||
Line 26: | Line 26: | ||
===== Explanation ===== | ===== Explanation ===== | ||
- | We start in the main script by initializing our variables. | + | We start in the main script by initializing our variables. |
- | Let's take a closer look at that "Var_color1." | + | Let's take a closer look at that "var_color1." |
+ | |||
+ | Since, in an array, a variable can have multiple values, we determine which value we want like this: var_color1[1], | ||
In the script, we set up a function that acts as a toggle. | In the script, we set up a function that acts as a toggle. | ||
- | All we have to do now is set the tint field of our object(s) to: var_color1[var_clrnum] | + | All we have to do now is set the Color field of our object(s) to: var_color1[var_clrnum] |
+ | |||
+ | ...and set the desired tap action to call the function. | ||
- | ...and set the desired tap action | + | Add or remove colors by simply adding or removing colors in the var_color1 array, |
- | Add or remove colors by simply adding or removing colors | + | One last thing: |
tips/tapcolor.txt · Last modified: 2015/04/24 05:16 by jt3