Page 1 of 1

Gallery pages

Posted: Mon Jul 04, 2016 4:12 pm
by Anne
I'm using the instant gallery code (viewtopic.php?f=51&t=22465), with code like this to go between gallery pages

Code: Select all

textbutton _("1") action [SetVariable('cg_page', 0), ShowMenu("gallery")]
The problem is this way all page buttons are shown as selected. How do I do it so that only the current page is selected?

Re: Gallery pages

Posted: Tue Jul 05, 2016 1:13 pm
by chocoberrie
So you want to define a selected state for the text button? Check out the documentation here. What you need to define is a selected_idle state and a selected_hover state.

I've never done this with text buttons before (I like using imagebuttons better because image states are much easier to define with those), so I don't know 100% how the code should be written. The documentation shows styles, but my knowledge of using them correctly is limited. ^^;;

Re: Gallery pages

Posted: Tue Jul 05, 2016 2:14 pm
by Anne
No, I defined the style alright. The problem is that using the gallery code all the gallery pages buttons are selected, not just the current page I'm on.

Re: Gallery pages

Posted: Tue Jul 05, 2016 3:02 pm
by namastaii
Are you certain it's not something wrong with the image? Like, perhaps you made a selected_idle version of an image your idle image? idle needs to be what it looks like before something is selected or even hovered. Just check and make sure all of that is set up right or even show us the images you have for that then see if it's something wrong in the code.

Re: Gallery pages

Posted: Tue Jul 05, 2016 3:42 pm
by Anne
I'm not using any images, just textbuttons and it's the same style I use for save/load pages so that's not it.

Re: Gallery pages

Posted: Tue Jul 05, 2016 4:45 pm
by namastaii
ah okay.