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

Pages: [1]
1
NGUI 3 Support / UILabel, HTMLEngine and Dynamic Fonts
« on: October 02, 2014, 01:34:06 PM »
Hi Aren, I know that HMTLEngine is a third party asset to NGUI, but sadly I need a bit of help regarding this topic...

This is more a unity/uilabel question rather than HTMLEngine, but I mention this so you can get a picture of my problem.

As you might know, HTMLEngine pareses the markup and then uses a Draw method that generates UILabels. HTMLEngine calculates the printed size of the not-yet-created UILabel using NGUIText.calculatePrintedSize, and then creates the label according to this calculations... as the labels are not instantiated at the moment of the calculations  HTMLEngine sets the NGUIText "environment" manually rather than calling UILabel.UpdateNGUIText method... If I compare the calculated size, and the final label size it is ALWAYS wrong by a few pixels (depending on the label text/characters) and the final result is some overlapped UILabels...

 I think this is because some parameters not being passed to the "environment" correctly, more specifically the mScale of the font.. and there comes my question:

I've analyzed most of UILabelĀ“s code, and mScale seems to be related to the Unity import Font Size  ... so.. how is imported font size related to the font size I use in the UILabels???

If I set the import size to 20, and then in the label I set the size to 24... mScale is different (not 1), right?

Thanks in advance!

2
NGUI 3 Support / scrollbars not getting fully transparent
« on: October 17, 2013, 08:53:44 AM »
Hi, I am making an scroll area with a clipped panel and vertical scrollbar only. The scrollbar ir set to "when dragging" so it dissapears when it is not being used. The problem is that sometimes it dissapears completely and other times it doesn't. Is like if alpha where not getting to zero.. but it is.. first I though it could be the editor caching rendred images, and tried it live on my iPhone and the problem still occurs.

In the pictures you can see the active scrollbar and the "hidden" one.


Any advice?

Pages: [1]