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: [Not my release] foo_uie_panel_splitter (Read 401878 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Not my release] foo_uie_panel_splitter

Reply #850
I need some guidance on making switchable panels. First, an image because it's simpler for me to show what I'd like to accomplish.

It's pretty self explanatory but I can't figure out the methodology for creating additional buttons in a given view. I'd like the right panels to be a set size (figure that out once I get them there) and only visible when the Track View button is selected and also not interfere with the Now Playing panel. Order and type of splitters seems to be my biggest hangup right now. IE: Do they stem from the root splitter or from one of the child splitters below that? Is there a need for anything but PSS splitters? I'm guessing not because I see you can set orientation in the configuration dialog.

Not really interested in fancy. Just basic and functional at this point.

[Not my release] foo_uie_panel_splitter

Reply #851
I need some guidance on making switchable panels. First, an image because it's simpler for me to show what I'd like to accomplish.

It's pretty self explanatory but I can't figure out the methodology for creating additional buttons in a given view. I'd like the right panels to be a set size (figure that out once I get them there) and only visible when the Track View button is selected and also not interfere with the Now Playing panel. Order and type of splitters seems to be my biggest hangup right now. IE: Do they stem from the root splitter or from one of the child splitters below that? Is there a need for anything but PSS splitters? I'm guessing not because I see you can set orientation in the configuration dialog.

Not really interested in fancy. Just basic and functional at this point.

I've been fiddling with panels recently (without success so my question will be next    ) but I don't understand what you're trying to accomplish. Do you want to hide/show panel nr2 (or is it 1+2?) with a button while resizing playlist panel? If so, maybe something using these commands:
$imagebutton(x,y,w,h,path,mover_path,PANELSHOW:panelnr2:-1;REFRESH)

