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 - MrTact

Pages: [1]
2
NGUI 3 Support / Does UIDragDropItem need a "dragging" flag?
« on: February 18, 2014, 01:26:54 PM »
I am currently implementing drag and drop for our UI, and I've run into a problem. The restriction-checking block in UIDragItem.OnDragStart doesn't seem to set any kind of state that I can check, and I am getting OnDragMove notifications in my UIDragItem subclass even if the drag is along a restricted axis. Is there some obvious way to get at this information without duplicating the delta check?

3
We are in the process of upgrading to 3.0 and I have a use case that I'm not quite sure how to address with the new UILabel. We have blocks of text of varying sizes that need to fit into a particular space (think description text on inventory items). For most of our uses of UILabel, we are setting max lines = 0 and shrink to fit, which works fine. For these multiline descriptions, however, doing this can cause short lines of text to expand to fill the available space, which is not the preferred effect.

Until now we have been able to get by using one size font and letting UILabel scale it, but the only way I can see to create the desired effect here is to bake a new font at the appropriate size and use a non-scaling option (like clamp content) on the label. Is that right or am I missing something?

4
NGUI 3 Support / Anchoring bug
« on: June 25, 2013, 04:38:45 PM »
I have run into this several times with my project now. I recently updated to the most current version of NGUI, and this still recurred.

When anchoring an object (a UILabel and a UISprite thus far) to another widget, sometimes the Z value of the anchored object will slowly change over time. Eventually the object will walk its way outside the camera bounds! This seems like a floating point precision issue, but I have not had any success identifying where it's happening as yet.

At some point I will devote some serious time to tracking this down, but in the meantime I thought I would bring it up here in case anyone else is running into this, and in case anyone happens to find a fix for it.

5
NGUI 3 Support / Possible (minor) bug with UICenterOnChild
« on: May 21, 2013, 10:57:08 AM »
This is version 2.5.1. Line 53, it reads

mDrag.onDragFinished = OnDragFinished;

Should that perhaps be

mDrag.onDragFinished += OnDragFinished;

so it doesn't stomp any event handler the user might have attached directly to the draggable panel?

Might need to check first and make sure the delegate doesn't already contain the functionality to avoid multiple calls. I'm not really clear on what happens there if you try to add the same function to a delegate, and I couldn't find a definitive answer.

Pages: [1]