Kodi Community Forum

Full Version: KodiDevKit: SublimeText3 plugin to support kodi skinning / scripting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Thx, that´s because the testing part was completely reworked.
Some of the tests are now based on this XML: https://github.com/phil65/KodiDevKit/blo...ntrols.xml
I think that file should explain itself, I am quite confident that I missed lot of stuff, so feel free to PR improvements to that file.
What do you mean with "I also see onclicks showing as untranslated labels" ?
(2016-05-19, 15:58)phil65 Wrote: [ -> ]Thx, that´s because the testing part was completely reworked.
Some of the tests are now based on this XML: https://github.com/phil65/KodiDevKit/blo...ntrols.xml
I think that file should explain itself, I am quite confident that I missed lot of stuff, so feel free to PR improvements to that file.
What do you mean with "I also see onclicks showing as untranslated labels" ?

Yes, that file is very easy to follow. Will do PR as soon as I can Smile

When selecting Check labels, all builtins for onclicks show as untranslated labels:
Image
(2016-05-19, 22:34)mikesilvo164 Wrote: [ -> ]When selecting Check labels, all builtins for onclicks show as untranslated labels:

https://github.com/phil65/KodiDevKit/com...495cb3dbe1
The onclicks are fixed Smile I do have some other label check issues:
watch gallery

If there is a space or non alphabetical character perhaps exclude them especially if there is a translated string/$INFO label already there Huh

I have a question and request...

There is a lot of code added to my skin for Widgets that use the templates feature of the skin.shortcuts script. There are a lot of false unused includes/variables that appear cause of this and I was wondering if you could add support for that xml if it exists in the skins shortcuts folder?

My question is, if you had the time to take a look at the sanity check results for my skin, is there a best coding practices recommendation you can make so my errors can be zero?

I fear this is where it gets complicated... I have some variables that use PARAM ids generated by the template file since having dynamic ids seem to improve performance when dealing with multiple widgets and an example of an undefined VAR is:
Code:
$VAR[HomeWidget$PARAM[id]PosterVar]
An example of an unused VAR that is set as a property in the template file is:
Code:
<property name="artwork" tag="property" attribute="name|widgetArt" value="Poster">$VAR[HomeWidgetPosterVar]</property>
This is used when building a skin shortcuts include file after you add a widget that uses poster art so it will not be used until added:
Code:
<param name="Texture">$VAR[HomeWidgetPosterVar]</param>

The skin.shortcuts script builds empty includes when they are not used to help with log errors and such so not sure if this should be a possible request in that thread...
Code:
<include name="skinshortcuts-template-widget2">
    <description>This include was built automatically as the template didn't match any menu items</description>
</include>
The Widgets are, by far, the most complex I have seen (sadly they were not created by myself) so basically I was wondering if you could offer any best practice guidelines or, if possible, some additions to KodiDevKit to help me with my slight case of OCD Huh Cool

Thanks.
I can´t really give any good recommendations, it´s just damn hard to code reliable (and well-performing) checks considering the increasing complexity of our skinning engine, or, in this case, the use of add-ons which modifiy / create some of the XML files.
Esp. dealing with $PARAM[] make lot of stuff non-trivial sadly, and I am not sure if I will ever be able to check all these 100% somewhen in the future.
I will see what I can do in terms of improving them further, thx for feedback.
...label checks should work better now on latest GIT.
Thanks phil Smile
Labels are perfect now. I sent a PR with the only missing attributes I have noticed.

Very uninspired naming (I am referring to my commit message) so if you would like me to add or change anything just let me know Wink
I've made a color theme specific for KodiSkinXML which aims to keep a minimal set of colors for all different tags etc.
Was already a while back, but forgot to mention it here Smile

Image

You can get it here.

EDIT:
As its pretty much useless for anything else, its best to add it to the syntax specific preferences:
Code:
{
    "color_scheme": "Packages/XBML.tmTheme/XBML.tmTheme",
}
(2016-05-22, 22:23)BigNoid Wrote: [ -> ]I've made a color theme specific for KodiSkinXML which aims to keep a minimal set of colors for all different tags etc.
Was already a while back, but forgot to mention it here Smile

You can get it here.

EDIT:
As its pretty much useless for anything else, its best to add it to the syntax specific preferences:
Code:
{
    "color_scheme": "Packages/XBML.tmTheme/XBML.tmTheme",
}
Trying it out now, thanks!
I was looking over that controls.xml file and I had a question about a certain group control tag
Code:
<renderfocusedlast>bool</renderfocusedlast>
I have searched the forum and google and I cannot find any information about its use and function... Huh

Just curious what it does and if I should be using it... Smile

Thanks.
It seems I was limiting the search to be too specific... No mention of it on the Kodi forums but I did find this in an old post from 2008, on http://forums.xbox-scene.com/
Quote:2008-05-05 12896 added: <renderfocusedlast> to group controls - set to true to render the focused item last. Useful for lists of controls which overlap when they focus.

Just in case anyone was as curious as I was... Smile
Hey Phil-

Something I found is that the check doesn't seem to recognize the attribute "name" for includes, but this is the syntax for includes that contain parameters, for instance-
PHP Code:
                <include name="HomeMenu_Tiles">
                     <
param name="homemenu" value="HomeMenu1"/>
                </include> 
(2016-07-04, 19:26)ZexisStryfe Wrote: [ -> ]Hey Phil-

Something I found is that the check doesn't seem to recognize the attribute "name" for includes, but this is the syntax for includes that contain parameters, for instance-

<include name="HomeMenu_Tiles">
<param name="homemenu" value="HomeMenu1"/>
</include>

This was changed to "<include content="HomeMenu_Tiles"> in Krypton, because with the old calling attribute it wasn't able to recognize it correctly.
Update to Krypton and problem is solved Wink
(2016-07-04, 19:27)sualfred Wrote: [ -> ]
(2016-07-04, 19:26)ZexisStryfe Wrote: [ -> ]Hey Phil-

Something I found is that the check doesn't seem to recognize the attribute "name" for includes, but this is the syntax for includes that contain parameters, for instance-

<include name="HomeMenu_Tiles">
<param name="homemenu" value="HomeMenu1"/>
</include>

This was changed to "<include content="HomeMenu_Tiles"> in Krypton, because with the old calling attribute it wasn't able to recognize it correctly.
Update to Krypton and problem is solved Wink

Good to know! Thanks, sualfred.
Hey Phil,

I've noticed a little bug with the recognization of $EXP and $VAR.
It seems that if a $EXP and $VAR have the same name, it will always displays the $EXP in the popup.

Example screens:
Image
Image
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22