Coordinates & origin. Why?
#1
Could someone please explain what the benefits of using coordinates and why they are used for dialogs and not other windows?

<coordinates>
<system>1</system>
<posx>0</posx>
<posy>0</posy>
<origin x="490" y="160" />
</coordinates>

I’ve read the skinning manual but I can’t see why they are used, as opposed to simply specifying the x/y of each control. Also what’s <system>1</system> and <origin/> used for as I’ve not been able to find this info anywhere, but many skins use them?
Reply
#2
coordinates

This block is used to specify how XBMC should compute the coordinates of all controls.

origin

Sets a conditional origin for the window. The window will display at (x,y) whenever the origin condition is met. You can have as many origin tags as you like – they are evaluated in the order present in the file, and the first one for which the condition is met wins. If none of the origin conditions are met, we fall back to the <posx> and <posy> tags.

And <system> has been removed -

http://forum.xbmc.org/showthread.php?tid=93716
Reply
#3
Great thanks Hitcher. So is there an advantage using coordinates compared to just specifying the position of each control or is it just a case that if you want to move a dialog and all its controls to the left, you simply change one value as opposed to changing each and every control?

And if I simply want to centre a window on both the X and Y, am I best to use coordinates?
Reply
#4
If all you want to do is center a window, then just define the appropriate x and y coordinates in the <origin> tag.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
As hitcher says Origin can be used to move them around if other windows and things are active like in pm3.hd I have this for DialogMusicScan
PHP Code:
<coordinates>
    <
posx>850</posx>
    <
posy>10</posy>
    <
origin x="30" y="10">Window.IsVisible(seekbar)</origin>
</
coordinates
which means that if the seekbar is visible it appears at x=30 instead of overlapping it at x=850
Reply
#6
Thanks you for all your help. That clears things up.
Reply

Logout Mark Read Team Forum Stats Members Help
Coordinates & origin. Why?0