RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    True center on <imagegrid>

    Scheduled Pinned Locked Moved Help and Support
    grid viewscrollingcentered
    8 Posts 2 Posters 953 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.
    • R
      RetroBox
      last edited by

      Is there an actual true center on the image grid?

      <imagegrid name="gamegrid">
      <pos>-0.375 0</pos>
      <size>1 1</size>
      <margin>0.01 0.01</margin>
      <autoLayout>1 8</autoLayout>
      <autoLayoutSelectedZoom>1.3</autoLayoutSelectedZoom>
      <centerSelection>true</centerSelection>
      <scrollLoop>true</scrollLoop>
      </imagegrid>

      grid.png

      Even though I have <centerSelection> set to"true", the center of the grid changes depending on which direction I scroll in. the GTA V logo will be the initial center, when I scroll up or down, the center position will change. I noticed the scroll does not always move the grid, which I think is the problem, but am not sure. My <autoLayout> is set to one row and want to keep it that way.

      A12C4A 1 Reply Last reply Reply Quote 0
      • A12C4A
        A12C4 @RetroBox
        last edited by A12C4

        @retrobox Can you share your theme so I can try to reproduce the problem?

        As far as I know, this should be easy to achieve, but I need to try it out and take a look at the code, a lot of modifications were made on the grid view since I worked on it.

        Also, to answer your other question, having the selected image always centered is the easiest way to achieve this, but you could also try to set a custom background for the selected grid tile.

        Grid view wiki

        R 2 Replies Last reply Reply Quote 0
        • R
          RetroBox @A12C4
          last edited by

          @a12c4 yeah of course! Thanks for looking into it. I'll share the main XML and one for one of the system themes in a bit.

          1 Reply Last reply Reply Quote 0
          • R
            RetroBox @A12C4
            last edited by

            @a12c4 https://github.com/RetroBox1984/RetroBox_EStheme/blob/main/es-theme-retrobox-master

            1 Reply Last reply Reply Quote 1
            • R
              RetroBox
              last edited by

              I tried to share as many assets as possible, but my setup is on a PC, so a lot of files are on a different drive. Also, a lot of the paths will obviously not match up. Sorry if that causes any headaches.

              A12C4A 1 Reply Last reply Reply Quote 0
              • A12C4A
                A12C4 @RetroBox
                last edited by

                @retrobox Well your problem is just that you use an even number of rows, try using an odd number of rows and it should always stay centered.

                for example

                <autoLayout>1 7</autoLayout>
                

                instead of

                <autoLayout>1 8</autoLayout>
                

                Grid view wiki

                R 2 Replies Last reply Reply Quote 0
                • R
                  RetroBox @A12C4
                  last edited by

                  @a12c4 Ah, okay. I'll give that a try in the next couple of days. Thanks for the advice and for looking into it for me! I'll let you know how it turns out.

                  1 Reply Last reply Reply Quote 0
                  • R
                    RetroBox @A12C4
                    last edited by

                    @a12c4 Alright, it worked! kind of embarrassing since it's such a simple fix. Though thinking about it, it makes complete sense why an odd number would work. Anyway, thanks again! You saved me a lot of time, as it would have taken a while until I would have realized the problem. Take care!

                    1 Reply Last reply Reply Quote 0
                    • 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.