Old 23rd October 2016, 09:40   #1
Quinto Black CT Developer
Join Date: Sep 2016
Posts: 580
"DisplayInfo"-Function On Two Displays (How To)

Hello everybody,

upon Aminifu's request I am going to show you how the notification function works in Quinto Black CT.

The basis of that function is a part of both Modern Skin and Bento, although the formula within Modern Skin is far more easier to understand.

Let us open the drawer_album.m file for the sake of this demonstration. As you probably know, clicking on the ART button on the MainPlayer will open the AlbumArt drawer. Additional to that option a short note is shown on MainPlayer's and MediaLibrary's display: OPEN ALBUMART DRAWER.

Within the .onToggle section you will find the function call:

DisplayInfo("showinfo","OPEN ALBUMART DRAWER");

(In other files the parameters are changed to DisplayInfo("cancelinfo","") which will "clean" the info on both displays.)

The parameters within this call are "showinfo" and some text, which (obviously) is shown while the function is called.

At this point I would like to mention that it is highly recommended to use Latin characters only! The plausible reason for that limitation is the fact that the bitmapfile font_songticker.png contains Latin letters only! In case you insist on having also Non-Latin letters you will end up with "regular" Verdana text on the display, since I set it as an alternative fonts option in the player.xml file.

Within EVERY m-file, which contains the function call DisplayInfo, you will also find the line:

#include incl/display_incl.m

(Since a lot of lines within the m-files were exactly the same, I created functions and swapped them into the <incl> folder, which makes coding a lot easier.)

This tiny script looks like this:

PHP Code:
Global Layout normal;
DisplayInfo (string note,string message);

DisplayInfo(string note,string message)
    if (
Layout normal_ML=getContainer("medialibrary").getLayout("normal");

As we see, the DisplayInfo function has two parameters: string note and string message. String note can be either "showinfo" or "cancelinfo". And string message is just a random text line.

Within this function we "send" the parameters to normal (MainPlayer's Layout) and normal_ML (MediaLibrary's Layout).

And if you open the display.m file you will find the line:


which determines the duration and 2000 means 2 seconds. You might want to change it to your liking.
PeterK. is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump