Release script.toolbox
#2
Nice idea, but can I suggest an alternative implementation - something along the lines of:

Code:
<onclick python="xbmcgui.Dialog().select">
    <heading>This is a custom dialog</heading>
    <item value="some_value">Label</item>
    <item value="some_value_2">Labe_2</item>
    ...
</onclick>

Which would match more directly to the actual python methods, and - for me - is more readable Smile (though the Python interface doesn't directly provide a multiselect dialog, does it?)

(2014-10-30, 00:27)phil65 Wrote: Some idea to simplify skinning a bit:
Since Python is more powerful than the skinning xml engine in most aspects I think it would be useful to expose some Python functions to skinners.
I coded a small example into script.extendedinfo (commit link):

This code:

PHP Code:
<onclick>SetProperty(Dialog.Header,This is a custom dialog)</onclick>
<
onclick>SetProperty(Dialog.NumItems,4)</onclick>
<
onclick>SetProperty(Dialog.Target,Name_of_Skin_String)</onclick>
<
onclick>SetProperty(Dialog.1.Label,Test)</onclick>
<
onclick>SetProperty(Dialog.1.Value,some_value)</onclick>
<
onclick>SetProperty(Dialog.2.Label,Test 2)</onclick>
<
onclick>SetProperty(Dialog.2.Value,some_value2)</onclick>
<
onclick>SetProperty(Dialog.3.Label,Test 3)</onclick>
<
onclick>SetProperty(Dialog.3.Value,some_value3)</onclick>
<
onclick>SetProperty(Dialog.4.Label,Test 4)</onclick>
<
onclick>SetProperty(Dialog.4.Value,some_value4)</onclick>
<
onclick>RunScript(script.extendedinfo,info=dialog)</onclick

would create a dialog like this:

Image

When the user clicks on a listitem then the string with name "Name_of_Skin_String" will be set to the value of the selected listitem.
This could also be extended to make use of thumbs, multiselect etc if needed.
This way skinners can make use of DialogSelect which can be very useful on some occasions for settings with more than 2 states. At the moment there is no good way for skinners to implement those type of buttons since also spincontrol cannot be used.
The same could be done for DialogOK and DialogYesNo for example.
I could also change it to a way that it uses script parameters instead of setting window properties, but that would get a bit messy probably when there are lot of options.
I don´t really need this myself since the skin I am workin on atm already has deep python integration so I don´t need a separate script for that, if it helps you guys to create more nice skins I´d still put some minutes in to get that stuff workin.
Opinions?
Reply


Messages In This Thread
script.toolbox - by phil65 - 2014-10-30, 00:27
RE: Suggestion: Script to expose python functions to skinners - by removed151214 - 2014-10-30, 00:38
RE: [RLEASE] script.toolbox - by Bumpaneer - 2015-03-06, 00:27
RE: [RLEASE] script.toolbox - by phil65 - 2015-03-06, 01:26
RE: [RLEASE] script.toolbox - by jurialmunkey - 2015-03-06, 02:11
RE: [RLEASE] script.toolbox - by senna99 - 2015-03-11, 13:25
RE: script.toolbox - by phil65 - 2015-03-11, 19:24
RE: script.toolbox - by senna99 - 2015-03-11, 21:01
RE: script.toolbox - by sualfred - 2015-03-16, 11:50
RE: script.toolbox - by phil65 - 2015-03-16, 12:03
RE: script.toolbox - by sualfred - 2015-03-16, 12:29
RE: script.toolbox - by Jayz2K - 2015-05-19, 09:31
RE: script.toolbox - by phil65 - 2015-05-19, 15:35
RE: script.toolbox - by Jayz2K - 2015-05-19, 16:10
RE: script.toolbox - by phil65 - 2015-05-19, 16:22
RE: script.toolbox - by Jayz2K - 2015-05-19, 16:59
RE: script.toolbox - by Hitcher - 2015-05-20, 17:22
RE: script.toolbox - by phil65 - 2015-05-20, 17:38
RE: script.toolbox - by phil65 - 2015-05-20, 17:42
RE: script.toolbox - by Hitcher - 2015-05-20, 17:47
RE: script.toolbox - by Hitcher - 2015-05-20, 20:31
RE: script.toolbox - by phil65 - 2015-05-20, 20:40
RE: script.toolbox - by Hitcher - 2015-05-20, 20:41
RE: script.toolbox - by phil65 - 2015-05-20, 21:17
RE: script.toolbox - by Jayz2K - 2015-05-20, 22:02
RE: script.toolbox - by phil65 - 2015-05-20, 22:17
RE: script.toolbox - by Hitcher - 2015-05-21, 19:01
RE: script.toolbox - by phil65 - 2015-05-21, 19:30
RE: script.toolbox - by Hitcher - 2015-05-21, 19:33
RE: script.toolbox - by phil65 - 2015-05-21, 19:34
RE: script.toolbox - by Hitcher - 2015-05-21, 19:42
RE: script.toolbox - by phil65 - 2015-05-21, 19:46
RE: script.toolbox - by Hitcher - 2015-05-21, 19:50
RE: script.toolbox - by phil65 - 2015-05-21, 19:53
RE: script.toolbox - by Hitcher - 2015-05-21, 20:01
RE: script.toolbox - by sualfred - 2015-05-21, 20:22
RE: script.toolbox - by Hitcher - 2015-05-21, 21:14
RE: script.toolbox - by phil65 - 2015-05-22, 00:17
RE: script.toolbox - by marcelveldt - 2015-05-22, 00:39
RE: script.toolbox - by Hitcher - 2015-05-26, 09:17
RE: script.toolbox - by phil65 - 2015-05-22, 02:32
RE: script.toolbox - by wyrm - 2015-05-22, 06:18
RE: script.toolbox - by phil65 - 2015-05-22, 06:58
RE: script.toolbox - by wyrm - 2015-05-22, 08:55
RE: script.toolbox - by Hitcher - 2015-05-22, 08:06
RE: script.toolbox - by Hitcher - 2015-05-22, 19:17
RE: script.toolbox - by phil65 - 2015-05-22, 20:44
RE: script.toolbox - by sualfred - 2015-05-22, 19:30
RE: script.toolbox - by braz - 2015-05-26, 13:18
RE: script.toolbox - by phil65 - 2015-05-26, 13:52
RE: script.toolbox - by braz - 2015-05-26, 13:55
RE: script.toolbox - by Wanilton - 2015-05-26, 14:14
RE: script.toolbox - by mikeSiLVO - 2015-06-27, 19:29
RE: script.toolbox - by phil65 - 2015-06-27, 19:56
RE: script.toolbox - by mikeSiLVO - 2015-06-27, 20:09
RE: script.toolbox - by phil65 - 2015-06-27, 20:12
RE: script.toolbox - by janeczku - 2015-07-01, 08:20
RE: script.toolbox - by Fist - 2015-07-15, 10:52
RE: script.toolbox - by sualfred - 2015-07-05, 08:56
RE: script.toolbox - by Hitcher - 2015-07-05, 10:55
RE: script.toolbox - by sualfred - 2015-07-05, 11:00
RE: script.toolbox - by Hitcher - 2015-07-05, 11:15
RE: script.toolbox - by sualfred - 2015-07-05, 11:19
RE: script.toolbox - by mikeSiLVO - 2015-07-20, 10:07
RE: script.toolbox - by phil65 - 2015-07-20, 14:30
RE: script.toolbox - by mikeSiLVO - 2015-07-20, 17:48
RE: script.toolbox - by phil65 - 2015-07-20, 17:52
RE: script.toolbox - by mikeSiLVO - 2015-07-27, 10:53
RE: script.toolbox - by im85288 - 2015-07-20, 19:50
RE: script.toolbox - by Hitcher - 2015-07-20, 21:29
RE: script.toolbox - by Jayz2K - 2015-07-23, 18:54
RE: script.toolbox - by mbuzina - 2015-07-28, 18:00
RE: script.toolbox - by phil65 - 2015-07-28, 18:11
RE: script.toolbox - by Fist - 2015-07-29, 08:23
RE: script.toolbox - by Fist - 2015-08-20, 09:57
RE: script.toolbox - by janeczku - 2015-07-29, 15:45
RE: script.toolbox - by JDizzy - 2015-07-30, 18:56
RE: script.toolbox - by Fist - 2015-07-30, 20:35
script.toolbox - by mbuzina - 2015-07-30, 15:28
RE: script.toolbox - by Fist - 2015-07-31, 12:04
RE: script.toolbox - by Fist - 2015-08-03, 08:30
RE: script.toolbox - by Mike_Doc - 2015-08-23, 20:12
RE: script.toolbox - by Stildawn - 2015-09-02, 09:35
RE: script.toolbox - by scott967 - 2015-09-08, 22:37
RE: script.toolbox - by Jayz2K - 2015-09-08, 23:53
RE: script.toolbox - by phil65 - 2015-09-09, 01:44
RE: script.toolbox - by scott967 - 2015-09-09, 02:31
RE: script.toolbox - by phil65 - 2015-09-09, 03:29
RE: script.toolbox - by Pienoet - 2015-11-01, 20:36
RE: script.toolbox - by noxx2 - 2015-11-06, 09:16
RE: script.toolbox - by thy1225 - 2015-12-30, 12:26
RE: script.toolbox - by eshep - 2016-07-01, 03:44
RE: script.toolbox - by braz - 2016-05-27, 22:40
RE: script.toolbox - by emre.ay - 2016-07-03, 12:33
RE: script.toolbox - by badaas - 2016-07-17, 10:11
RE: script.toolbox - by tommymsw - 2016-07-16, 02:43
RE: script.toolbox - by TaceN - 2017-05-13, 23:29
RE: script.toolbox - by badaas - 2017-07-17, 00:26
RE: script.toolbox - by Greatnloopy - 2017-07-17, 08:22
RE: script.toolbox - by heula - 2018-08-16, 12:27


Logout Mark Read Team Forum Stats Members Help
script.toolbox2
This forum uses Lukasz Tkacz MyBB addons.