Posts: 17,411
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,411
I'm actually using a grouplist for this now filled with the info from the buttons; I've also solved the alignment problem using the origin positions based on whether certain buttons are visible or not.
Having said that, a proper grouplist would be welcome.
Posts: 17,411
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,411
Actually you're both right, allowing us to set the item gap would remove the need for me to use a grouplist.
Thanks.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
From a code perspective utilizing a grouplist seems a much easier way to go - it already handles all the navigation between controls and spacing of buttons etc so most of the UI-specific stuff in the contextmenu dialog can be ripped out. All we need is the sizing of the backdrop as already occurs. That can also be done with a single image rather than 3 I believe, thus ripping out even more code (easier for you guys as well - no need for 3 controls and 3 textures).
As far as I can tell there's no disadvantage to using a grouplist and a single image for the background.
Cheers,
Jonathan
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
heh, I must say I was little lost here
Jezz_X: now I think I got what You meant - if we will have grouplist nothing will stop You from putting CloseDialog button somewhere there (as in any other .xml). Idea is that only 2 controls would be hard coded - grouplist for buttons and background that would stretch to cover grouplist area. You are free to add any other controls (just hope I won't see any flying pink rectangles there!)
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3
Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
If there would be a grouplist, it would be nice if we could set a fixed max height for the context menu so that the list will scroll if there are too many elements.
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
plan is to add <height min="xx" max="xx">auto</height> (and same with width) to grouplist - it will benefit more areas
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3
Posts: 3,956
Joined: Dec 2008
Reputation:
62
Not necessarily related to context menu - Could you use just "auto" in a grouplist, without defining MIN and MAX i.e. Will grouplist auto calculate height based on number of visible items and their height?
Posts: 2,441
Joined: Apr 2009
Reputation:
73
`Black
Team-Kodi Member
Posts: 2,441
If you have e.g. <height min="60" max="420">auto</height>, button height 60px and there are 4 buttons in the grouplist, the grouplist will have a height of 240px and will be centered within the dimensions of the background image.
Posts: 17,411
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,411
As reported in GitHub the default control seems to be hard-coded to button 1000 which means any added buttons that appear at the top of the grouplist are by-passed in favour of this button.
Either the default control should be changed to the actual grouplist or it should be left up to the skinner via 'default control'.
Thanks.