$if($isvisible_c(panelnr2),
$movepanel_c(playlist,x,y,W,H),
$movepanel_c(playlist,x,y,W,H)?


[Not my release] foo_uie_panel_splitter

Reply #852
Would like for panels in #2 to behave like tabs. They would always be visible when Track View is selected.

[Not my release] foo_uie_panel_splitter

Reply #853
It's probably me being dense but if you want to push a button and panels to appear the question is where:
A. instead of something which to me "like tabs" implies
B. on the right side of a playlist without resizing playlist
C. on the right side of a playlist but with resizing?
or
D - there's a panel there already and you'd like to toggle different 2 panels on and off with a button within it (like tabs)?

Maybe it's obvious but if it's A or D
- create two panels in the same place
- check hide on startup for one - Panel1

$imagebutton(x,y,w,h,path,mover_path,,PANELSHOW:Panel1:-1;REFRESH)

$if($isvisible_c(Panel1),
$showpanel_c(Panel2,0)
$showpanel_c(Panel2,1))

and thus I showed all my button-panel-hiding-moving skills :-( so maybe someone smarter can figure it out.

[Not my release] foo_uie_panel_splitter

Reply #854
Here's a different image with a slightly better explanation. First: Image.

Notice that the Playlist button in upper left is currently selected. On the right Cover Flow and channel spectrum are in the location of where I'd like the switchable panels in question to reside. Currently, they are in the same panel stack splitter as the PL manager and playlist and are located by X,Y coordinates. Would prefer them to be relative. The latter is because if the window is resized or maximized all sorts of nasty happens with set coordinates. However, that's the least of the issues for now and can be dealt with later.

I want the PL manager and playlist to be the static parts of the layout (static in the sense that they would only move if resized). I want a series of buttons to appear above where Cover Flow is now that control the smaller panels but are only visible when the Playlist button is selected. When the Now Playing button is selected it switches to another full-size view and the buttons controlling the switchable panels are then no longer visible.

Additional smaller panels on the right will include elements like filters, info, etc. Items that I do not want to see at all times but are useful to have.

Hope that makes more sense.

[Not my release] foo_uie_panel_splitter

Reply #855
for relative positioning, just use something like $sub(%_width%,300) in your code for the x co-ordinate.

[Not my release] foo_uie_panel_splitter

Reply #856
for relative positioning, just use something like $sub(%_width%,300) in your code for the x co-ordinate.


Knew about that. Didn't know it worked on splitters until I had another go at it.

Anyway, progress.

I'm guessing that I now have to start delving into showpanel functions.

[Not my release] foo_uie_panel_splitter

Reply #857
if you use

Code: [Select]
$showpanel(0,1)
$movepanel(0,x,y,w,h)


the first number 0 is the index of how they appear on the PanelList tab. 0 for first, 1 for second etc...

if you use

Code: [Select]
$showpanel_c(my_panel,0)
$movepanel_c(my_panel,x,y,w,h)


then you can give each panel a unique name and it doesn't matter what order they're in.

i always prefer to use $movepanel/$movepanel_c on the script tab rather than setting the values on the PanelList tab. it's much easier to make copies/make changes.

[Not my release] foo_uie_panel_splitter

Reply #858
So after a bunch of digging around in yuckfoo to see what the hell is going on with globals and whatnot I managed to get here. It was mostly blind luck to get that far.

The panels do switch and it's pretty close to what I was expecting. However, the image shows one thing I cannot figure out. Bottom of the window goes on forever. I set a global for panel height but probably dorked that one up good. And...without that %PH% global parameter the sub-panel/switchable splitters do not render. How do I terminate the bottom of the panels with say 1px padding?

There's more that I need to ask but this is the most pressing right now. Without knowing how to do the above, placement of elements in the switchable panels is a pain.

[Not my release] foo_uie_panel_splitter

Reply #859
when i calculate PH in my theme...

Code: [Select]
$set_ps_global(PH,$sub(%_height%,%PY%,%SH%,21))


i'm looking at the overall height of the whole parent PSS panel and minus PY which is the y co-ordinate of the switchable panel (this leaves room for the "bar" along the top that contains my buttons). then i'm also taking away my seekbar height (SH) and the 21 is for my "status" bar at the bottom. you probably need to remove those last 2 from the calculation.

[Not my release] foo_uie_panel_splitter

Reply #860
Ah, OK, makes sense now. I did do something close to yours but renamed/resized stuff. The above did the trick. Thanks.


[Not my release] foo_uie_panel_splitter

Reply #861
Ran into an unexpected glitch.

This is how the UI normally looks.

This happens when resizing the window.

I'm wondering if this has to do with placing the WSH panel and playlist in the parent splitter? Near as I can tell all have refresh but maybe I'm overlooking something taboo here.

The only way to get it to repaint is going back into parent splitters config dialog and then hitting apply afterward.

[Not my release] foo_uie_panel_splitter

Reply #862
it's impossible to speculate looking at those screenshots. you'd need to post your layout settings and code.

assuming you've copied bits from my theme, you know it works when resized. did you notice that every panel on the PanelList tab of the main PSS panel has forced layout ticked? i then use $showpanel on the script tab to hide/show every panel depending on the value of my global variables and finally, i use $movepanel to position the panel(s).

[Not my release] foo_uie_panel_splitter

Reply #863
Sure. You mind a PM? This is so not ready for wide spread use and would rather not inflict this headache on others just yet.

[Not my release] foo_uie_panel_splitter

Reply #864
i have PMs disabled so you won't get very far trying to send one.

just post what you have.

[Not my release] foo_uie_panel_splitter

Reply #865
Splitter text & .fcl file. http://1drv.ms/1BgM2hu


EDIT: had the wrong text file included

[Not my release] foo_uie_panel_splitter

Reply #866
delete the $movepanel/$showpanel stuff from your script tab and replace with this:

Code: [Select]
$showpanel(0,$ifequal(%PANEL%,0,1,0))
$showpanel(1,$ifequal(%PANEL%,1,1,0))
$showpanel(2,$ifequal(%PANEL%,2,1,0))
//just one $movepanel here to position "active" panel
$movepanel(%panel%,$sub(%_width%,%SBP%),%PY%,%SBP%,%PH%)

//remove any values/padding you have set for these on the PanelList tab. it's easier to maintain in script.
//just make sure forced layout is the only thing enabled
$movepanel_c(PLM,0,%PY%,%PM%,%PH%)
$movepanel_c(ELPlaylist,$add(%PM%,1),%PY%,$sub(%_width%,%PM%,%SBP%,1),%PH%)

[Not my release] foo_uie_panel_splitter

Reply #867
Thanks. Neat padding trick, too.

One last question to satisfy my curiosity. Is it possible to make another panel that essentially pushes all that business above out of the way for like a single view? Including the %SBP% global. No panel changing would take place on it other than reverting back to view created above.

[Not my release] foo_uie_panel_splitter

Reply #868
I'm having trouble with button state colors. This is what I want to accomplish depending on what is happening with the buttons.



The above was done using the method described in deviantart's fb2k skinning tutorial pt. 3. Brushcolors shown are: selected, idle, hover.

Is it possible to insert %brushcolor_s% in the method below to show which button is selected? I keep running into errors or nothing happening at all.

Code: [Select]
$set_ps_global(brushcolor,160-160-160)
$set_ps_global(brushcolor_h,190-190-190)
//$set_ps_global(brushcolor_s,90-190-190)
-------------
$textbutton(1,1,%BW%,$sub(%BH%),%P0%,%P0%,SETGLOBAL:PANEL:0;REFRESH,fontcolor:%textcolour% brushcolor:%brushcolor%,fontcolor:%textcolor_h%)

[Not my release] foo_uie_panel_splitter

Reply #869
you have to check the value of %PANEL% on each button to see if the button is active or not. for the first button...

Code: [Select]
$ifequal(%PANEL%,0,%brushcolor_s,%brushcolor%)

[Not my release] foo_uie_panel_splitter

Reply #870
Barring the typo... Still not sure where it goes. Before, in, after the button string?

[Not my release] foo_uie_panel_splitter

Reply #871
in. replace

Code: [Select]
brushcolor:%brushcolor%


with

Code: [Select]
brushcolor:$ifequal(%PANEL%,0,%brushcolor_s%,%brushcolor%)

[Not my release] foo_uie_panel_splitter

Reply #872
Wow. That was easy. I've been fighting with that sucker for two days now.

Thanks again, marc.

[Not my release] foo_uie_panel_splitter

Reply #873
So here's where I'm at currently. I could stick a fork in it and call it done, but...there's that final image that has me thinking. Instead of moving the entire lot off screen what about the area marked? The idea would be to place maybe EsPlaylist in album mode as a secondary view. Is that a) feasible b) not a giant PITA to get done if so?

Right now the PLM, and playlist are inserted from the main splitter while the switchable panels are in their own respective splitters. Would the PLM and playlist need to be placed in their own splitters or can panel switching like this still be accomplished in the main splitter?

This is mostly to satisfy my curiosity and maybe learn some more about PSS.

[Not my release] foo_uie_panel_splitter

Reply #874
Is there a way to define button width in global settings based on splitter width and number of buttons?

EG: Splitter width/N buttons (spaces?) = auto-sized buttons with 1px spacing between them regardless of window size.