Dynamic buttons
#1
hey guys, i'm still working on my photo gallery script, and am creating buttons on the fly for my images. i will have anywhere from 1 to 12 images on the screen, and i need to be able to select them to launch a child window with the same image full screen. well, i dont know how many images are going to show up, so i wanted to do something like this:
Quote: buttons[0] = xbmcgui.controlbutton(int((215*self.x) + (0*100)),int(105*self.y),int(95*self.x),int(95*self.y),"",root + "button_focus.png",root + "button_nofocus.png")
self.addcontrol(buttons[0]);

but the xbox is locking up, per usual. i was wondering if this is even possible. if there is a better way of doing this i'm open for ideas. i can't think of any other scripts doing anything like this. so i dont have much to reference.

thanks.

update: once again i answered my own question. yes this will work, the problem is that i was using an array when i shouldn't have. and the script is coming along nicely.
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic buttons0