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.
    • phrazelleP
      phrazelle
      last edited by

      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
      • phrazelleP
        phrazelle
        last edited by

        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
        • phrazelleP
          phrazelle
          last edited by

          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.

          herb_fargusH 1 Reply Last reply Reply Quote 0
          • herb_fargusH
            herb_fargus administrators @phrazelle
            last edited by

            @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

            phrazelleP 1 Reply Last reply Reply Quote 0
            • phrazelleP
              phrazelle @herb_fargus
              last edited by

              @herb_fargus Sweet! Can you post a link?

              herb_fargusH 1 Reply Last reply Reply Quote 0
              • herb_fargusH
                herb_fargus administrators @phrazelle
                last edited by

                @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

                phrazelleP 2 Replies Last reply Reply Quote 0
                • phrazelleP
                  phrazelle @herb_fargus
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • phrazelleP
                    phrazelle @herb_fargus
                    last edited by

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

                    herb_fargusH 1 Reply Last reply Reply Quote 0
                    • herb_fargusH
                      herb_fargus administrators @phrazelle
                      last edited by

                      @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
                      • mattrixkM
                        mattrixk
                        last edited by

                        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
                        • First post
                          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.