at long last, I can share the changes we made to the Manialink language !
First of all, Manialinks beginning with the version="1" attribute aren't changed at all. If they are, you found a bug and are welcome to report it. The following information apply to version="2" Manialinks.
- You can now use stylesheets : you just have to add the <stylesheet> </stylesheet> tags to your manialink. Within those tags, you can add styles like
And every manialink control having the id myid1, myid2 or the class myclass1 or myclass2 will receive the style, posn and sizen attributes you set in the style if they have not already those attributesCode: Select all
<style id="myid1 myid2" class="myclass1 myclass2" style="mystyle" posn="20 20" sizen="30 30" />
Good to know :
- if different styles apply to the same id / to the same class, only the last declared one will be applied
- if a control can receive attributes from both and id-linked style and a class-linked style, only the id-linked style ones will be applied
A sample manialink using stylesheet has been added (as well as a sample titlepack menu). You can load them using the Interface Designer. They're placed in file://Media/Manialinks/Common/Samples/ - The format tag has been removed from the language, since it's no longer useful with stylesheets.
- New "textedit" tag, in order to replace multiple lines entries. This control looks like the script editor. For more information about it's attributes, you can add one in the Interface Designer and see what happens.
- Entries can now use only one line : autonewline and maxline attributes have been removed. A "selecttext" attribute has been added : if you set it to "1", the text of the entry will be automatically selected when it's focused. A "textformat" attribute has been added as well, allowing you to set the text as a password for instance.
- Data attributes have been added. In any tag, you can add attributes beginning with "data-".
They will be available in the script by using the "DataAttributeExists", "DataAttributeGet" and "DataAttributeSet" functions.Code: Select all
<quad id="myquad" data-foo="bar" data-link="url" />
Code: Select all
Quad.DataAttributeExists("foo"); //returns True Quad.DataAttributeGet("foo"); //returns "bar" Quad.DataAttributeSet("foo", "bob"); Quad.DataAttributeGet("foo"); //returns "bob"
Have a nice evening,
-- noyranea