• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 27
Release PyXBMCt: a Python framework for simple creating UI for XBMC addons
#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?
Reply
#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.
Reply
#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?
Reply
#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.
Reply
#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.
Reply
#66
Hello,

I have just discovered PyXBMCt and I love it !

Does it possible to navigate through different AddonXXXWindow ?
The goal is to have 2 buttons (next/prev) on each pages.
Do you have an exemple somewhere ?

Thank you in advance for your help
Reply
#67
(2014-04-22, 17:31)DomoJimbo Wrote: Hello,

I have just discovered PyXBMCt and I love it !

Does it possible to navigate through different AddonXXXWindow ?
The goal is to have 2 buttons (next/prev) on each pages.
Do you have an exemple somewhere ?

Thank you in advance for your help

I don't know what exactly you are trying to accomplish, but I see 3 possible scenarios:

1) Create all necessary Controls and then change their contents, using their respective methods for changing contents, when navigating between "pages".

2) Create several sets of controls to be displayed when navigating between "pages". You can show and hide individual controls using setVisible() method.

3) Create several addonwindow instances to be displayed when navigating between "pages". Then you can use doModal() and close() methods to show and hide your windows. Just to be clear: close() method does not destroy your window instance, but only hides it from sight.
Reply
#68
Thanks for PyXBMCt Roman, I'm finding it useful.

A small problem:
I'm activating my add-on (AddonDialogWindow) by means of a 'RunScript' in keyboard.xml which is fine except that it is not modal - ie if I press the key several times then I get several dialog windows stacked up. Is there a fix or work-around for this?
Reply
#69
Hello Roman_V_M,

I am using Edit () control for password, but when I am going to set last parameter's (isPassword) value = 1
It is giving error.

I want to set first 3 parameter's values Label,font,color and lastone isPassword as follows but it is giving problem.
self.passwordText = Edit('Password','font10','0xFFFFFFFF',"0xFFFF3300",1,"s","g",int(1))
Please, tell me how to use this edit function in case of password.
Reply
#70
(2014-05-08, 14:18)DuncanG Wrote: Thanks for PyXBMCt Roman, I'm finding it useful.

A small problem:
I'm activating my add-on (AddonDialogWindow) by means of a 'RunScript' in keyboard.xml which is fine except that it is not modal - ie if I press the key several times then I get several dialog windows stacked up. Is there a fix or work-around for this?


I'm not sure. The window is modal per se, but all key events are propagated to core XBMC. I'm afraid, such behavior cannot be changed at addon level.

(2014-05-08, 16:12)Dipti Wrote: Hello Roman_V_M,

I am using Edit () control for password, but when I am going to set last parameter's (isPassword) value = 1
It is giving error.

I want to set first 3 parameter's values Label,font,color and lastone isPassword as follows but it is giving problem.
self.passwordText = Edit('Password','font10','0xFFFFFFFF',"0xFFFF3300",1,"s","g",int(1))
Please, tell me how to use this edit function in case of password.

Honestly, I don't understand your example: what is what. Please observe the class constructor call signature, as described here: http://romanvm.github.io/PyXBMCt/docs/cl..._edit.html. Of course, you don't need to provide textures - PyXBMCt comes with its own texture files.
Also I'd recommend to use keyword arguments for additional parameters - it will be more clear both for you and others, who may want to see your code.
Reply
#71
I need help. I have Issue creating list of title with image description .
I want to list Title with respective image and description.
Can anyone suggest me how to implemented same feature ?
I am trying for this but problem is getting.

I want to create list as following image (Left side listing)

Image
Reply
#72
(2014-05-09, 14:27)Dipti Wrote: I need help. I have Issue creating list of title with image description .
I want to list Title with respective image and description.
Can anyone suggest me how to implemented same feature ?
I am trying for this but problem is getting.


Yes, PyXBMCt can provide such functionality, though media content addons are better implemented as plugins - natively or via xbmcswift framework.
But, sorry, but I don't see any of your "trying" and "issues". Please provide your code snippets, and the description of your expected results and actual results. Then I'll be able to give some recommendations.
Reply
#73
Thanks for your reply.

I want to list out videos Title, Desc, and icon of that video same to same above image.
Using pyxbmct I can create list of that videos but I want to display icon with that element.
I want to display image icon with that item1,item2,item3 elements as per above element.


I am using Pyxbmct's list class to generate list of channels or movies is it correct or am I going to use it at wrong place ?
My target is I want to create addon's design as per above image. But not understand how to implement functionality.
Because, I cant add image in list with channel name or movies poster with movie name.
In short how to set icon to this list element ?

Image
Reply
#74
(2014-05-12, 15:03)Dipti Wrote: In short how to set icon to this list element ?

You need to create xbmcgui.ListItem instances with labels and icons and then add those ListItems to your List control.
More info: http://romanvm.github.io/PyXBMCt/docs/cl..._item.html
To be clear: each element in a List control is actually a ListItem instance.

Code:
list = List(_imageHeight=XX)
...
item = xbmcgui.ListItem(label="item1", iconImage="<path_to_image_file>")
list.addItem(item).

Also I need to warn you that with PyXBMCt you can mimic the design above, but the resemblance won't be 100%.
Reply
#75
Thank you very much.

I used ListItems and prepared list of icon and title.
But I want to know how to display description which is printed on second line like Os Simposons, criminal mind,TVZ etc .
And how to display separation line as following image :

I tried to set label2 on new line but it did not worked for me.

Image

Thanks.
Thanks
Reply
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 27

Logout Mark Read Team Forum Stats Members Help
PyXBMCt: a Python framework for simple creating UI for XBMC addons4