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

Pages: [1] 2 3 4
1
Yes this could work but I ended up writing a script for that :)

2
NGUI 3 Support / Re: Word wrapping in UILabel breaks at last character
« on: August 21, 2014, 10:22:35 PM »
I am experiencing a similar bug with the following setup on 3.7.0

label set to resize freely with all anchors set except the left one, so it expanding on the left as expected.

Sometimes, when add characters to the text, a new line will be added for the last characters

3
Hi am trying to show a list of posts in my games. The label size is variable so I designed my control the following way

- Background (Advanced Anchor, bottom set to label bottom)
|- Label (Advanced Anchor, top, left, right set to background


it works perfectly when the text is growing but if the text is only one word or less, the background is shrinking breaking the overall look of the control.

Is there any way to achieve this without the shrinking?

I was thinking that is widgets could be assigned a min value, things would be fixed

Thank you

4
Yes, I was calling SetActive then immediately adjusting the depth so some widgets had their panels correctly set but not some others

calling CreatePanel fixed the issue thank you

5
This approach won't work with my case

We are using only one panel and the menu showing up are only widgets.

Imagine a dialog showing up (it's a prefab containing an UISprite with other parts as its child) then you want to show another dialog from a prefab on top of it (but it's not hiding it entirely)

I was using NGUITools.CalculateNextDepth and adjusted by the difference of the prefab depth and the current dialog

So there is no panel used

6
Hi,

I have multiples UI prefabs that I keep saved as disabled (to avoid the logic to run when I pooling them)

I used to use AdjustDepth with custom values that all the widgets where properly updated.
Now, since you've added at NGUITools.cs:589


  1. if (w.panel != panel) continue;

Not all widgets are getting updated.

Why wouldn't some widget panel be set and not others ?

7
NGUI 3 Support / UIbutton double tap
« on: August 08, 2014, 07:30:49 AM »
Hi,

Is there a way to prevent double tapping on a button ? Or do I need to edit all buttons to include a state check or create a variant of UIButton ?

8
Hi,

Scrollview has a feature to "Cancel drag if it fits" but CenterOnChild is still working, if it possible to have it disabled directly by NGUI ?

An alternative solution would be to copy the script and add the feature myself but I would like to avoid doing something like this

Thank you

9
NGUI 3 Support / Changing UI UILocalize key is not updating the value
« on: June 17, 2014, 03:31:01 AM »
Hi,

I am trying to dynamically changed the UILocalize key after it has already been created but UILocalize doesn't pickup the change. If I disable and renable the object, it will work fine.

I can use Localization.Get but that would defeat the purpose of having a UILocalize on my labels

Another alternative i'd like to avoid would be to call SendMessage("OnLocalize") on my UILocalize component

Why not having key beeing a property that would call OnLocalize upon a set ?

Thank you

10
NGUI 3 Support / Re: Reusing tweenPosition?
« on: June 09, 2014, 03:00:37 AM »
I had exactly the same problem, so I decided to use iTween instead and then everything is working fine.

The only caveat is that you might need to disable anchors or set them to update on enable only

11
NGUI 3 Support / Re: UILabel encoding and dynamic fonts
« on: June 08, 2014, 10:55:02 PM »
Oh sorry I was not clear, I am talking about

http://www.youtube.com/watch?v=JbqfK3mU140

This seems to be a bitmap font feature only so what would be a good way to get something similar using dynamic fonts ?

12
NGUI 3 Support / UILabel encoding and dynamic fonts
« on: June 06, 2014, 05:21:37 AM »
Hi,

I was wondering if there was a way for encoding to be used with UILabel. For example, taking image from an atlas.

Would that be difficult to achieve ? What approach would you recommend ?

Thanks

13
NGUI 3 Support / Re: Allow UILabel extension
« on: June 03, 2014, 02:09:28 AM »
I see, it will be easier after a version upgrade this way, thanks

14
NGUI 3 Support / Re: Allow UILabel extension
« on: June 02, 2014, 11:02:18 PM »
Hum, it seems things are not that simple even with the editor working, I wanted to add a menu button to switch like you did for box collider -> 2d box collider

I did use the replace class utility (NGUIEditorTools.ReplaceClass) but this breaks the ngui font/unity font selection dropdown.

It look like this value is based on mFont which is private so I cannot copy it manually.

I tried to do that with a SerializedProperty with no success

15
NGUI 3 Support / Allow UILabel extension
« on: June 02, 2014, 03:23:44 AM »
Hi,

We are using fixed font size, so I have replaced the UILabel size filed by an enum (Small, Medium, Large).

It was easier to extend UILabel but I had to modify UILabelInspector to allow my class to use it. And i'd rather not modify NGUI source code so could you possibly make it easier to extend it ?

1) [CustomEditor(typeof(UILabelAOE), true)]

to

[CustomEditor(typeof(UILabelAOE), false)]

otherwise it will always use UILabelInspector

2) Make mFontTypeAoE and mLabelAoE protected

3) Also make OnNGUIFont and OnUnityFont protected

I had to copy/paste ShouldDrawProperties to add my changes but that is not a big deal

Thank you

Pages: [1] 2 3 4