Unread postby Yin Cognyto » 01 Jul 2018 02:06
Ok, I have the following code:
Code: Select all
<Static Left='-127' Top='30' Width='60' Height='15' ImageTop='200' ImageLeft='0' >
<Static Left='0' Top='0' Width='122' Height='15' ImageTop='200' ImageLeft='0' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' >
   L: Video Processing Filters | R: Pixel Shader
<Button Tooltip='$CMD_POPUPMENU_VIDEO_FILTER' CmdID='CMD_POPUPMENU_VIDEO_FILTER' AltCmdID='CMD_POPUPMENU_VIDEO_SHADER' Left='0' Top='0' Width='122' Height='15' ImageLeft='646' ImageTop='301' Cursor='HAND' />
   Video Resolution
<Label CmdID='CMD_VIDEO_CODEC_SIZE_MESSAGE' Left='0' Top='0' Width='60' Height='15' FontName='#DEFAULT_UI_FONT' FontSize='12' TextColor='0xFFFFFF' HoriAlignment='1' />
   Video FPS
<Label CmdID='CMD_VIDEO_CODEC_FPS_MESSAGE' Left='62' Top='0' Width='60' Height='15' FontName='#DEFAULT_UI_FONT' FontSize='12' TextColor='0xFFFFFF' HoriAlignment='1' />
</Static>
</Static>
Basically, I want to fit multiple things in a limited space, so I need to either:
- scroll multiple adjacent labels at the same time or
- add multiple adjacent labels to a container and scroll the container or
- concatenate the label strings and scroll the resulting concatenated label
while having a button on top of the scrolling area and be able to perform actions when left or right clicking on it. As you can see, I tried to do the 2nd thing here, by having a 122px wide <Static> containing the labels and scrolling it inside another narrower 60px <Static>. In other words, I want something like

Code: Select all
<Label CmdID='CMD_VIDEO_CODEC_SIZE_MESSAGE, CMD_VIDEO_CODEC_FPS_MESSAGE, [other potential CMDs...]'>
scroll. For now, it doesn't work, so I need help achieving it, or alternatives that achive the same result (as the 1st or the 3rd option above) - if possible, of course.
Unread postby D2NP » 01 Jul 2018 07:06
scrolling text is works only in <Label container
and not support multiple CmdID's

the containers (<Label , <Button, ... etc) themselves do not support scrolling
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 01 Jul 2018 19:48
... and concatenating strings doesn't work in XML 1.0, as far as I know, right?
Well, that's too bad - I guess I'll have to deal with it the "classic" way then. Thanks for the information.
Unread postby D2NP » 01 Jul 2018 20:46
Code: Select all
<Button CmdID='CMD_POPUPMENU_VIDEO_FILTER' Align='Left' LeftMargin='1' RightMargin='1' AutoSize='1' Width='1' ImageWidth='10' ImageHeight='20' ImageLeft='10' ImageTop='20' >
   <Layout Width='5' />
   <Label Align='Left' AutoSize='1' CmdID='CMD_VIDEO_CODEC_SIZE_MESSAGE' ColorX='864' ColorY='528' Width='50' AutoSize='1' FontName='Tahoma' FontSize='11' VertAlignment='1' OffsetTop='1' />
   <Layout Width='5' />
   <Label Align='Left' AutoSize='1' CmdID='CMD_VIDEO_CODEC_FPS_MESSAGE' ColorX='864' ColorY='528' Width='50' AutoSize='1' FontName='Tahoma' FontSize='11' VertAlignment='1' OffsetTop='1' />
   <Layout Width='5' />
</Button>

if you about it
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 01 Jul 2018 23:10
Yes, that's a great idea for saving the space between the CmdIDs (just like putting a ', ' between them) - I didn't think about that before. However, the ideal result would be fitting Codec - Bitrate - Resolution - FPS for video, and Codec - Bitrate - Sample Rate - Channels for audio within a fixed area (a 120x15px area, for example) without changing the font size. That's why I mentioned scrolling in the original post.

