Release - PyXBMCt: a Python framework for simple creating UI for XBMC addons

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ral6639 Offline
Junior Member
Posts: 4
Joined: Mar 2014
Reputation: 0
Post: #61
I am fairly new to XBMC script writing so I apologize if this is a ridiculous question. I am having trouble adding a picture or image to my xbmc python script. When I place a .png or .jpg into the root folder my script will not load the image when I run the script. The stock pictures that cam with the pyxbmct demo work fine. I want to load a picture when I click on a button. Is this possible?
find quote
Roman_V_M Offline
Fan
Posts: 510
Joined: Jun 2011
Reputation: 13
Location: Kyiv, Ukraine
Post: #62
(2014-03-19 16:16)Aweponken Wrote:  So I took your advice and I recreated the whole design with OOP(it turned out using a proper python editor made a HUGE difference). I will try implementing the functions of pilight after the weekend, if I manage to get the beta update on Xbian working.
Is there a way to save the state of the radiobuttons? If I turn on a button, close the addon and then relaunch it, the state of the button will be set to Off again.

You can store their state in your addon setting and then restore them on addon start using getSetting and setSetting methods of xbmcaddon.Addon() class. Just to be clear: you can store arbitrary settings in addon settings, not only those that have visual controls in \resources\settings.xml.
E.g:
PHP Code:
__addon__.setSetting('button1''on'

(2014-03-20 16:18)ral6639 Wrote:  I am fairly new to XBMC script writing so I apologize if this is a ridiculous question. I am having trouble adding a picture or image to my xbmc python script. When I place a .png or .jpg into the root folder my script will not load the image when I run the script. The stock pictures that cam with the pyxbmct demo work fine. I want to load a picture when I click on a button. Is this possible?

Short answer: yes. You need to provide a full path to your image file.

AMD A4-3300 + AsRock A75M-ITX
XBMC-DSplayer 12.3 (custom build) on Windows 7
find quote
Karnagious Offline
Fan
Posts: 344
Joined: Nov 2012
Reputation: 14
Post: #63
Halp!

I want to add a Context Menu to my addon which currently displays a list using DialogSelect.xml. All good on Amber skin, the context window opens above the Dialog, but for others (like Aeon Nox or even Confluence) it opens behind the Dialog.

The Aeon Nox xml has a z-order of 4 while the Amber xml has a z-order of 3. But then the xml in Confluence has a z-order of 1. So that cant be the issue.

Is it a setFocus I am omitting?
find quote
Roman_V_M Offline
Fan
Posts: 510
Joined: Jun 2011
Reputation: 13
Location: Kyiv, Ukraine
Post: #64
(2014-04-01 14:16)Karnagious Wrote:  Halp!

I want to add a Context Menu to my addon which currently displays a list using DialogSelect.xml. All good on Amber skin, the context window opens above the Dialog, but for others (like Aeon Nox or even Confluence) it opens behind the Dialog.

The Aeon Nox xml has a z-order of 4 while the Amber xml has a z-order of 3. But then the xml in Confluence has a z-order of 1. So that cant be the issue.

Is it a setFocus I am omitting?

Maybe I'm missing something, but I don't understand what all this has to do with PyXBMCt.

AMD A4-3300 + AsRock A75M-ITX
XBMC-DSplayer 12.3 (custom build) on Windows 7
find quote
Karnagious Offline
Fan
Posts: 344
Joined: Nov 2012
Reputation: 14
Post: #65
I was using PyXBMCt to create the window so thought it was a setting in that.

But I have since tried creating my own window and xml, and the same thing happens, so it must be something else.

I will put up a separate post in the python forum.
find quote
Post Reply