Hi all.
Is it possible to define global variables in WFS like you can with Watchmaker? I’d like to be able to set the variable with a tap action and then it could set values for multiple objects.
Pseudo code Example:
Var_opacity = 100;
On image_tap:
If Var_opacity == 100
Var_opacity = 0;
Else
Var_opacity = 100;
Set image.opacity = Var_opacity;
Set secondhand.opacity = Var_opacity ;
(I’m sure this code isn’t right for WFS, I was just making an example.)
By the way - does anyone know where can I get code documentation / examples for WFS code?
Many thanks
-Mike
1 Like
Unfortunately, As far as I know, there are no tap actions in WFS aside from launching an app/ and SM/LGBox Complications. Things like hiding/unhiding elements can only be done through masking which then the user can configure those elements in the customize menu. There are tutorials in the forum regarding masking. How I wish they had Watchmaker/Facer tap actions in WFS, then you might actually see something like a true working chronograph which I have yet to see on anything made in WFS so far. I am no expert by any stretch but I imagine this can only be done so far if you have the ability to make watch faces from scratch in Android Developer?
If you ask questions in the forum about code/“how to” etc., you may get an answer, or search the forum. That’s how I have managed to get answers here so far.
Oh, I also have a good friend who I really appreciate who know way more than I do too. 
2 Likes
Alas no, but this would be SO helpful!
I’d love to be able to set the sizes and positions of elements based on calculations. This would make it so much easier to play with different values when they affect multiple elements. I’m almost inclined to write some code to process the watchface.xml to support this. It could work equivalently to how SASS, LESS, etc work for CSS.
AFAIK, there aren’t any code samples for WFS because WFS is a GUI. A minor exception is tag expressions. There are code samples for WFF, but they’re not much help in WFS.
2 Likes