Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Request for help on my own skin  (Read 1157 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Request for help on my own skin

Hello everyone,

I'm new to this forum as I`m to foobar2000. I guess you could call me a newbie :))
So I'm not sure if this is the right place to post such request.
In the last few weeks I took my first steps to create my first own Skin and atm it looks likes in the picture below.
I do like how it looks but I think I have some kind of bug in my coding. Right now I'm at a point where I don't know how to solve it on my own. So I hope you can take a look at it. The problem is: sometimes if a new song starts or if I start playing a different playlist it switches to one of the other views. For example form "Playlist" to "Bio".

The related code looks like this:
Code: [Select]

$puts(back.color,42-44-46)
$puts(font.color,215-215-215)
$puts(font_dark.color,85-85-85)
$puts(button_h.color,0-250-206)
$puts(button.color,0-235-191)

//--MAIN PANEL SWITCHER

$ifequal($get_ps_global(showpanel),1,
$showpanel_c(Playlist,1)
$showpanel_c(Lyrics,1)
$showpanel_c(PlayItem,1)
$puts(PlaylistButton,$get(button.color)),
$showpanel_c(Playlist,0)
$puts(PlaylistButton,100-100-100))

$ifequal($get_ps_global(showpanel),2,
$showpanel_c(Bio,1)
$showpanel_c(Lyrics,1)
$showpanel_c(PlayItem,1)
$puts(BioButton,$get(button.color)),
$showpanel_c(Bio,0)
$puts(BioButton,100-100-100))

$ifequal($get_ps_global(showpanel),3,
$showpanel_c(Youtube,1)
$showpanel_c(Lyrics,0)
$showpanel_c(PlayItem,0)
$puts(YoutubeButton,$get(button.color)),
$showpanel_c(Youtube,0)
$puts(YoutubeButton,100-100-100))

$textbutton(20,20,100,50,Playlist,Playlist,SETGLOBAL:showpanel:1;
REFRESH,
fontcolor:245-245-245 brushcolor:$get(PlaylistButton),
fontcolor:255-255-255 brushcolor:$get(button_h.color))

$textbutton(135,20,100,50,Bio,Bio,SETGLOBAL:showpanel:2;
REFRESH,
fontcolor:245-245-245 brushcolor:$get(BioButton),
fontcolor:255-255-255 brushcolor:$get(button_h.color))

$textbutton(250,20,100,50,Youtube,Youtube,SETGLOBAL:showpanel:3;
REFRESH,
fontcolor:245-245-245 brushcolor:$get(YoutubeButton),
fontcolor:255-255-255 brushcolor:$get(button_h.color))


The first time this bug occurred was as I implemented the second panel switcher on the left side. It is written on a differnet layer so I don't know why they should be related to each other in any way.

If there is anything missing to find a solution please let me know!

Thank you kindly for your time :)

Loigzorn


Re: Request for help on my own skin

Reply #1
Peter is apparently very busy, all the time now, so you'll just have to wait until he looks at this.

(Yes, I did see your pity report from today, saying we may as well delete this now if nobody is going to answer it in a timely manner.)

Re: Request for help on my own skin

Reply #2
Hi Loigzorn, at first glance I see no bug in your code. If two panels reference and manipulate the same global variable, they can affect each other, even if they are on different "layers". So, my guess is that the code of "the second panel switcher on the left side" manipulates the showpanel global variable somehow.
I'm late