• 1
  • 23
  • 24
  • 25(current)
  • 26
  • 27
Release PyXBMCt: a Python framework for simple creating UI for XBMC addons
Custom textures for individual list items are not possible.
Reply
(2021-04-07, 18:07)Roman_V_M Wrote: Custom textures for individual list items are not possible.
OK, Roman, thanks very much for your attention.
Reply
Hello Roman!
Thanks for the great add-on. UI-develoment seemed painfull without this!

I'm writing an add-on for the Matrix version of Kodi. The 1.3.1+matrix.1 tag seems to have very restructured code and does not match to the documentation any more. My problem is that the Group class seems to have gone away. What I'm trying to accomplish is a dialog where what's chosen on a list on the left side of a window produces a different set of controls to the right side of the window. Group control seemed to be a good fit for this, but it seems to be removed. Am I supposed to place a child window instead of group or how this will work in the future?
Reply
(2021-08-23, 21:00)Antibore Wrote: I'm writing an add-on for the Matrix version of Kodi. The 1.3.1+matrix.1 tag seems to have very restructured code and does not match to the documentation any more. My problem is that the Group class seems to have gone away.

Actually, it's the other way around. The version that is currently in the Kodi addon repo is the original one written by me. Later jcn509 completely reworked PyXBMCt internals and the current documentation is based on his changes. I just cannot bring myself to push in into the repo because I'm a bit afraid of such radical changes although everything seems to be working.
As for ControlGroup, it was never a part of the original PyXBMCt because I don't know how it works and if it works at all from Python API. jcn509 has added ControlGroup but, again, I don't know anything about it. And for advanced layouts you should use XML-based UI.
Reply
(2021-08-25, 20:15)Roman_V_M Wrote:
(2021-08-23, 21:00)Antibore Wrote: I'm writing an add-on for the Matrix version of Kodi. The 1.3.1+matrix.1 tag seems to have very restructured code and does not match to the documentation any more. My problem is that the Group class seems to have gone away.

Actually, it's the other way around. The version that is currently in the Kodi addon repo is the original one written by me. Later jcn509 completely reworked PyXBMCt internals and the current documentation is based on his changes. I just cannot bring myself to push in into the repo because I'm a bit afraid of such radical changes although everything seems to be working.
As for ControlGroup, it was never a part of the original PyXBMCt because I don't know how it works and if it works at all from Python API. jcn509 has added ControlGroup but, again, I don't know anything about it. And for advanced layouts you should use XML-based UI.
Ok, Thanks for the reply. This explains it: I was browsing the Github repo back and forth trying to figure out when the file containing ControlGroup had came and went. I went to sidetrack, because the latest tagged version is Matrix-compatible, but does not contain Groups and master on the other hand has Groups and afaik is not Matrix compatible :-D
Reply
Hi, I came across an issue with pyxbmct slider controls.  It looks like either setting "orientation" for the slider doesn't work or the orientation value for sliders is hard coded to horizontal.  

I've tried various versions of this code and they all end up horizontal
Quote:                self.scrollbar = pyxbmct.Slider(orientation=1)

also
Quote:   import xbmcgui
   self.scrollbar = pyxbmct.Slider(orientation=xbmcgui.VERTICAL)

What did get me a vertical slider was to go into pyxbmct's addonwindow.py and changing the slider class to 
Quote:  def __new__(cls, *args, **kwargs):
        textures = {'textureback': os.path.join(skin.images, 'Slider', 'osd_slider_bg.png'),
                    'texture': os.path.join(skin.images, 'Slider', 'osd_slider_nibNF.png'),
                    'texturefocus': os.path.join(skin.images, 'Slider', 'osd_slider_nib.png')}
        _set_textures(textures, kwargs)
        if xbmc.getInfoLabel('System.BuildVersion')[:2] >= '17':
            kwargs['orientation'] = xbmcgui.VERTICAL
        return super(Slider, cls).__new__(cls, -10, -10, 1, 1, *args, **kwargs)
Am I doing something wrong and, if not, is there a way to get proper orientation support in the plugin in the future?
Reply
I don't remember exact motivation for hardcoding Slider horisontal orientation and not sure if vertical orientation even works. If it does with the bundled textures then this needs to be fixed.
Reply
I didn’t test extensively but vertical seems to work to the extent it functions as well as horizontal and the graphics look ok to me with whatever the default pyxbmct graphics are in Matrix.

I think hardcoding to horizontal might also cause confusion since vertical is the default for slider in recent versions of Kodi.
Reply
Hi, I've been using pyxbmct to develop an add-on - it's a very useful tool! Currently in my add-on I have an edit box where the user needs to enter a number to represent a date. When selecting the edit box a full QWERTY keyboard is opened. Is it possible to change this so a numpad keyboard opens instead? Or even better, is there a date input dialog within Kodi that could be accessed?
Reply
@mike45637
https://romanvm.github.io/Kodistubs/_aut...it.setType
Reply
(2021-10-27, 22:02)Roman_V_M Wrote: @mike45637
https://romanvm.github.io/Kodistubs/_aut...it.setType

Thanks Roman, that's the link I was looking for!
Reply
Hey Roman, does Kodi have native support for "list shifting" EG:


Image
Reply
No idea. Dynamic changing of ControlList contents is possible, of course, and in theory you can try to connect some actions like 
python:
ACTION_VSHIFT_DOWN = 228
ACTION_VSHIFT_UP = 227
to a function that rearranges list contents. Then you need to map those actions to specific keys. IIRC, they are mapped to U and D by default.
Reply
Cheers Roman. Will check it out.
Reply
I'm trying to write something for Kodi 20.1.  I'm able to display a dialog, but when I try to launch a video from there, it plays behind the dialog.  If I close the dialog, it stops the video.  So then I checked and saw that I should use AddonFullWindow instead of AddonDialogWindow.  When I change the code to that, the Kodi error log shows:

Activate of window '13000' refused because there are active modal dialogs

Is there some trick to getting this to work on Kodi 20.1?
Reply
  • 1
  • 23
  • 24
  • 25(current)
  • 26
  • 27

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