Another idea would be to use a <Static State='CMD_PAGE_CONTROL'> to display all 4 video/audio fields within a fixed area, but that would require user interaction to change what is displayed (e.g. switch betwen video and audio info), and I would prefer it to happen without user interaction (e.g. automatic).
Unread postby D2NP » 02 Jul 2018 19:59
Yin Cognyto wrote:
Code: Select all
<Label CmdID='CMD_VIDEO_CODEC_SIZE_MESSAGE, CMD_VIDEO_CODEC_FPS_MESSAGE, [other potential CMDs...]'>
That is unable
According to the dev.
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 07 Jul 2018 01:23
D2NP wrote:That is unable, according to the dev.

Well D2NP, test this:
Code: Select all
<!-- Multiple labels scrolling (monospaced font) -->
<Button Tooltip='$' CmdID='' Left='48' Top='-40' Width='64' Height='16' ImageLeft='580' ImageTop='810' Cursor='HAND' VisParentMinWidth='479' />
<Label Text='%-9s                           ' CmdID='CMD_VIDEO_CODEC_FOURCC_MESSAGE' Left='48' Top='-40' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='2' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Label Text='         %-9s                  ' CmdID='CMD_VIDEO_CODEC_SIZE_MESSAGE' Left='48' Top='-40' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Label Text='                  %-9s         ' CmdID='CMD_VIDEO_CODEC_FPS_MESSAGE' Left='48' Top='-40' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Label Text='                           %-9s' CmdID='CMD_VIDEO_OUT_FOURCC_MESSAGE' Left='48' Top='-40' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Button Tooltip='$' CmdID='' Left='48' Top='-24' Width='64' Height='16' ImageLeft='580' ImageTop='810' Cursor='HAND' VisParentMinWidth='479' />
<Label Text='%-9s                           ' CmdID='CMD_AUDIO_CODEC_TYPE_MESSAGE' Left='48' Top='-24' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Label Text='         %-9s                  ' CmdID='CMD_AUDIO_IN_SAMPLE_RATE_MESSAGE' Left='48' Top='-24' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Label Text='                  %-9s         ' CmdID='CMD_AUDIO_IN_NUM_CHANNEL_MESSAGE' Left='48' Top='-24' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
<Label Text='                           %-9s' CmdID='CMD_AUDIO_OUT_NUM_CHANNEL_MESSAGE' Left='48' Top='-24' Width='64' Height='16' FontName='Courier New' FontSize='12' TextColor='0xFFFFFF' UsingScroll='1' ScrollDistance='1' ScrollInterval='50' HoriAlignment='0' VisParentMinWidth='479' />
Looks like it is possible, after all. Of course, I'll have to change the code a little, to make it without any visual 'bugs', but it is a start for what I was looking for. The trick is to use a monospaced font (so that you have the same string length in px in all cases) and to use PHP/HTML/XML placeholders like %s, but with a minimum width held of the variable value of 9 characters (aka approximatively 64 px for Courier New of size 12, in this case - which is the width of the visible label frame). See more about placeholders here.

What do you think, D2NP? That's what you get when you don't give up: the "impossible" becomes possible (even if it's a rudimentary workaround) ;)

P.S. By the way, I saw the %s trick in both Xmp4_EN_No-Border and xpm4zune skins on DeviantArt, but it was used only for CMD_TITLE_MESSAGE. The rest is my contribution.
Unread postby D2NP » 07 Jul 2018 02:47
Synchronous scrolling may break if you open other files during playback
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.
Unread postby Yin Cognyto » 07 Jul 2018 02:55
Yes, those were the 'visual bugs' I was talking about. Any solution to this?
The only workaround I tested and it worked was to first stop the play until the labels dissapear due to the lack of media playing (and probably reset their scrolling offset as well) and then play the next file. This way, it doesn't break and the scrolling remains synchronous.
Unread postby D2NP » 07 Jul 2018 03:04
Unfortunately, I do not know. It does not look like something that can be fixed.
Always try the latest beta version (x32 only) before continuing a discussion here.
When you have a problem (Follow steps 1,2,3)
This is NOT official support though. It is my contribution to Potplayer.

Login

Who is online

Users browsing this forum: No registered users and 3 guests