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.

Topics - Oinobareion

Pages: [1]
NGUI 3 Support / 'OnDragFinished' fired on simple tap
« on: November 20, 2013, 03:58:50 AM »

I am using the UIDraggablePanel event 'OnDragFinished' to fire events as soon as i have finished dragging the panel. Unfortunately, the event also gets fired when i simply tap the panel ( = when there has been no offset between my touches). How can I fix that? 

  1.         void Start ()
  2.         {      
  3.                 draggablePanel.onDragFinished = new UIDraggablePanel.OnDragFinished(OnDragFinished);
  4.         }
  6.         void OnDragFinished()
  7.         {      
  8.                 // Do something
  9.         }

Thanks for help!

NGUI 3 Support / UIDraggblePanel: event when it comes to a halt
« on: November 19, 2013, 07:41:34 AM »
Hey guys,

I use the "OnDragFinished" Event Listener to detect when I have finished dragging a UIDraggblePanel. This works fine but what I actually want to know is when the UIPanel comes to a halt after being dragged and the momentum being applied. So how can I figure out, when the UIPanel stops after being dragged?

Thanks for your help!

NGUI 3 Support / Check, if GameObject is inside UIPanel
« on: November 13, 2013, 08:28:15 AM »
Hello everyone,

May be a simple question: Can I somehow check, if a GameObject is inside a UIPanel? I want to do something with the GameObject, as soon as it enters the panel. Is this possible?

Otherwise I would have to make a collider box as trigger and work with onTriggerEnter and onTriggerExit. I am wondering, if there's an easier way to do this.

Thanks for help!

NGUI 3 Support / Define minimum value for UIScrollBar.cs
« on: November 08, 2013, 08:55:21 AM »

I am using a UIScrollBar for a list I am displaying. The problem is: when the list gets very long, the foreground element of the scrollbar gets very small. How can I define a minimum value for the foreground element size so that it does not fall below a certain value?

Thanky for your help.

NGUI 3 Support / UITable loading only visible elements
« on: October 18, 2013, 05:05:01 AM »

I have a UITable that gets filled dynamically with much content (Prefabs). I am wondering if there is an easy way to implement an intelligent UITable that only loads those list elements that are actually visible to the user. The other elements (that are outside the visible area) are just dummy elements without content. These dummy elements get filled with content as soon as the user scrolls the list.

I have the following:

- UIPanel with SoftClip activated and UIDraggablePanel component

-- UITable that dynamically shows prefabs. This can be 100+ at a time with much content. If everything is loaded at once, the whole thing gets realy slow.

--- the Prefab Instances with UIDragPanelContents

Any ideas how to do that? Thanks for any help!

NGUI 3 Support / UITexture.mainTexture causes problem on Android
« on: August 08, 2013, 09:27:17 AM »

I am dynamically creating a GameObject and add a UITexture component to it. Like this:

  1. GameObject go = new GameObject("picture" + index);
  2. go.AddComponent("UITexture");

Now I want to assign a texture to it like this:

  1. go.GetComponent<UITexture>().mainTexture = tex;

where tex is some Texture2D. This works fine in the editor but as soon as I test it on an Android device, it gets stuck at this point. Any ideas why?

Thanks for any help!

NGUI 3 Support / Drag & Drop from 2D to 3D Space
« on: June 06, 2013, 05:17:08 AM »

I am having big troubles to integrate the "Example 11 - Drag & Drop" functionality into my own project. I want to drag an object from the 2D UI and drop it on an object in the 3D space. Is there a step-by-step description on how to do it? I'll try to explain what I did so far:

- I have an Anchor that is positioned at the left side of the screen. Inside, I have a Panel and some Widgets that represent some kind of media library (= a collection of images). From this media library I want to drag 2D objects on the 3D canvas (a simple plane).

My questions: Where do i have to attach the following scripts to? DragDropItem.cs, DragDropRoot.cs, DragDropSurface.cs

Thanky for any help!

Pages: [1]