Addon Menus
#1
Hello guys,

it is so frustrating...
I have written an addon, which can take all Movie informations out of a file to display it on the screen. But i can't find any method to display a menu, where i can add buttons, textareas and so on.

I have seen some things in the docs like:
https://codedocs.xyz/xbmc/xbmc/group__py...ialog.html
https://codedocs.xyz/xbmc/xbmc/group__py...utton.html

So i can get a window and a button on it. But how can i get to the window, from listitem()? And how i can get the button push event?
Is there a wiki page i've overseen?
Reply
#2
If you are using infolabels and want to use the default video Info window, this should provide what you need.

http://forum.kodi.tv/showthread.php?tid=305537

If you want to build your own custom window then that is a lot different.
Reply
#3
That is my own thread Big Grin
You have solved this problem already. My new Problem is now: I need a custom window in which i can set folderpaths. And want at button press add the path to a file.
Reply
#4
(2017-02-06, 17:41)Mytril Wrote: That is my own thread Big Grin
You have solved this problem already. My new Problem is now: I need a custom window in which i can set folderpaths. And want at button press add the path to a file.

Sorry Smile it you could show an image of what you want the end result to look like it would be easier to help. A window with a button is not very descriptive. But as far as getting it from a list item you would need to send some attribute to your addon and capture it that way or in the function of your context menu launch it.
Reply
#5
https://www.dropbox.com/s/z6bsx8sgmz0j0y...s.png?dl=0

So here you can see, what i mean. I need a menu, where i can write a folderpath into a textarea, which i can write into a xml file.

I know already:
- How to add Files and Folders to the Addon View
- How to write xml files

I don't know:
- How to call a menu
- How to add Buttons to the menu
- How to call another funktion, if the Button was pressed
- How to add textareas/fields and Labels to the menu

Could you please make an Example for me? Thank you
Reply
#6
@Mytril

What you need is to create a custom UI. There are 2 ways to do that: a) using xbmcgui.Window/WindowDialog classes and xbmcgui Conngrols or b) using xbmcgui.WindowXML/WindowXMLDialog and an XML-based UI layout which is basically an addon mini-skin. The situation loosely reminds .NET GUI frameworks for Windows: WinForms and WPF. The option a has limited features but it can be coded in pure Python and the option b has more features but you need to know Kodi skinning as well.

If you prefer option a you can check my PyXBMCt mini-framework that wraps several xbmcgui classes and provides a convenient API for creating custom UIs for Kodi addons. It's not as fancy ans XML-based UIs but it does the job for relatively simple needs.
Reply
#7
(2017-02-07, 12:49)Roman_V_M Wrote: @Mytril

What you need is to create a custom UI. There are 2 ways to do that: a) using xbmcgui.Window/WindowDialog classes and xbmcgui Conngrols or b) using xbmcgui.WindowXML/WindowXMLDialog and an XML-based UI layout which is basically an addon mini-skin. The situation loosely reminds .NET GUI frameworks for Windows: WinForms and WPF. The option a has limited features but it can be coded in pure Python and the option b has more features but you need to know Kodi skinning as well.

If you prefer option a you can check my PyXBMCt mini-framework that wraps several xbmcgui classes and provides a convenient API for creating custom UIs for Kodi addons. It's not as fancy ans XML-based UIs but it does the job for relatively simple needs.

Hello Roman_V_M

Your Addon looks nice and intuitive. Thank you. I think, that could help me to solve this problem.
Reply
#8
(2017-02-07, 12:49)Roman_V_M Wrote: @Mytril

What you need is to create a custom UI. There are 2 ways to do that: a) using xbmcgui.Window/WindowDialog classes and xbmcgui Conngrols or b) using xbmcgui.WindowXML/WindowXMLDialog and an XML-based UI layout which is basically an addon mini-skin. The situation loosely reminds .NET GUI frameworks for Windows: WinForms and WPF. The option a has limited features but it can be coded in pure Python and the option b has more features but you need to know Kodi skinning as well.

If you prefer option a you can check my PyXBMCt mini-framework that wraps several xbmcgui classes and provides a convenient API for creating custom UIs for Kodi addons. It's not as fancy ans XML-based UIs but it does the job for relatively simple needs.

Thanks for chiming in Roman, I couldn't remember the name of the library you wrote to find the link.
Reply

Logout Mark Read Team Forum Stats Members Help
Addon Menus0