Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yuewah

Pages: 1 ... 10 11 [12] 13
166
NGUI 3 Support / Re: Short Click or Long Click
« on: May 09, 2012, 11:00:09 PM »
As I must check the UICamera.selectedObject in the Update Loop to avoid attaching OnClick function for all buttons ( early 30 x 30 selectable tile button ).

167
NGUI 3 Support / Re: Short Click or Long Click
« on: May 09, 2012, 10:51:03 PM »
As for some reason, I cannot record time in OnPress, I see there is a Mouse Click Threshold, can you add Mouse Click Time Threshold for a valid Click

168
NGUI 3 Support / Short Click or Long Click
« on: May 09, 2012, 10:02:34 PM »
I would like to know how long does the OnClick ( time between MouseDown and MouseUp ), so that I can determine it is a Short Click or Long Click.

169
NGUI 3 Support / Re: UICamera to handle many button
« on: May 09, 2012, 09:59:54 PM »
I just figure out another approach,
In the Update Loop, check for UICamera.selectedObject



170
NGUI 3 Support / UICamera to handle many button
« on: May 09, 2012, 09:18:29 PM »
If the UI has many game objects, each one has its own collider.
I don't want to add any custom script or UIForwardEvents or UIButtonMessage on each game object to handle the OnClick event.
I would like to handle it in a single controller object. Is it possible?

171
yes, aligning to parent. Let me search for the forum. Or, can you make it official.

172
NGUI 3 Support / Re: better method to hide UIPanel.
« on: May 03, 2012, 12:16:47 PM »
If UIWidget has a property , says isAlwaysActive = false, then NGUITools.SetActive( UIPanelA ) will ignore this and recursively set others child to be inactive.

173
Core tool for placing UI elements on screen  is EZAlignment (available from Main Menu -> Components -> EZ GUI -> EZLayout -> Alignment). UI root contains EZAlignment control that detects viewport size and sets it extents to appropriate values. Root aligner works automatically and ignores user defined size and margins.

Child UI elements can align themselves relative to parent elements also by using Alignement, but with custom margins, size and alignment mode. Sizes in UI are defined in pixels, most of the time one pixel is mapped to one world unit. Margins and sizes can be also defined in percentage from parent size, instead of pixels. That is achieved by setting appropriate value type from PIXELS to PARENT_SIZE_PERCENTS.

Following horizontal alignment modes are available in aligner:

LEFT – child aligns its left edge to the parents’ left edge, left margin is taken into account.
RIGHT – child aligns its right edge to the parents’ right edge, right margin is taken into account.
CENTER – child aligns its center to the parents’ center, both left and right margins are taken into account.
STRETCH – child takes all parents’ width, both left and right margins are taken into account.

http://tools.artofbytes.com/ezdata/documentation

174
NGUI 3 Support / Multi-object editing support ?
« on: May 03, 2012, 12:46:56 AM »
Is it have any reason that it does not support yet ?

175
NGUI 3 Support / Re: better method to hide UIPanel.
« on: May 02, 2012, 10:59:54 PM »
how about having a generic script that attached to the gameobject that is always On or Off while it will not affected by NGUITool.SetActive

176
NGUI 3 Support / Re: better method to hide UIPanel.
« on: May 02, 2012, 09:33:35 AM »
@ArenMook, any better solution ?

177
NGUI 3 Support / Re: better method to hide UIPanel.
« on: May 01, 2012, 08:57:32 PM »
I think having a camera per panel would be workaround solution but it would be hard to setup if there is many panels.

178
NGUI 3 Support / better method to hide UIPanel.
« on: May 01, 2012, 08:49:38 AM »
There are 3 methods to hide UIPanel, each of them is not a perfect solution.

1. NGUITools.SetActive
- if UIPanel show up again, some gameobject will become active that you don't want.

2. disable UIPanel Component
- Collider is not disabled.

3. Move UIPanel out of the UICamera
- UIPanel LateUpdate still being called that will hit performance.

179
it works as expected. How about rotating camera and zooming using multi-touch , is it possible or not ? anyway, I will give it a try.

180
Could you make a simple scene on how to do drag camera for RTS game using NGUI ?

Pages: 1 ... 10 11 [12] 13