Button Explanation?

Q&A about the latest versions
Post Reply
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

I have a question.....

I seem to remember asking this a while back but it is still eating at me.

What in the HEeeeeelL is the purpose of the button? :-) There are three variables within the button itself which are:

Normal - makes absolute sense
Mouse Over - makes absolute sense
Selected - makes absolutely no sense because after you select it it reverts back to normal.

What is the purposeful function of "Selected" if after you select it it reverts right back to normal? Might as well just leave selected off the list and get the same effect when the mouse leaves and it reverts back to normal :-)

One would think that if you selected something, that it would stay selected until you deselected it, but it doesn't work this way.

WHAT AM I MISSING????? HAha!!
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

hahaha,
Think of pressed actions, Zoom, Pan etc.
Button up, then on hover, it changes colour, then on press it dips in.
As you release the mouse it goges back on hover.
Rubish example added ;-)
The button is flat, then on hover, it pops out a bit and then on click, dips in.
Regards,
Hopki
Attachments
skin.ggsk
(8.63 KiB) Downloaded 120 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

AHA!

"Think of pressed actions, Zoom, Pan etc." Ok I see now. So a different type of button altogether when thinking of the term "Selected". I see. That makes sense for that purpose :-)

Thanks for the explanation Hopki!

Would be nice if the button feature had an option to use it as you have specified, OR, if you could also use it as a button that is selected (for say a specific node or audio file or whatever object is active) where the button would STAY selected like in this short vid:

https://youtu.be/DMacPHNnUEk. Took me 65 logic blocks and 5 variables to get the buttons to do that.

It would make creating buttons a lot easier from the user end standpoint instead of having to create the button from scratch and add all the logic to get it do what the button ALMOST does :-)
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Courtney,
Please find attached a little project.

This uses a menu that has the pointer that moves to the selected text/node.
This uses a method not spoken about much these days because of advances in the logic block for map pins.

What it is doing is, on node change, change the position of the element menu_selection to _self.
Then an action filter is used so the action is only used when in the correct node.

The rules for this to work are the moving graphic must be the same width as the text boxes.
All anchors must be top left and all elements involved, menu_selection, and the two text boxes must be in a fixed size element.

So inside the container, menu, the menu_selection is positioned 0/0.
The text boxes then have the action that on node changed, change Element Position, _self, target: menu_selection.
What this is doing is pulling the element menu_selection on top of the text box.

This works regardless of where the text box is inside the container.
As an example select the Panorama One text box and drag it down the skin, but so it's still a child of the container.
The pointer will always find it.
I am using node_changed so it will work regardless if you click the menu or use a hotspot to change nodes.

This was used in the "old days" to move an active map pin before we have node markers.
But still a good way to make this type of menu work.
Regards,
Hopki
Attachments
Courtney.zip
(24.01 KiB) Downloaded 118 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

Hey thanks Hopki!

I'll definitely give it a try to see how it works. Thanks again!
Post Reply