Added angle to Python's Control Label
#1
this update adds the capability to rotate the label
control in python "angle".

controllabel(x, y, width, height, label, font,
textcolor, disabledcolor, alignment, haspath, angle)

i'm not sure i did this correctly, but it works.

i had to add an extra argument to guicontrollabel and then just checked if it was non zero. which i guess should only be if called from python.

i downloaded the code this morning before editing it.

also for the pydoc i put "angle : angle of text +/- 360 (opt)"). is that worded right?

i'm not sure if this is one that can be chaged after the label is created, so i did not create a new method. i know setcolor doesn't work after.

patch 1496490
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#2
to be honest, i'd prefer to allow python to load in or pass in an xml description of the control.

unless python needs access to all the members of the control structures (imo it probably doesn't).

this'll have to wait for after 2.0 though.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
if you are talking about creating a whole window.xml and just let the script fill certain controls. that would be great.

i can do something similar with two <onclicks> and a custom*.xml right now as long as it's not a type <dialog>.

<onclick>xbmc.activatewindow(222)</onclick>
<onclick>xbmc.runscript(q:\scripts\script.py)</onclick>

or an activatewindow() at the beginning of the script.

i just need to get the timing down for animations and any controls that are script specific will have to be created with python, but it does work.

did you update xbmcmodule.cpp with the newest code for getinfolabel() and getinfoimage(). it really needs to be, otherwise you can't use 'skin.string(stringname)'. it's in the python5.zip or i can upload it as a new patch.

thanks



For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
yeah, i'll add the string versions when i get the chance.

as for the xml based loading of controls/windows it means that you have access to everything at creation time - it'll allow you to distribute skin files next to the .py files to load, and you'll still have the same ability to add new controls, or modify the ones that are loaded (assuming they are of the "usual" types)

obviously it'll take a while to do all this - so post 2.0.

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Added angle to Python's Control Label0