Author Topic: Sliding button menu with automatic orientation (for mobile devices)  (Read 10976 times)

Kafar

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 27
    • View Profile
Hello,

I'm new on NGUI, I read all tutorials, I tried all available samples BUT I can't understand how to make a simple sliding button menu with auto orientation for mobile.

Please, can anyone suggest me a simple sample code or anything?

Big thanks!

-Kafar

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sliding button menu with automatic orientation (for mobile devices)
« Reply #1 on: August 26, 2015, 12:30:57 PM »
When the device reorients, as far as Unity is concerned all that happens is that the screen dimensions change, so I am not sure I understand your question... If you are trying to make things relative to the screen size, use anchoring. All widgets can be anchored.

Kafar

  • Newbie
  • *
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 27
    • View Profile
Re: Sliding button menu with automatic orientation (for mobile devices)
« Reply #2 on: August 26, 2015, 03:51:49 PM »
Thanks for reply.

Can you do a little sample code about how I can to use the anchoring for the screen size?

Thanks

-Kafar

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sliding button menu with automatic orientation (for mobile devices)
« Reply #3 on: August 30, 2015, 11:11:30 AM »
Just look at the first example that comes with NGUI.