Kodi Community Forum

Full Version: Dialog OK
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just a quick question, but what's the easiest way to make the ok dialog window appear, been trying to figure it out but can't remember :p
pressing "del" when focussing a movie for example. (not sure if it uses all built-in label controls then though)
That brings up the yes no dialog, which incidentely was what I thought I was trying to code - couldn't for the life of me figure out why the changes weren't making a difference :p
(2012-07-31, 14:41)Eddage Wrote: [ -> ]That brings up the yes no dialog, which incidentely was what I thought I was trying to code - couldn't for the life of me figure out why the changes weren't making a difference :p

oh, sorry. perhaps i´ll make the effort to write a small python script which makes use of all infolabels in okdialog.
should be a 3-liner.
add source and manually enter path "smb://defenitely_not_working_path", confirm that you want to add even if it doesn't work - now try to access is, DialogOK will show and say it can't connect (tho 1 of 3 lines will only be used)
here it is:

Code:
import xbmcgui

ok = xbmcgui.Dialog().ok("String1","String2","String3")
save that to okdialog.py and call it from inside the skin.

or add this to your keymap:

Code:
<F8>RunScript(special://skin/scripts/okdialog.py)</F8>

same is possible for yesno dialog
Code:
import xbmcgui

ok = xbmcgui.Dialog().yesno("String1","String2","String3")
Cheers Phil, works great. Although i had to add "String4" in as well :p
Newbie here... fumbling my way through my first kodi addon.

I have successfully implemented xbmcgui.Dialog().ok(addonname, line1, line2) in my code and works as intended but the message font is too small. The heading is fine and the 'OK' button is too but I want a much larger message font. How can I change this?

Thanks!
well...you can't. it's the skin that determines what font sizes to use.
ronie, thank you for the quick reply to my post.

I am using a raspberry pi 2 as a carputer. I am working on a service addon that monitors the information bus in my car and would like to flash up messages such as 'coolant low' when they appear. xbmcgui.Dialog does exactly what I want except it is too small to read when driving my car, I need a much larger font. Pressing the 'OK' acknowledges the message and clears the screen - just what I want.

My question is if I cannot easily change the font is there another way to accomplish this and if so (I'm sure there is) can you point me in the right direction? Basically I want to flash up a text box that is visible above everything else and be able to acknowledge/clear it.

Thank you!
you can change the fontsize in the skin you're using.
you'd need to edit the DialogNotification.xml file and change the fontsize of the textbox control.
Thanks!

This got me on the right path.... No DialogNotification.xml but there is DialogOK.xml and editing this did the trick!

Thanks again!