Skip to main content
Topic: [Not my release] foo_uie_panel_splitter (Read 282257 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [Not my release] foo_uie_panel_splitter

Reply #975
Switch mode? What exactly are you trying to achieve?

Re: [Not my release] foo_uie_panel_splitter

Reply #976
I'm trying to mimick the behaviour of old track info mod panel
(the one that steals the focus).

Always in "Per track" mode (follow cursor) but when the track selected
is the playing one switch to "Per second" and show the time running.
As soon as another track is selected switch to Per track again.

I can't just use always Per second otherwise it will always show only
the playing item info, loosing the follow cursor behaviour.

If I'm not wrong.

Thanks.

Re: [Not my release] foo_uie_panel_splitter

Reply #977
I'm not familiar with track info mod so I can't really know what you're talking about but just to put it simply per track and per second are identical in every aspect with the difference being that one has a much shorter update interval. For example time progression of a track, rating updates, vbr bitrate changes are some of the stuff you'd be putting in the per second section.
It makes sense for per second to only show the now playing progression since it needs to be playing for it to show something. What the panel shows depends on the title formatting mode on startup. If it's set to now playing it will retrieve information of currently playing, if it's set to follow cursor it will show all of the selected track. This setting is valid for the panel itself irrespective of per second or per track.

Why would you expect time progression of a non playing selected track? It's not playing so there's nothing to show.
That's why I'm asking what you're trying to achieve as for now your explanation makes no sense and saying mimicking behavior of track info mod says nothing to me since I don't know what that behavior is supposed to be.

What exactly did you put in the per second and per track tab? Again, what is it you want to achieve? What is you want to display under what conditions?

Re: [Not my release] foo_uie_panel_splitter

Reply #978
Sorry but I thought my explanation were clear enough.
Forget what I said about track info mod and let me start from scratch.

First of all let me say that I am non interested to show the info of a selection of more than one track
so we are just talking of a selection of one track at a time.

This is what I'd like to show:


Short explanation
Always show follow cursor info with just the length but
when the now playing track is selected, show the running time (elapsed and remaining) instead of just the length.

Long explanation
1 - always show the info of the track selected (follow cursor) with just the static info of its length
2 - if I select the playing track, still show the info of that track (because the cursor is there) but, as it is playing, show also the
running time info (played and remaining time) updating the values every second
3 - if then I select another track (with the previous one still playing) show the info of the newly selected track (still follow cursor)
with just the static info of its length (actually, revert to state 1)

As you can see, the info I want to show are the same in all cases, apart the time info, so I could place the same script into both panes (Per track and Per second) but,
as Per second is always enabled, as soon as I start playing a track, the panel will always show its info and, if I then select another track, it will overlay its info over the now playing info.

So, for my limited knowledge, a solution would be to be able to enable the Per second mode only when
the selected track is the actual playing one and disable it as soon this is not true anymore.

Thanks.

Re: [Not my release] foo_uie_panel_splitter

Reply #979
Ok your short explanation clears things up.
I've tested it and it appears per second always goes to nowplaying even if follow cursor is selected. So even using something like $if(%ps_isplaying%,%playback_time%,%length%) simply doesn't work.
In short it's not possible. Everything set in per track with follow cursor does work but you simply can't combine the two since per second is always on focus of nowplaying.

Re: [Not my release] foo_uie_panel_splitter

Reply #980
OK, your answer confirms what I thought.

Anyway, thank you for taking the time to look into this.

Re: [Not my release] foo_uie_panel_splitter

Reply #981
I would like to have pieces of text of different colours on the same line
and horizontally center it as a single text: any direction on which path to follow, please?

See the line with the cyan rating in the pic a couple of message above.

Thanks.

Re: [Not my release] foo_uie_panel_splitter

Reply #982
To center text in a panel manually requires some scripting. This x coordinate variable example is how I find the x position:
Code: [Select]
$puts(ARTIST.X,$sub($div(%_width%,2),$div($gettextwidth(%artist%,bauhaus,22,),2)))

The reasoning behind this is as follow. First find the middle point of the panel by dividing the total width of the panel by 2. Then find the middle point of your text width. Then subtract half the panel with with half the text width and this will get you the middle point to align the center of the text with the center point of the panel width. The function gettextwidth makes the textlength into a variable.

Change ARTIST.X variable name to whatever you want (be sure to call the variable also by it's changed name), change %artist% to whatever tag you want to use, change bauhaus to font you want to use and change 22 to the font size.
When drawing your text be sure you use the same values like this:

Code: [Select]
$font(bauhaus,22,)
$drawtext(%artist%,$get(ARTIST.X),13,%_width%,40,0-0-0,)


For your second question to have pieces of text on the same line is possible but a bit tricky if the sizes of both text elements have variable sizes since for both text elements you'd have to calculate the center x coordinate relative to each other's sizes.
You can't define font color twice within the same $drawtext function thus each separate color needs to be drawn once and thus for each a separate x coordinate needs to be set. Doing something like $drawtext(%artist% - %title%,x,y,w,h,color1, color2) doesn't work.

Re: [Not my release] foo_uie_panel_splitter

Reply #983
If this component it's still maintained, I beg the persong in charge
to make the "splitter settings" window remember its last position
and also wich tab was selected when closed last time.

If this is possible, of course.

Thanks.

Re: [Not my release] foo_uie_panel_splitter

Reply #984
I'm trying to get the $findfile fn to work with columns UI and add that to a column.

To use something like this (found here)
Code: [Select]
$if($findfile(%path%),,$puts(text_color,%text_color_dead%)$puts(text_color_alt,%text_color_dead%))

Is that possible?

Re: [Not my release] foo_uie_panel_splitter

Reply #985
What is that if statement supposed to do?

 

Re: [Not my release] foo_uie_panel_splitter

Reply #986
What is that if statement supposed to do?
It'll colour the missing files from the library accordingly. It's just an example I've seen while googling this fn.

I was hoping to set up a column to show missing library files.

Re: [Not my release] foo_uie_panel_splitter

Reply #987
That $if statement doesn't make much sense to me without extra information.
Also, I doubt you're in the correct thread for this.

Re: [Not my release] foo_uie_panel_splitter

Reply #988
This thread is for the plugin (foo_uie_panel_splitter) where I've read in the help that there's a $findfile function. I was wondering how to add a column using columns UI with this.

The if statement is not the question here. You don't need to get too bogged down with that.


Re: [Not my release] foo_uie_panel_splitter

Reply #989
From the PSS wiki:
Panel Stack Splitter is a ColumnsUI extension for advanced placement and scripting of panels. It functions as a splitter in the ColumnsUI panel hierarchy (i.e., it can contain other panels).

PSS doesn't create "columns". Simply put it's used to place panels. It is likely you're talking about a Columns UI playlist/library viewer but you don't say which. As I said, you're not in the correct thread.

Yes, $findfile is a PSS function....to be used within PSS.

Re: [Not my release] foo_uie_panel_splitter

Reply #990
I wanted to post here as this is the panel splitter plugin. If I asked in columns UI they'd probably say I was in the wrong thread too.

I thought there was a way to use the fn inside a column in columns UI. I'll post on the columns UI page to request such a thing.

 
SimplePortal 1.0.0 RC1 © 2008-2018