Welcome,
Guest
. Please
login
or
register
.
April 21, 2026, 12:21:30 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Move UITexture around screen with mouse
« previous
next »
Print
Pages: [
1
]
Author
Topic: Move UITexture around screen with mouse (Read 5394 times)
jacksmash
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 9
Move UITexture around screen with mouse
«
on:
November 24, 2014, 07:59:26 PM »
I have a UITexture using the DownloadTexture script to get the image. This works fine, but I'd like to allow the user to resize the texture with the mouse and also drag it around the screen. What is the best approach to this?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Move UITexture around screen with mouse
«
Reply #1 on:
November 25, 2014, 01:38:15 AM »
ALT+SHIFT+C to add a collider and add UIDragObject to it.
To resize, UIDragResize. Check the chat window example, it's a resizable window.
Logged
jacksmash
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 9
Re: Move UITexture around screen with mouse
«
Reply #2 on:
December 01, 2014, 07:36:31 PM »
Thanks! Dragging works great! I'm missing the resize script so I must need to update my NGUI package
Logged
jacksmash
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 9
Re: Move UITexture around screen with mouse
«
Reply #3 on:
December 04, 2014, 07:06:54 PM »
Is there a way to have the drag script maintain the aspect ratio of the widget being resized?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Move UITexture around screen with mouse
«
Reply #4 on:
December 05, 2014, 01:00:57 AM »
Widgets have an aspect ratio field. You will need to set it to something other than "free".
Logged
jacksmash
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 9
Re: Move UITexture around screen with mouse
«
Reply #5 on:
December 08, 2014, 07:48:32 PM »
Apologies. Missed that. All good now.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Move UITexture around screen with mouse