Support => NGUI 3 Support => Topic started by: InfiniteAmmo on April 16, 2012, 05:23:32 PM
Title: How to: Set UIDraggablePanel Position
Post by: InfiniteAmmo on April 16, 2012, 05:23:32 PM
So I have a UILabel in a panel that I'm filling up with text. This is for a game that simulates having an email inbox, and the UILabel gets more and more text as your email thread accumulates.
I'm using UIDraggablePanel to move the view, but I don't know how to set it to the "bottom" of the viewable area to show the latest text as it comes in.
Setting the Panel's localPosition seems to break everything.
Any ideas? :O Thanks! :)
Title: Re: How to: Set UIDraggablePanel Position
Post by: ArenMook on April 16, 2012, 10:08:51 PM
UIDraggablePanel.SetDragAmount(0, 1); <-- this will move the clipped area to the left (0) and bottom (1) -- basically the bottom left corner. If you wanted it to be just bottom, you'd specify (0.5, 1).
Title: Re: How to: Set UIDraggablePanel Position
Post by: InfiniteAmmo on April 18, 2012, 03:33:52 PM
Thanks! :) There was one extra step, but I got it working...