Author Topic: Scaling based on DPI  (Read 1738 times)

finky45

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Scaling based on DPI
« on: January 13, 2014, 08:14:10 AM »
So I am trying to make a universal GUI (just 3 simple buttons) to scale dynamically based on the DPI of the mobile device. There is nothing else but 3 buttons and I can't get them to scale (they just remained fixed in pixels). Is there documentation how to accomplish DPI scaling?

NikSpace

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Scaling based on DPI
« Reply #1 on: January 13, 2014, 09:33:03 AM »
First tell me if you have check the Scaling Style on UI Root.

If yes an other way is i "thing" store Screen.dpi and use it to some how multiple the width and size of your sprites!!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scaling based on DPI
« Reply #2 on: January 13, 2014, 05:45:32 PM »
If you want scaling based on DPI, set UIRoot to Fixed Size mode and change its Manual height yourself based on your DPI-sensing logic.