Kodi Community Forum

Full Version: X, Y positions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey guys, I am creating a new skin, everything is going great except one part is driving me INSANE.

Is there an easier way to show the positions (X,Y) of XBMC on screen? so I dont have to guess where every element should be, restart the skin and try again.

There has to be a better way of positioning items then what I am doing, right?
Most people tend to mock something up in a graphics package, then just read the coordinates off there.

I guess we could add a "debugging" method where we allow the coordinates of the mouse to be output to the screen - would that be useful?

Cheers,
Jonathan
I use a calculator to figure out 80% of mine and the rest is trial and error
Same, although I was thinking of making a grid overlay that I could add to windows while i work on them to help me align things, I just haven't really needed one badly enough yet. Might work for you though.
jmarshel: thats exactly what I did, but it sometimes becomes pretty tricky, even more tricky when you use items that are in a group. I am not sure how the debug feature would work but anything will be useful.

Jezz: Which calculator? can you recommend one that has X, Y positions

Freddo: first of all I just wanted to say SUI friggin rocks! I kinda feel stupid for asking but umm .. if i created overlays .. how would that help me calculate the coordinates .. what tool do I use?

Off topic question: is there a way to disable image scaling? I noticed this happens when changing resolutions .. would be helpful for some items as well.
Well you could make a grid that had a line say every 10 pixels, then add it to the window while your working on it at the very bottom of the xml (so appearing ontop of everything else) then you could count the lines to work out positions roughly.

btw: i think jezzx just meant a calculator like.. any old calculator, personally I use good old trusty windows calc.
Not sure if this will help, but I posted an image below that I put together back in '05 (a time when I was addicted to customizing PM3 Laugh ). I used it to give me an idea of how to position whatever I was adding, then I basically calculated the exact position from my estimated point.

You'll notice an X at various positions on the PM3 screenshot, which I added to the home.xml to get the real coordinates of each position, then I just took a screenshot in XBMC and photoshopped in some lines and the coordinates to give me a grid like view. Not quite sure of the accuracy, so you may just want to test it out and see if it helps.

Image
I have made a file that may help with your predicament. When you follow the included instructions it will place a grid that maps out every 10 pixels in the window. I even made it very simple to control the color of the lines, instructions for that are also included in the ReadMe.txt.

Image

Here are the files
if that grid was rolled into the "empty" skin the combination would be amazingly useful for novice skinners. http://forum.xbmc.org/showthread.php?tid=29743
Great idea, chi3f. I just modified that grid for 720p for anyone who wants it. Right click download, and follow the instructions from chief's post 2 posts above, except put it in the 720p folder, and change the includes entry to link to 720pGrid.xml instead of Grid.xml

http://www.fileden.com/files/2007/3/20/9...0pGrid.xml
BUMP...

jmarshall Wrote:I guess we could add a "debugging" method where we allow the coordinates of the mouse to be output to the screen - would that be useful?

Cheers,
Jonathan

This would be amazing.
CHI3f Wrote:I have made a file that may help with your predicament. When you follow the included instructions it will place a grid that maps out every 10 pixels in the window. I even made it very simple to control the color of the lines, instructions for that are also included in the ReadMe.txt.

Image

Here are the files

the file does no longer exist Rolleyes
If you're designing the skin in a graphics program first, then this is by far the easiest way to get co-ordinates. The 'info' tab in Adobe's packages is invaluable for skinning, making sure in your preferences you've set your units to pixels.

Thats how we do our skins, design them in Adobe first then start taking out the elements bit by bit and building them up in the xml.
Blackbolt Wrote:If you're designing the skin in a graphics program first, then this is by far the easiest way to get co-ordinates. The 'info' tab in Adobe's packages is invaluable for skinning, making sure in your preferences you've set your units to pixels.

Thats how we do our skins, design them in Adobe first then start taking out the elements bit by bit and building them up in the xml.

glad to hear this, as it is exactly the approach i have started with. Quick additional slightly off-topic question - is there any performance benefit to designing the textures in a similar manor to websites? For example - if you want a horizontal bar - to make it X by 1 pixel and then stretch is for the width you need. I understand there are other advantages to this strategy (namely, the flexibility to adjust sizes). But should i take is as far as to create selectBarEdgeLeft, selectBarEdgeRight, and then fill with a 1 pixel wide selectBarMain? I am thinking that is overkill as the textures are local and dont need to be downloaded - also a good png optimizer will probably be my friend i am guessing?
Nmarconi Wrote:glad to hear this, as it is exactly the approach i have started with. Quick additional slightly off-topic question - is there any performance benefit to designing the textures in a similar manor to websites? For example - if you want a horizontal bar - to make it X by 1 pixel and then stretch is for the width you need. I understand there are other advantages to this strategy (namely, the flexibility to adjust sizes). But should i take is as far as to create selectBarEdgeLeft, selectBarEdgeRight, and then fill with a 1 pixel wide selectBarMain? I am thinking that is overkill as the textures are local and dont need to be downloaded - also a good png optimizer will probably be my friend i am guessing?
I am using at the moment even with a pixel graphics colordiffuse, but whether this is a performance advantage, I can not say.
Pages: 1 2