23rd October 2016, 08:40
Join Date: Sep 2016
"DisplayInfo"-Function On Two Displays (How To)
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:
(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:
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.
Global Layout normal;
Function DisplayInfo (string note,string message);
DisplayInfo(string note,string message)
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.