Go Back   Winamp Forums > Skinning and Design > Modern Skins

Reply
Thread Tools Search this Thread Display Modes
Old 22nd December 2005, 13:04   #1
vestige93
Junior Member
 
vestige93's Avatar
 
Join Date: Dec 2005
Posts: 8
Popup Menu Problem

Hi,

I made a popup menu for my skin to change modes, but the check marks in the menu don't update. It changes from Normal to Shade and also to Mini, so I can't figure out why the marks don't change too. Here is my code:

mousetrap.onRightButtonDown(int x, int y) {
ChangeMode();
}

ChangeMode() {
PopupMenu popupModeChange;
Int intModeChange;

popupChangeMode = new PopupMenu;
popupChangeMode.addCommand("Normal", 1, (intMode == 1), 0);
popupChangeMode.addCommand("Shade", 2, (intMode == 2), 0);
popupChangeMode.addCommand("Mini", 3, (intMode == 3), 0);

intModeChange = popupChangeMode.popAtMouse();
if (intModeChange > -1) { setSkinMode(intModeChange); }
delete popupModeChange;
complete;
}

...........

setSkinMode(Int intMode) {
if (intMode == 1) {
containerMain.switchToLayout("Normal");
}
if (intMode == 2) {
containerMain.switchToLayout("Shade");
}
if (intMode == 1) {
containerMain.switchToLayout("Mini");
}


I did a search for popup menus but didn't find any with this exact problem.
vestige93 is offline   Reply With Quote
Old 22nd December 2005, 23:31   #2
mellowman
Junior Member
 
Join Date: Sep 2005
Posts: 4
Use the "checkCommand" function to update the marks on the menu. Something like

PHP Code:
// Unmark menu entry for previous mode
popupChangeMode.checkCommand(OldMode,0);
// Mark entry for the new mode
popupChangeMode.checkCommand(NewMode,1); 
mellowman is offline   Reply With Quote
Old 23rd December 2005, 10:10   #3
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Post the entire script, from what is there I cannot see where 'intMode' changes.
hammerhead is offline   Reply With Quote
Old 24th December 2005, 05:23   #4
vestige93
Junior Member
 
vestige93's Avatar
 
Join Date: Dec 2005
Posts: 8
Thanks for the replies, but I seem to have fixed it. Don't know why this worked, but I changed

setSkinMode(Int intMode) {

to

setSkinMode(Int intPlayerMode) {

and then set

intPlayerMode = intMode

Checkmarks now update.
vestige93 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump