Boolean/conditional help

Hi all,

I’m building a face that includes the time as well as icons for activity and weather. When tapping the activity icon, I want the time to hide and the activity stats to display. Similarly, when tapping the weather icon, the time should hide and the weather stats should display.

I have all of my layers done, I’m just having trouble with the transparency expressions to do the showing/hiding. I’m using

$#VAR_2#==1?100:0$

$#VAR_3#==1?100:0$

and var toggles to show/hide the weather and activity stats, and that part is working fine. The problem is I’m not sure how to hide the time when the activity or weather stats are on the screen.

Any help would be greatly appreciated.

You cannot adjust the visibility of the weather icon with transparency. To do this, you need to change the x or y position.

Weather icon x value: $#VAR_1#%2==0?160:-60$

Weather Text Transparancy value: $(#VAR_1#%2)==1?100:0$

You can benefit from the example.

1 Like

Thanks, but I don’t need to adjust the visibility of the icons. I need to adjust the visibility of the stats.

For example, when you tap the weather icon, the time should disappear and the weather stats should appear.

The icons should remain at the bottom of the watch face. It’s just the time and stats that should interchange.

Is that what you think?

Correct. Except the weather icon should not disappear, and the time should show as default.

I’ve actually changed the # VAR_1 # position to the first instance and this is exactly the same and I put it under the icon.

I’m sorry, but I’m not understanding how this solves my problem. Take this face for example:

Notice when you tap “chrono,” “weather,” or “steps,” the time face is replaced with whichever you tapped. I’m trying to do that same thing they did with that watch.

I think this is what you think

Yes! Except “Weather” shouldn’t disappear when tapping “Steps.” You should be able to tap either at any time. But yes, your example does essentially what I’m trying to do.

How should my expressions look?

Can you provide the expressions you used to accomplish this, please?

The easiest way to do this if I’m understanding correctly is to move the elements on and off the screen.

In which case, using the BA 4x4 Off Road 200 example.

(pseudo code and I’m rusty so bear with me)
Chrono ($#VAR_1#==1?160:-999$)
Weather ($#VAR_2#==1?160:-999$)
Steps ($#VAR_3#==1?160:-999$)

These would go in the X position, not transparency, so that when the trigger for VAR_1 is toggled on, it moves the Chrono background to the middle of the watchface. When it’s toggled off, it moves back to -999 (off screen)

The same goes for Weather… is VAR_1 is toggled on it moves onto the screen, and off when toggled off.

Etc.

You can get even more advanced with this… the toggle zones you set up, you can set them up the same way… so triggers aren’t “active” (read: on the screen where they can be tapped) when certain screen are up.

Here’s an example:

Hope this helps… long story short, try using X/Y movements instead of visibility to solve the problem.

EDIT: Sorry this is basically what zhnkrdg is saying.

Yeah, I had done that on the face I’m working on to hide the moon phase since it doesn’t have a transparency setting. Cool, I’ll switch to adjusting positions instead of transparency. Seems strange that that’s necessary. Maybe a future update will give us some more control.

Thanks a bunch for the info.