Is it possible to use custom windows for video add-ons?
#16
Thanks
+1 for using native background. What happens if user is using alternative skin ?


Quote:You have probably confused actual display resolution and the resolution of the coordinate grid on which controls are placed on the screen. The latter is 1280x720 by default regardless of your actual display resolution. This way your addon UI items have the same visible size no matter what resolution of your display is.

Tell me if I'm right

- Coordinate grid of xbmc is ALWAYS 1280x720 [even at lower resolution ?]
- getWidth and getHeight tell the REAL resolution (e.g. 1920x1080 but also 320x400 on my phone when in landscape-mode )
- so a 'full screen backgound' will be 1280x720 at every real resolution ?

Please, tell me that there are some builtin helper function to handle this ...
Reply
#17
(2013-09-27, 09:40)realtebo Wrote: Thanks
+1 for using native background. What happens if user is using alternative skin ?


Quote:You have probably confused actual display resolution and the resolution of the coordinate grid on which controls are placed on the screen. The latter is 1280x720 by default regardless of your actual display resolution. This way your addon UI items have the same visible size no matter what resolution of your display is.

Tell me if I'm right

- Coordinate grid of xbmc is ALWAYS 1280x720 [even at lower resolution ?]

Yes, though you can change the coordinate grid resolution with setCoordinateResolution(). And note that this is just a visible area resolution, because coordinates can have any integer value, but you will see only what fits in 1280x720.

Quote:- getWidth and getHeight tell the REAL resolution (e.g. 1920x1080 but also 320x400 on my phone when in landscape-mode )

- so a 'full screen backgound' will be 1280x720 at every real resolution ?

Yes.

Quote:Please, tell me that there are some builtin helper function to handle this ...

Not sure what you mean. If you are need some kind of layout manager, there is none. That is what I'm trying to implement in my framework (already implemented actually).

(2013-09-27, 09:40)realtebo Wrote: Thanks
What happens if user is using alternative skin ?

There won't be any image, as image filenames without full paths are searched in the current skin resources and that other skin must have a similar texture with exactly the same filename. You need either to set a background texture explicitly with a full path to an image file, or do a skin check and take alternative textures from their resources. Or the 3-rd variant that combines both: choose external image files based on a skin used.
Reply
#18
Ok !

I modified in this way
See on github

- Add background.png 'white' pixel image to resource/media
- Set this background with width 1280x720
- Drawed up on this canvas all others controls (3 textboxes).

It now seems to work with pc at different window size. I'll try on hdready and hdtv to see the result.

Thanks a lot for explanations !
Reply

Logout Mark Read Team Forum Stats Members Help
Is it possible to use custom windows for video add-ons?0