Page 1 of 1

Change Button When Clicked?

Posted: Fri May 11, 2018 6:29 pm
by missingman
Hi all.

I have made a button that toggles my pano titles on and off. It works to a certain degree but I think I've got the whole concept wrong.

Here's a tour example with it in action:

http://missingman.co.uk/chapel/

It's the button on the right (Letter "A" with a line through it) and when clicked the image changes to one without a line through it and the tiles disappear. When clicked again, the image swaps back, the titles appear. So it seems to be working...

But, if you turn off the titles and then visit a hotspot, the titles reappear (don't want this to happen) but the button stays in the previous (and now wrong) state. It then needs two clicks to toggle things back correctly again.

Could someone give me some guidance to make the button work properly please.

Attached is my skin file.

Thanks
Steve

Re: Change Button When Clicked?

Posted: Fri May 11, 2018 8:13 pm
by Hopki
Hi Steve,
I would use a variable, something like: vis_tooltip, true/false and init value true.
Then under the visible logic block for the tooltip text box add the logic block:

vis_tooltip, =, false
Visible: false

Then you just need a button that would have the action:

mouse click, set variable value, vis_tooltip, Not(¬)

This will toggle the variable from true to false.
Regards,
Hopki

Re: Change Button When Clicked?

Posted: Fri May 11, 2018 8:41 pm
by missingman
OK, I'll have a read up on that. Cheers

Here's the other question that I asked in my email but not the above post:

When dropping down to mobile size I'd like a different toolbar and the hotspot labels permanently disabled. (A toolbar with no label toggle switch of course - not needed if there are no labels). If this were a normal web page I'd just use a CSS media query. Do you have a way to swap toolbars and disable the labels like this?

Thanks for your help, hope you like my tour. It's become very clear that the photography is the easy bit :-)

Re: Change Button When Clicked?

Posted: Fri May 11, 2018 9:46 pm
by Hopki
"It's become very clear that the photography is the easy bit"
Once you get to grips with it your find it is logical.

You have logic blocks, one of the triggers being Is Mobile.

So for something you want to hide if being displayed on a mobile, just set the visible logic block to:
Is Mobile, =, true, visible false

So knowing you can use an Is Mobile trigger you can also use scale to make something smaller.
Or have an element that only shows when the Is Mobile is used.


Of course you can also use the player width trigger.
Have a look at this post: viewtopic.php?f=22&t=11710#p48283
Regards,
Hopki

Re: Change Button When Clicked?

Posted: Sat May 12, 2018 12:03 am
by missingman
Great, thanks for your help.