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

Pages: [1]
1
NGUI 3 Support / Re: Teeny Fonts
« on: March 18, 2014, 12:27:09 AM »
Size 32 font in NGUI/BMFont = letters will be 32 pixels tall at most. Word "size" is not in pixels.
Aha!  Thank you.  I will just have to translate manually between the two I suppose!

2
NGUI 3 Support / Teeny Fonts
« on: March 11, 2014, 08:28:00 PM »
So I've noticed that if I create a font at, say, size 32 from BMFont and then create a label at the default size of 32 the font is teeny tiny compared to how it looks "normally" (in, say, Illustrator).

My root is set to "PixelPerfect."

I don't think there's a way to do this, but is there any way to keep my font sizes consistent between my design software and my NGUI project?

3
OK - finally got it :)

NGUIMath.CalculateRelativeWidgetBounds (Transform root, Transform child)

It was right in front of me but I missed it.  Thanks for the help ArenMook. I hope this thread is helpful for anyone trying to do something similar to what I am!

4
You wouldn't make your quick return header a part of the scroll view. It needs to be separate, or at best it will be clipped, and at worst it will interfere with the scrolling logic as you move it around. Create a separate panel with a depth higher than the scroll view, and put your quick return header there. Position the header using math by taking UIPanel's clipOffset into consideration (or just finalClipRegion). It's not a trivial task though, so I can't offer any specifics.
Thanks for the steps -- this is in fact what I've already done!  Perhaps I've overcomplicated my question:  How can I get the position of the topmost object drawn in the scrollview's panel (without knowing what the object is)?  Appreciate your looking into my special case but really I just need to know this one part in order to finish what I've started :)

5
Thanks for giving it a look!! here's some more information about what I'm trying to do (my question, rephrased, at the bottom).  Thank you very much for your time and the great support!



A. UIScrollView in it's "default" state.  Big white rectangle in the background is the screen size. The Grey bar at top os the "Quick Return Header." White numbered Bars are UIWidgets in a table that are visible.  Black Numbered bars are UIWidgets in a table that are not visible (disabled).

B) Big arrow on the left is the directon that the UIScrollView is moving in.  Quick Return Header moves off of the top of the screen with the list.  It will stay roughly where it is moved off, near the top of the screen, as we will see in C.

C) Conceptually, the UIScrollView list moves "past" the quick return header.  This is so that if you start to scroll down again, the Quick Return Header will reappear before you scroll all the way back to the top of the list as shown in D.

D) The list is scrolled down and the Quick return header scrolls down with it (after a certain amount of "play" in the UIScrollView moving down.

E) When the top of the elements in the UIScrollView Table moves down and past the Quick Return Header, it should stick at the top while the elements move down.  They should "spring" back to A after the "drag" represented by the arrow on the left ends.

My question is how to recognize when the E situation has obtained so that I can keep the Quick Return header from moving back up with the UIScrollView table if the user drags it back "up" while it is completely "under" the Quick Return Header

6
NGUI 3 Support / How to get Top of elements ScrollView from another panel
« on: February 19, 2014, 09:02:54 PM »
I'm sure the answer is simple but I have tried comparing the bounds from the ScrollView and the bounds of the element in the different panel (a header I want the scrolled items to scroll under) in order to find out when all of the elements in the scroll view are all lower y on the screen than the header (so I can implement something like a "quick return" header http://stackoverflow.com/questions/17516846/how-to-replicate-header-behavior-of-google-chrome-android-app and know when all of the elements are all below the header so it doesn't need to be "pushed" off the top of the screen).

Pages: [1]