Author Topic: Grids with thin (1 pixel) spacing  (Read 2961 times)

doggan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Grids with thin (1 pixel) spacing
« on: August 11, 2015, 02:57:29 AM »
I am trying to make a scrollable grid with a very thin border between the cells. I was playing around with the NGUI Example 14 scene to try and prototype my idea. I notice that even with UIRoot set to flexible (pixel-perfect), I still get slight inconsistencies on different devices (currently testing with iPhone 5 and iPhone 6).

When you scroll to certain positions, the spacing sometimes looks larger than 1 pixel (see attached screenshot).

What is the best technique to avoiding this issue? Even if I can't achieve 1 pixel spacing, I would be happy with a solution that provides 2+ pixel spacing as long is it is consistent between all cells.

For reference, I'm using NGUI 3.9.1. Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Grids with thin (1 pixel) spacing
« Reply #1 on: August 14, 2015, 08:53:58 AM »
Check the dimensions of your scroll view and game window. Make sure it's dividable by two.