|
|
#1 |
|
I had a discussion with Francis along these lines months ago. Here's the deal: Even though you can show(), hide(), and toggle() containers, they aren't guiobjects, and thus cannot use .isVisible, nor is there an onShowContainer nor onHideContainer, nor onToggle (although you can .toggle() it.).
What you can do, however, is get the total number of containers ( getNumContainers() ), then use a for loop to walk through them . Inside the for loop, do enumContainer(i), to get each container one at a time. Once you have the container in a temp object, you do tempcontainer.getNumLayouts, and start another for loop. Inside the second loop, you check each layout of the temp container to determine if it is visible or not. If the container you're looking for exists, and if any layout of the container is visible, set an int to 1, and then you can exit the loops, check if the int is 1, and do your stuff. Not exactly easy, is it? In speaking to Francis about it, he explained that a container isn't a guiobject, and thus can't be seen, so I asked Francis: If I can show, hide, and toggle a container, then why can't I check it visibility, or use onShowContainer, etc? It just makes sense to be able to access that information in a simple way. I don't care if it's my shade mode, or main mode showing, I just want to know if the container is open or not, right? [edit] If you're having trouble following my ramble, the code for it is already in QuarkAmp...I *think* the code for that should still be correct for the latest builds.[/edit] -=Gonzotek=- But I'm feeling much better now. |
|
|
|
|
|
|
#2 |
|
Forum King
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,607
|
my way would be to show the container onscriptloaded, and at the same time set an int to 1, make a button in maki that hides the container, and at that same time changes the int to 0. understand?
![]() |
|
|
|
|
|
#3 | ||
|
Quote:
Quote:
-=Gonzotek=- But I'm feeling much better now. |
|||
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2002
Location: Italy
Posts: 396
|
can't you add 1 to the int each time you toggle, so that you can chec if it's on or off by the parity?
|
|
|
|
|
|
#5 |
|
Forum King
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,607
|
make a button in maki to show/hide the container depending on whether the int is 1 or 0
code: save and load the container's state into the studio.xnf, and run that onscriptloaded. that way if you want something to happen only if the container is visible, you would do this: code: s-i-m-p-l-e ![]() |
|
|
|
|
|
#6 |
|
It always comes back to not being able to attach get the hide/show/toggle events of containers. There is NO onShow, onHide, or OnToggle for containers, so there isn't an event to cause the int to increment. Like I explained in my first post, I asked Francis about it: I can show, hide and toggle containers, but I can't use onShow, onHide, and onToggle. Why not?
He said that he'd add the functionality, but that was when Winamp3 was still in alpha. Now we're at rc3(almost), and they still aren't in. Not that I'm bitching, but I think it's safe to assume that they won't be there before 3 final. -=Gonzotek=- But I'm feeling much better now. |
|
|
|
|
|
|
#7 | |
|
Quote:
-=Gonzotek=- But I'm feeling much better now. |
||
|
|
|
|
|
#8 |
|
Forum King
Join Date: Aug 2001
Location: Perth, Australia MSN: mcbriar@ii.net Posts: All your posts are belong to me!!!!
Posts: 2,607
|
you win
![]() |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|