• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Grid position numbers and pixels

Scheduled Pinned Locked Moved Projects and Themes
themedesignposition
10 Posts 3 Posters 3.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    phrazelle
    last edited by 21 Dec 2016, 03:04

    So I'm not sure how many people get this, but there is an easy way to design in a photo editing program and transfer your theme into Emulationstation with proper coordinate placement without much hassle, as long as you know the pixel dimensions of your elements.

    I see a lot of tuts telling people to trial and error until stuff fits - which works just fine - but you can get it exact if you do some quick, easy math.

    Let's say you have a box that houses md_description. The actual text has a margin within that box in Photoshop (or whatever program you used to design.) If you crop the actual text area to the margin and write down the pixel dimensions (I'll use 200x300px in this scenario) you can quickly find the coordinates of it by dividing by the full width/height of your canvas.

    So... If you are designing for a 1920x1080 screen, and you have a game description text block (md_description) that you want to fit perfectly into the layout you made, crop that box (again, let's say it comes out at 200x300 in this scenario,) then look at the pixel dimensions of your canvas. Divide the width by the full width of your canvas (200/1920=0.104) and then divide the height by the full height of your canvas (300/1080=0.277.)

    So... your <pos> coordinates for the md_description box would be

    <pos> 0.104 0.277</pos>

    Easy peasy. It took an amazing amount of trial-and-error out of my theme designing (when I actually followed it) but requires creating grids and cropping incessantly to find all elements.

    FWIW

    1 Reply Last reply Reply Quote 0
    • P
      phrazelle
      last edited by 21 Dec 2016, 03:09

      Let me fix that a smidge...

      If you have a text block that is md_description, you need to measure how far it is from the edges to get the <pos>.

      I.e., if your canvas is 1920 wide, and your md_description fits 200px from the left edge, then your first number in your <pos> coordinate is (200/1920=0.104) so 0.104.

      You have to grid out the whole thing and account for the negative space before your elements start.

      Derp.

      1 Reply Last reply Reply Quote 0
      • P
        phrazelle
        last edited by 21 Dec 2016, 03:14

        I'm going to step away and rewrite this later. This is correct...and changed the way I make themes...but I think I wrote the explanation like a dingus.

        H 1 Reply Last reply 21 Dec 2016, 03:20 Reply Quote 0
        • H
          herb_fargus administrators @phrazelle
          last edited by 21 Dec 2016, 03:20

          @phrazelle rook made a tool that does just that.

          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

          P 1 Reply Last reply 21 Dec 2016, 03:42 Reply Quote 0
          • P
            phrazelle @herb_fargus
            last edited by 21 Dec 2016, 03:42

            @herb_fargus Sweet! Can you post a link?

            H 1 Reply Last reply 21 Dec 2016, 04:20 Reply Quote 0
            • H
              herb_fargus administrators @phrazelle
              last edited by 21 Dec 2016, 04:20

              @phrazelle https://retropie.org.uk/forum/topic/768/pixel-theme/51

              If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

              Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

              P 2 Replies Last reply 21 Dec 2016, 04:24 Reply Quote 0
              • P
                phrazelle @herb_fargus
                last edited by 21 Dec 2016, 04:24

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • P
                  phrazelle @herb_fargus
                  last edited by 21 Dec 2016, 04:26

                  @herb_fargus That sucks that it's just Windows. Great idea and implementation though!

                  H 1 Reply Last reply 21 Dec 2016, 05:01 Reply Quote 0
                  • H
                    herb_fargus administrators @phrazelle
                    last edited by 21 Dec 2016, 05:01

                    @phrazelle no reason why you cant come up with something similar for linux

                    If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                    Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                    1 Reply Last reply Reply Quote 0
                    • M
                      mattrixk
                      last edited by 22 Dec 2016, 06:54

                      I just set up a photoshop document set to percentage instead of pixels, and set a grid line at every percent. Snap to grid and all is good.

                      My ES themes: MetaPixel | Spare | Io | Indent

                      1 Reply Last reply Reply Quote 1
                      10 out of 10
                      • First post
                        10/10
                        Last post

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                        This community forum collects and processes your personal information.
                        consent.not_received