Change category item image on click?

Help each other out

Change category item image on click?

Postby ficklma1 on Mon May 05, 2008 6:20 pm

Is it possible to have a category image change to a different image with its clicked? I'd like to have a "toggle" like category button. I have two images, one with an led light off and one with it on. When the user clicks on a category item, I'd like it to switch - This is for a XM/Sirius radio database. Is this possible? FYI...I have the last free lobby version, if that helps.

Thanks
ficklma1
 
Posts: 12
Joined: Fri Oct 22, 2004 8:35 pm

Re: Change category item image on click?

Postby Marbles_00 on Mon May 05, 2008 6:38 pm

Try this post:
viewtopic.php?f=12&t=6047&p=42586#p42586

It at least gets you going. The only way to get a toggle action via cats in the freexlobby is to use P3rv's "cat" plugin. I haven't used it, but he goes into some indepth discussions.

To do it the simple, yet, unreliable way is to create a bunch of text boxes and set each one to an image. Then create events to show a box, and hide any others. Then tie the event to a catagory/database entry. You would have to do create an event for each image you want to show.

Hope it helps.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Change category item image on click?

Postby ficklma1 on Mon May 05, 2008 6:49 pm

Hi Marbles_00,

Thanks for the link. I'm still not 100% clear after reading. I might be missing something. I see that it's possible for a "text object" image to change when you hover over a category item, but can the "category item image" itself change once its clicked? An example would be: click a CD cover in the music DB category and have it change to a different CD cover once clicked.

Thanks again for your help.
ficklma1
 
Posts: 12
Joined: Fri Oct 22, 2004 8:35 pm

Re: Change category item image on click?

Postby Marbles_00 on Mon May 05, 2008 7:13 pm

Sorry if not clear....actually the link post is more for showing images defined to category items when items are hovered over. What your looking for, and correct me if I'm wrong, is a toggle action to show multiple states. If this is the case, there is no simple way of doing it like when using individual buttons and associating the buttons to events under the "Events" tab.

As indicated (though I don't have the post link offhand), is to use P3rvB3ar's catelogy P3rvTalk plugin. Though I haven't used it, I'm of very little help. Or to have two category entries, one for and "On" state, one for an "Off" state. You then have one, or two images for each state (depending on how you want to do it). The "On" would have an event to show an image or two, then perform a function, then the "Off" state would hide the images (and even show other images), and have an opposite function to it.

Is that what your looking for? :)
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Change category item image on click?

Postby ficklma1 on Mon May 05, 2008 9:12 pm

Yes, that's exactly what I'm looking for. I'll try that tonight an let you know how it goes.

Thanks!
ficklma1
 
Posts: 12
Joined: Fri Oct 22, 2004 8:35 pm

Re: Change category item image on click?

Postby Marbles_00 on Tue May 06, 2008 1:37 pm

Just remember doing it the simple way, it does not remember last state, so if for example you turn a light one in xlobby, and it is indicated, then for some reasone you exit xlobby and restart, it will most likely go back to the default imagery (most likely indicating a light off), even though the light is still on. So the logic is screwed up. The way to get around this is to put xlobby back into a default state when either upon exit or at startup (or both), where you would make sure the command to turn the light off is performed, then to set all images to the proper states (hide the "On" images, show the "Off" images). These show/hide commands can be found under the xlobby command list, and if I recall, they are "Show Button", and "Hide Button" (or something close to that nature).
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Re: Change category item image on click?

Postby Marbles_00 on Wed May 07, 2008 2:28 pm

DOH!

Silly me, if you want to use the more elaborate P3rv way, here is a collection of his forum posts formulated into a word doc.
http://xlobbystuff.googlepages.com/Togglecatsetup.doc

Had it on my help site, and totally forgot it was there.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada