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 409351 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Not my release] foo_uie_panel_splitter

Reply #500
just dreaming of a such feature to divide the # of rows in my PSS script by twelve

...
$draw_my_themed_frame($get(p.x),$get(p.y),$get(p.w),$get(p.h))
...
...
...
...
...

$set_ps_function(draw_my_themed_frame,4,%01%,%02%,%03%,%04%,
$drawrect(%01%,%02%,%03%,%04%,255-255-255,255-000-000,)
$drawtextex('Amazing',$add(%01%,5),$add(%02%,5),$gettextwidth('Amazing'),20,000-000-000,left top)
...
...
)


(4th parameter (=4) would be the number of variable parameters, after these 4 varaible parameters, there is function to perform)

[Not my release] foo_uie_panel_splitter

Reply #501
v0.3.8a released !

change log:

    *  added: allow to configure persistency of global variable with $init_ps_global
      $init_ps_global(NAME,VALUE,0) implies that global variable NAME is deleted when quiting foobar2000.
    * added: $delete_ps_global.
    * fixed: $drawthemerect didn't work.

thanx

EDIT: Here is the new GLOBALS tab view, more clear and PERSISTENCY info visible:


[Not my release] foo_uie_panel_splitter

Reply #502
Great to see this component is continually developed.

But I have a question: How do you make progress bars with PSS that not only show progress but can also be used to jump through the song when you click on it?

[Not my release] foo_uie_panel_splitter

Reply #503
Great to see this component is continually developed.

But I have a question: How do you make progress bars with PSS that not only show progress but can also be used to jump through the song when you click on it?


it's not possible (it seems to me that i've already reply to a similar question => http://www.hydrogenaudio.org/forums/index....st&p=637985 )

you can only do it by using a WSH panel, after you can place it in a PSS panel like any other panel.

[Not my release] foo_uie_panel_splitter

Reply #504
Could someone explain to me the differences in these commands.

Code: [Select]
$showpanel_c(caption, sh)


Code: [Select]
PANELSHOW:'Now Playing':0;


I pretty much know what the panel show does as I use it. Thanks.

[Not my release] foo_uie_panel_splitter

Reply #505
i believe it should be possible to make a progress bar that will ff or rw when clicked, but not to jump to a specific place along the progress bar.  i have coded a functioning progress bar, i haven't tried to make it clickable yet, but it should be easy with a couple buttons.

yes falstaff, you answered my question about this earlier!  wsh panel confuses me : ( 
(clickable progress bar is not that important to me anyways)

EDIT:

i forgot... i am confused about what the difference between $drawimage and $imageabs is.

[Not my release] foo_uie_panel_splitter

Reply #506
Could someone explain to me the differences in these commands.

Code: [Select]
$showpanel_c(caption, sh)


Code: [Select]
PANELSHOW:'Now Playing':0;


I pretty much know what the panel show does as I use it. Thanks.


they do the same thing, but $showpanel_c() is a function to use in the script (per track or per second), and PANELSHOW is a command to use with a button: $imagebutton() or $textbutton(), so only activated on clicking this button.


[Not my release] foo_uie_panel_splitter

Reply #507
i believe it should be possible to make a progress bar that will ff or rw when clicked, but not to jump to a specific place along the progress bar
...


yes, you are right, it's possible in this way, but not possible to jump to a specific duration like a real seekbar does.

 

[Not my release] foo_uie_panel_splitter

Reply #508
Now I try using Text Buttons. But when I start the program, the Text Button is displayed as if it is selected, with drawn borders and background. Like I understand my own code, only text should be visible. Do you know what's wrong with the code?

Code: [Select]
$textbutton(0,4,%_width%,30,$font(Segeo UI,15)%title%,$font(Segeo UI,15)%title%,COMMAND:View/Columns playlist/Activate now playing,fontcolor:0-0-0,brushcolor:180-180-180-255 pencolor:0-0-0)

[Not my release] foo_uie_panel_splitter

Reply #509
Now I try using Text Buttons. But when I start the program, the Text Button is displayed as if it is selected, with drawn borders and background. Like I understand my own code, only text should be visible. Do you know what's wrong with the code?

Code: [Select]
$textbutton(0,4,%_width%,30,$font(Segeo UI,15)%title%,$font(Segeo UI,15)%title%,COMMAND:View/Columns playlist/Activate now playing,fontcolor:0-0-0,brushcolor:180-180-180-255 pencolor:0-0-0)


it's an old PSS bug, the first button in the PSS is always to the state hover on foobar launch. to fix this, i declare a fake button before all others in the script = a button with no image or no text to make it not visible, so everything is good for all other buttons

[Not my release] foo_uie_panel_splitter

Reply #510
Very good, thanks.

Another issue is I can't use $font(x,x,underline) in a Text Button. If I use

Code: [Select]
$textbutton(x,x,x,x,$font(x,x)x,$font(x,x,underline),[...])

the Button Text is always underlined (not just on mouse hover). Is this a bug, too?

[Not my release] foo_uie_panel_splitter

Reply #511
Is it possible to create buttons that performs multiple actions?
Can't wait for a HD-AAC encoder :P

[Not my release] foo_uie_panel_splitter

Reply #512
Is it possible to create buttons that performs multiple actions?


yes, just use ';' separator between each command in the $imagebutton() or $textbutton() functions

ex:

$imagebutton(100,100,20,20,$get(img_path)'/button.png',$get(img_path)'/button_hover.png',COMMAND:'your command 1';COMMAND:'your command 2';...;SETGLOBAL:my_global:my_value;...;PANELSHOW:PANEL1:1;...;REFRESH,)

[Not my release] foo_uie_panel_splitter

Reply #513
Damn, so no more excuse for not learning it, eh?
Can't wait for a HD-AAC encoder :P

[Not my release] foo_uie_panel_splitter

Reply #514
Quote
$ drawrect (x, y, w, h, R1-G1-B1-A1, R2-G2-B2-A2, OPTIONS)
Rectangular drawing functions.
Coordinates (x, y) size (w, h) Draws a rectangle.
R1-G1-B1-A1 internal color
R2-G2-B2-A2 Border Color

OPTIONS
Aa - put ANCHIERIASU

Example $ drawrect (0,50,50,50,255-128-64-128,, aa)

xbullethammer: the $drawrect() function supports alpha blending (anti-aliasing/anchieriasu) .. have you tried using this to draw a tinted rectangle over your image?


this doesn't seem to work. i tried with png 24bit, png 16bit, gif. with or without AA. even rendering the rectangle after the image, the latter always stands over.

[Not my release] foo_uie_panel_splitter

Reply #515
it must work, trust me

check your syntax (give it to us if we can help ... )

[Not my release] foo_uie_panel_splitter

Reply #516
Can I use PSS to find out which Playback Order is set? I'd like to create Image Buttons that set Playback Orders and grey out if another Order is selected.

[Not my release] foo_uie_panel_splitter

Reply #517
i believe it should be possible to make a progress bar that will ff or rw when clicked, but not to jump to a specific place along the progress bar.  i have coded a functioning progress bar, i haven't tried to make it clickable yet, but it should be easy with a couple buttons.

yes falstaff, you answered my question about this earlier!  wsh panel confuses me : ( 
(clickable progress bar is not that important to me anyways)

EDIT:

i forgot... i am confused about what the difference between $drawimage and $imageabs is.


you could use the good old foo_uie_powerpanels, that is what i'm gonna do.

$drawimage renders the image through GDI, $imageabs in some other way which seems to be slower.
from the wiki:
Code: [Select]
$ imageabs (x, y, w, h, path, OPTIONS, n, alpha, OPTIONS2) 
Coordinates (x, y) size (w, h) show the images in the path is specified.
Retained in memory and after resizing the image, if you raise the efficiency of the process see below.
The image is referenced, the memory is removed from them.
w, h in the original image size is omitted, and the cache.
(However, w, h if you are already cached in memory and then the image size to be directly cached)
Poor quality and will be expanded after the reduction.


$ drawimage (x, y, w, h, path, OPTIONS, n, aplha)
Coordinates (x, y) size (w, h) show the images in the path is specified.
$ Imageabs similar.
w and h show the size of the original omitted.
From memory immediately after display processing will be removed.
TF to be reloaded each time the images are evaluated.

   ? You can see a huge image, the amount of occupied memory?RASHITAKATTARI to see more pictures,
     imageabs for those who do not like the resizing process.

if you know japanese please have a look at the official site, and then provide us a better translation!

[Not my release] foo_uie_panel_splitter

Reply #518
Can I use PSS to find out which Playback Order is set? I'd like to create Image Buttons that set Playback Orders and grey out if another Order is selected.

here is how i test it in Xchange :

Code: [Select]
$if($stricmp($left(%ps_playback_order%,7),'default'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_default0.png',$get(z2)'/po_default1.png',COMMAND:'Playback/Order/Repeat (playlist)';REFRESH,)
,)
$if($stricmp($left(%ps_playback_order%,17),'repeat (playlist)'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_repeat_pl0.png',$get(z2)'/po_repeat_pl1.png',COMMAND:'Playback/Order/Repeat (track)';REFRESH,)
,)
$if($stricmp($left(%ps_playback_order%,14),'repeat (track)'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_repeat0.png',$get(z2)'/po_repeat1.png',COMMAND:'Playback/Order/Random';REFRESH,)
,)
$if($stricmp($left(%ps_playback_order%,6),'Random'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_random0.png',$get(z2)'/po_random1.png',COMMAND:'Playback/Order/Shuffle (tracks)';REFRESH,)
,)
$if($stricmp($left(%ps_playback_order%,16),'shuffle (tracks)'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_shuffle0.png',$get(z2)'/po_shuffle1.png',COMMAND:'Playback/Order/Shuffle (albums)';REFRESH,)
,)
$if($stricmp($left(%ps_playback_order%,16),'shuffle (albums)'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_shuffle_al0.png',$get(z2)'/po_shuffle_al1.png',COMMAND:'Playback/Order/Shuffle (folders)';REFRESH,)
,)
$if($stricmp($left(%ps_playback_order%,17),'shuffle (folders)'),
$imagebutton($add($get(pbt.x),$mul(2,24)),$get(pbt.y),22,22,$get(z2)'/po_shuffle_fo0.png',$get(z2)'/po_shuffle_fo1.png',COMMAND:'Playback/Order/Default';REFRESH,)
,)


[Not my release] foo_uie_panel_splitter

Reply #520
Can I use PSS to find out which Playback Order is set? I'd like to create Image Buttons that set Playback Orders and grey out if another Order is selected.


%ps_playback_order%, but the value won't be updated when you switch to another playback order. you shall use global variables i guess...

edit: some network problems delayed my answer. i'll try your test code, falstaff

edit2: it works! so i guess i had something mistaken when i tried to achieve this.

[Not my release] foo_uie_panel_splitter

Reply #521
...
you could use the good old foo_uie_powerpanels, that is what i'm gonna do.
...


this component is no more supported since v0.9.5.3


i know, but it still works
Code: [Select]
The following components are incompatible with this foobar2000 version and will function partially or incorrectly:
- foo_uie_powerpanels.dll : Seek Panel, Volume Panel
Please update these components to their latest versions if possible.


with this component i could style the seekbar in the pss panel, instead of a WSH panel, allowing me to chage its colour scheme along with all the rest of the panel in a click.

[Not my release] foo_uie_panel_splitter

Reply #522
Can I use PSS to find out which Playback Order is set? I'd like to create Image Buttons that set Playback Orders and grey out if another Order is selected.


%ps_playback_order%, but the value won't be updated when you switch to another playback order. you shall use global variables i guess...

edit: some network problems delayed my answer. i'll try your test code, falstaff


value is refreshed because you use it with a button, and you add the REFRESH command in this button, so ...

[Not my release] foo_uie_panel_splitter

Reply #523
Very great information, thanks.
So REFRESH triggers the whole script list again? I don't 100% understand the japanese .txt file. Is there a way just to refresh one of the 2 script lists (per track & per second)? I don't know how great PSS's performance is and if you should try to focus on fast code execution once your code list grows bigger and bigger.

Regarding this, I have another question: In terms of performance, would it be better if you disable "Enable per second" when you create a new PSS? By default, it is enabled. I use quite a few PSSs now that don't use scripts at all.

[Not my release] foo_uie_panel_splitter

Reply #524
Can I use PSS to find out which Playback Order is set? I'd like to create Image Buttons that set Playback Orders and grey out if another Order is selected.


%ps_playback_order%, but the value won't be updated when you switch to another playback order. you shall use global variables i guess...

edit: some network problems delayed my answer. i'll try your test code, falstaff


value is refreshed because you use it with a button, and you add the REFRESH command in this button, so ...


is it fixed now? I tried something like this some versions of PSS ago and it didn´t work, because %ps_playback_order% was only working (and updatd) in per second whereas imagebutton was only available in the per track script