Author Topic: Skin: Split file info string.  (Read 1487 times)

Damil

  • Posts: 4
Skin: Split file info string.
« on: 29 Jul '23 - 11:27 »
Currently you can only show the file info string as an one liner. See "mask_main.bmp" color id: 16 (RGB: 112,111,16).
For example: "MP3 - 192kb/s - 44100Hz - 3:14"

I think it would be nice to split this info string into parts.
At least for the time length ("3:14").
Like the current time color id: 10 (RGB: 230,197,170).

The title string could be also split into two parts. Artist and title name.
Currently this is defined in a title format string.
« Last Edit: 29 Jul '23 - 12:42 by Damil »

Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: Skin: Split file info string.
« Reply #1 on: 31 Jul '23 - 12:56 »
Currently you can only show the file info string as an one liner. See "mask_main.bmp" color id: 16 (RGB: 112,111,16).
For example: "MP3 - 192kb/s - 44100Hz - 3:14"

I think it would be nice to split this info string into parts.
At least for the time length ("3:14").
Like the current time color id: 10 (RGB: 230,197,170).

It sounds like you currently have pos_info1line=1 in your skinconfig, which combines the info into a single line. With pos_info1line=0 (the default), the info is split over 2 lines, with the time part being on the 2nd line. There's also a pos_info1line=2 option available, which combines the info with word breaks. If neither the 0 or 2 settings will work for you, then it could be possible to add a separate mask for the time part, but please note that part may also include other info, eg. "orders" in the case of MOD formats and looping info.

Damil

  • Posts: 4
Re: Skin: Split file info string.
« Reply #2 on: 31 Jul '23 - 22:56 »
I would prefer to only show time length. Without any other information.
Use case: Display current time left and time length right on position bar. (see attached image)

We could extend the "pos_info1line" with value 3 to only show time length.
This is maybe easier to implement than using a new mask color. There is also a info tab for such infos like sample rate, etc.


Ian @ un4seen

  • Administrator
  • Posts: 26083
Re: Skin: Split file info string.
« Reply #3 on: 2 Aug '23 - 17:04 »
Yes, a pos_info1line=3 setting could be a simple way to implement it, although perhaps not as flexible as a separate mask. Repurposing an existing mask does mean that the skin may look bad in older XMPlay versions (that don't recognise the new setting), but you can use the "minversion" skinconfig option enforce a required version.

Here's an update with the pos_info1line=3 option for you to try:

   www.un4seen.com/stuff/xmplay.exe

Let me know if you have any trouble with it.

Damil

  • Posts: 4
Re: Skin: Split file info string.
« Reply #4 on: 3 Aug '23 - 06:17 »
Great 👍 Thanks
It looks good and fits perfect to the simple modern skin I currently crafting. A minor thing: The time is formatted in "00:00" and the length "0:00" (leading zero).
In my opinion the full info like encoding (e.g. "FLAC (Free Lossless Audio Codec)" and sample rate (e.g. 44100 hz) etc. are irrelevant to always be displayed on the main panel. The user can open the info panel to view this data.
« Last Edit: 4 Aug '23 - 01:28 by Damil »