I'll trade some python xml advice for a nice smile
#1
My python script draws letters to a window in a grid-like fashion. The window size, grid dimensions and grid elements (letters) are variable, so I just destroy and recreate the window to change layouts. As far as building the initial window, I need some advice on what general strategy I should use to dynamically generate this window. Here's my hail-marry ideas, most of these don't work
  • 2) In python, store everything in an intelligent data structure that mirrors the window layout. Then, serialize this structure as an xml file to the disk with a derived filename and create a new window from this xml
  • 2) Exclusively use python: make X-dimension * Y-dimension # of labels via xbmcgui.ControlLabel(x, y, w, h, label, etc.). Add these to a control panel layout via xbmcgui.ControlPanel.add(xbmcgui.ControlLabel) and in turn add this to the window. Caveat: ControlPanel and ControlPanel.add() don't exist.
  • 2a) Is there another control that can have these letters in a variable size grid?
  • 2b) I can add xbmcgui.ControlPanel to the python interface in C++ if this makes sense.
  • 3) Some contrived combination of the above.

If you have heard of any projects that accomplish something similar (even somewhat static), then I'd appreciate hearing about them so that I could study them. If you have any advice regarding what I said above, or you want to call me a dumbass for it not being possible, I'd love to hear it.

(i'll edit with an emoticon later. for now, imagine a nice smile!) Regards,
Garrett
Reply
#2
2b) it is. (and thanks for the pm, rocker)

I'm following in the footsteps of pieh's PR to add ControlEdit (184 (PR)). Apparently, of the 34 controls XBMC understands, only 13 are exposed to python's xbmcgui module. Panel container is the control I want, and I'll probably need to add others in the future. Time to get coding...
Reply

Logout Mark Read Team Forum Stats Members Help
I'll trade some python xml advice for a nice smile0