GUI, drawing, what is possible?
#1
Hello,

I am using xbmc on a Raspberry Pi (xbian) and I am planing to program an Add-On that displays car related data.
For example ignition timing data. I programmed a Python module to read out the data over RS232 from the motor control unit.

I have done some Python things so far but no GUI yet. Is it possible to display the values like a tachometer?
I did some tiny drawing things years ago in VB. Is it possible to draw something with python in xbmc?
Are these things very complex? Is it worth the effort?
Do you know some good ressources or a similar project I can take a look at?

Thanks for your Help
LandoR
Reply
#2
What do you mean by "drawing"?

If by "drawing" you mean creating arbitrary UI for your add-on, then yes, you can do this (within the limitations of XBMC Python API). There are 2 ways to do this: using Python-based or XML-based (skinned) GUI controls (widgets).
Python-based GUI is easier to program, but its facilities are somewhat limited compared to XML-based GUI.
For Python-based GUI you can check my PyXBMCt framework.

If by "drawing" you mean creating arbitrary images programmically, like on Tkinter.Canvas widget, then you're out of luck, because XBMC has no "canvas" control (widget), which would allow program drawing.
Reply
#3
Hi, thank you for the answer.
I was planing to draw something like that:
http://www.lexware.de/res/UN_Cockpit_01_...3b_27c.jpg
I guess this is not possible as you said. Isn't it possible to start a tkinter or pygame application from xbmc and when it exits go back to xbmc?

Another spossible solution:
Is it possible to control the position of your PyXBMCt slider widget and to set a background picture? I think that would maybe do the job.

Thanks
Landor
Reply
#4
you could use animations to move gfx for that. you could also use line gfx and stretch animations for graph type output. not ideal, but yes possible.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
I also though about a xbmcgui.Canvas these days. Would it be hard to implement? This idea to render pyGame Canvas sounds nice.

Doesn't XBMC include libsdl already? pygame renders to SDL but I dont know this stuff.

Can anybody confirm this?

cheers Nordish
Reply
#6
libsdl depends will vanish in the future, do not depend on it.
Reply

Logout Mark Read Team Forum Stats Members Help
GUI, drawing, what is possible?0