WindowXML - PIL Image
#16
That is about what i am doing.

I have a util that checks and make the directories and then in my init i call self.runDirectoryChecks();

Main Code:
PHP Code:
def runDirectoryChecks(self):

        
dsPath xbmc.translatePath(os.path.join('special://userdata/addon_data'utils.getAddonInfo('id')));

        
self.shows_stats os.path.join(dsPath'media/shows/stats');
        
self.shows_similar os.path.join(dsPath'media/shows/similar');
        
self.episodes_languages os.path.join(dsPath'media/episodes/language');
        
self.select_main os.path.join(dsPath'media/select/main');
        
self.select_list os.path.join(dsPath'media/select/list');

        
utils.checkDirectory(self.shows_stats);
        
utils.checkDirectory(self.shows_similar);
        
utils.checkDirectory(self.episodes_languages);
        
utils.checkDirectory(self.select_main);
        
utils.checkDirectory(self.select_list); 

Utils Code:

PHP Code:
def checkDirectory(savepath):

    if 
not os.path.exists(savepath):
        
os.makedirs(savepath

And then in the code where i dont always want to create the image.
PHP Code:
tempImg os.path.join(self.select_main, ('evl_%s.png' main.get('id'''))); #main is a map create from the url attributes

if not os.path.isfile(tempImg):
     
utils.text2Display(main.get('id'''), 'RGB', (255255255), (000), 26'Regular'tempImgmultiplier=1sharpen=Falsebgimage=None); 
Reply
#17
Wink 
(2017-01-13, 16:39)ronie Wrote:
(2017-01-13, 16:03)Protocol-X Wrote: That being said I am no expert. Ronie is the guru Smile

pff... the only guru in this thread is ironic_monkey ;-)

Ok Iron is King Guru, you are Prince Guru lol
Reply
#18
Also if I may suggest, for your list, if you do not have one already, as it is hard to see in the picture. Maybe add a light gray colored 1-2px border around the selected/focused item. This way if you get a background that is all white, the user can still see the currently selected item easier than just seeing a text color change.
Reply
#19
(2017-01-13, 16:45)Protocol-X Wrote: That is about what i am doing.

I have a util that checks and make the directories and then in my init i call self.runDirectoryChecks();

Ah that's clever, I think I will borrow that from you ;-)

(2017-01-13, 16:51)Protocol-X Wrote: Also if I may suggest, for your list, if you do not have one already, as it is hard to see in the picture. Maybe add a light gray colored 1-2px border around the selected/focused item. This way if you get a background that is all white, the user can still see the currently selected item easier than just seeing a text color change.

The item that is selected has a white background to it (It was supposed to have a gradient to it, but obviously I have to overwork this)
you can see that in the second picture (the first Item). In the first picture the focus is on the previous control. Or did you mean smth else? But nonetheless I am always thankfull for suggestions :-)
Reply
#20
(2017-01-13, 17:00)Halbstark Wrote:
(2017-01-13, 16:45)Protocol-X Wrote: That is about what i am doing.

I have a util that checks and make the directories and then in my init i call self.runDirectoryChecks();

Ah that's clever, I think I will borrow that from you ;-)

(2017-01-13, 16:51)Protocol-X Wrote: Also if I may suggest, for your list, if you do not have one already, as it is hard to see in the picture. Maybe add a light gray colored 1-2px border around the selected/focused item. This way if you get a background that is all white, the user can still see the currently selected item easier than just seeing a text color change.

The item that is selected has a white background to it (It was supposed to have a gradient to it, but obviously I have to overwork this)
you can see that in the second picture (the first Item). In the first picture the focus is on the previous control. Or did you mean smth else? But nonetheless I am always thankfull for suggestions :-)

It works pretty well.
Since Add-ons can not use custom fonts or sizes by default, and manipulating the files is not allowed if you want your Add-on to be accepted, i had to convert all text to images and apply my custom fonts and sizes. Surprisingly it is not really a performance hit.
Everything here is actually unique images
Reply
#21
Wow looks pretty advanced! I didn't know that you cannot change the fonts or define own ones, but good to know (even though I am not sure if my addon will ever be ready to be published)

I am fairly inexperienced with programming - aside from LabVIEW and Matlab - so everything takes a lot of time. And actually I don't have the time to do this right now (uni and stuff).. but ist kind of addictive :-D
Reply
#22
(2017-01-13, 18:31)Halbstark Wrote: Wow looks pretty advanced! I didn't know that you cannot change the fonts or define own ones, but good to know (even though I am not sure if my addon will ever be ready to be published)

I am fairly inexperienced with programming - aside from LabVIEW and Matlab - so everything takes a lot of time. And actually I don't have the time to do this right now (uni and stuff).. but ist kind of addictive :-D

Well, Not really. This is only my 2nd add-on and technically first, as this is just a custom GUI to replace my first add-on. First time with python too. I work as a Java/Groovy developer. This has taken months as i only work on it in my spare time. The difficult part is learning xbmc/kodi because imo the information out there is scattered and not always fully explained. The wiki is great but there is a lot of underlying information you still have to research and dig up. (When using customization)

This forum helps a lot, once you you find the best way to word what your looking for.
Reply
#23
yeah it's pretty difficult to get the hang of it, but it's not like there is a deadline or anything.
I missed something like an example of an addon with a custom gui just to get the basic principle, I've spent a eternity trying to figure out how to populate list controls :-D.
And right now I'm struggling to find a way to fade between two images (like the background in the movies section does with fanart)
Reply
#24
(2017-01-13, 19:02)Halbstark Wrote: yeah it's pretty difficult to get the hang of it, but it's not like there is a deadline or anything.
I missed something like an example of an addon with a custom gui just to get the basic principle, I've spent a eternity trying to figure out how to populate list controls :-D.
And right now I'm struggling to find a way to fade between two images (like the background in the movies section does with fanart)

I think you want this: http://kodi.wiki/view/MultiImage_Control

And yes it is a struggle but it gets easier. until you hit a wall again Smile
Reply
#25
Quote:I think you want this: http://kodi.wiki/view/MultiImage_Control

It was waay simpler... just
<fadetime>200</fadetime>
in the imagecontrol..
Reply
#26
I am glad to see you got it working.
Reply

Logout Mark Read Team Forum Stats Members Help
WindowXML - PIL Image0