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

Pages: [1] 2 3 ... 6
1
NGUI 3 Support / Re: Calculate text width for a label
« on: June 18, 2015, 03:41:40 PM »
Does the combo "myLabel.UpdateNGUIText + NGUIText.CalculatePrintedSize" make the same result as "myLabel.printedSize" ?

2
NGUI 3 Support / Re: Calculate text width for a label
« on: June 17, 2015, 09:43:01 AM »
Yeah, I don't get it how you can calculate the size of the label with a static method (NGUIText.CalculatePrintedSize), how does the system know all the settings on your label? I'm VERY curious about that. It must takes into acount the current font, the font size, the spacing of the label, etc...
Calling this method for me results in very weird results too.
But still, the printedSize accessor of the UILabel makes a lot more sense.

3
NGUI 3 Support / Re: Dynamic font pixel perfect?
« on: February 03, 2015, 05:33:52 PM »
That's just how the font is the way it comes from Unity.

Using a bitmap font it's possible to add 1 pixel border around your characters, but dynamic font = all Unity, and I have no control over it.
You told me that with dynamic font it's all UT fault, but it seems to be the same issue with bitmap fonts. When I check the bitmap file, it's all correct, but once on UILabel I still have the weird issue. Do I need to add something special to my bitmap file? (I used both BMFont and your Font Maker with FreeType).

Edit: Ok if I add a padding with BMFont it will fix it.

4
NGUI 3 Support / Re: Dynamic font pixel perfect?
« on: January 19, 2015, 05:08:28 PM »
Well, let's hope UT will improve this soon or later...

5
NGUI 3 Support / Dynamic font pixel perfect?
« on: December 11, 2014, 02:21:29 PM »
Hi there !
We are still using an old version of NGUI, I'm wondering if you still support older version, but yeah, anyway...
I'm using a dynamic font for my UILabel, everything works fine, but on all my fonts the lowest and the highest line of pixel of the font is cut (and I think the left and right colon for each character too), which is not that elegant right now. It does not depend on font size, which means that on a very huge font size the problem is almost invisible, but on smaller ones, it's really annoying.

I've attached with this thread an example showing the problem.

I'm currently using version 3.5.3

Thanks !

6
NGUI 3 Support / Re: UILabel and frame perfect refresh
« on: October 14, 2014, 06:26:00 PM »
Ok I think I got it. In your example you get first the text formatted from the UILabel, which is adding \n on lines before the text gets too long to fit into the line. I'm not doing that so when I display letter after letter the word is most of the time not completed when it goes to the next line.
Example:

"Bacon ipsum dolor sit amet pork chop pork loin tail fatback pig porch"

And then:

"Bacon ipsum dolor sit amet pork chop pork loin tail fatback pig
porche"

Which visually is not "elegant". I'll try to use the processedText from UILabel as input.

7
NGUI 3 Support / Re: UILabel and frame perfect refresh
« on: October 14, 2014, 06:07:54 PM »
I'll take a look, maybe a video might be help what's going on right now, but I guess there is one frame between the moment when the text is displayed and when the UILabel decides to move the latest word to the next line.

8
NGUI 3 Support / [Resolved] UILabel and frame perfect refresh
« on: October 13, 2014, 08:03:03 PM »
Hi guys !
I'm currently making a dialog system and I have something kinda weird happening with NGUI and my dialog box.
I'm refreshing the text letter by letter on time, and my UILabel is set to SrinkContent, so it automatically goes to the next line if the text is not fitting into the current line. When this is happening there is one frame between the moment when the new text is displayed and when the text is shrunk, you can really easily see it. How can I fix that? thanks !

PS: Maybe it's fixed on most recent versions, I'm still using an old one (3.5.6). Maybe I can apply those changes to my version as I don't want right now to update to the latest.

9
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 22, 2014, 08:14:57 AM »
Like an alpha cutout classic shader?

10
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 19, 2014, 08:33:06 AM »
One note, I don't know if you have chosen to set the alpha to the sprite on the panel to 0 when the texture mask alpha is 0 or when it's set to 1.
IMO I would say that when the alpha mask is set to 1 it should set the alpha of the sprite behind to 0.
Maybe letting the user choosing this might be great as well.

11
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 19, 2014, 08:23:58 AM »
3.5.6 is way out of date.

Anyway I've fixed the shader on my end, so you'll find this feature in the next update. Thanks!

Good news, glad to help !

And the only reason to keep this version for our project is that updating it is most of the time not necessary (for the new features, most of the time) and it might causes bug/compilation errors.

PS: The 3.5.6 version is working pretty well with the Unity5 beta 4 version ;)

12
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 18, 2014, 04:36:26 PM »
We're getting this from the 3.5.6 version (the version we are using right now).
My college told me that this line:

  1. o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);
  2.  
was already into the original AlphaClip shader (the original file we modified). It allows to get the coordinate on the UIPanel (if I'm right, I'm not a shader guy...).

Then the other line is used to be able to scale the alpha with the size of the Panel.

If you still can't figure out how's working with the latest version of NGUI, we will tomorrow try into an empty project with the latest version of NGUI those changes. If we manage to do it I'll post here the solution.

13
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 18, 2014, 08:21:49 AM »
I think the best way to do it is to wait for ArenMook to integrate it in the latest version of NGUI.
Or you will have to figure out where to integrate changes on those 3 files in the new version (maybe script like UIPanel is completely different) and add new shaders into your project (from the archive I attached in my previous post).
I don't think that's not going to work on the last version, we didn't change a lot of things into the project, we just add pretty much the support for a new clipping mode, and the shader is very similar to the original one. Basically it's just multiplying the alpha of the sprite/texture/label with the alpha of the mask texture.


14
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 17, 2014, 04:09:28 PM »
Here's an example of the result: it's pretty damn AMAZING.


15
NGUI 3 Support / Re: clipping a panel with a non-square rect
« on: September 17, 2014, 04:01:15 PM »
One thing:
Maybe it's not logic right now that the sprites or textures will be faded out when the alpha of the texture mask is 0.
So in my version I changed in all shaders the line where the alpha of the texture is multiplied by the alpha of the mask to 1 - alpha to inverse it.

Pages: [1] 2 3 ... 6