Author Topic: UIPanel Clip, Screen Resolution + Draggable Window  (Read 2230 times)

vvolynine

  • Guest
UIPanel Clip, Screen Resolution + Draggable Window
« on: October 10, 2013, 08:36:35 PM »
Just wanted to throw a note as to how absolutely awesome this is, I've fixed the earlier question I had (the question I posed made no sense really), and have used your brilliant examples to craft a fully functioning RPG interface of my own using all the functions provided within nGUI, big +10 from me.

Anyways, a quick question, is it possible to restrict windows from going out of bounds as the game resolution changes? At the moment most of my draggable windows unless played in the panel resolution I set, can be thrown right out of the game.

Cheers.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIPanel Clip, Screen Resolution + Draggable Window
« Reply #1 on: October 11, 2013, 08:08:08 AM »
You'd have to add some kind of logic for that. NGUI won't keep UI elements on-screen for you unless you use anchors in some clever fashion. Check how I did the logic for the tooltip. It actually ensures that it's always visible and repositions itself to be on the screen if a part of it is outside of it.

vvolynine

  • Guest
Re: UIPanel Clip, Screen Resolution + Draggable Window
« Reply #2 on: October 11, 2013, 05:04:38 PM »
Ah! I knew I remember seeing something that always stayed on screen no matter what in your examples.

Awesome, thank you.