2011-10-05, 09:26
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
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
- 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