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

Pages: [1] 2
1
NGUI 3 Support / Emoticon font symbol size/placement
« on: August 14, 2015, 04:52:17 PM »
I'm seeing an issue with my emoticons where some of them are non-centered, and most of them are smaller than I'd like them to be.

I'm on an older version of NGUI (3.7.6) so I hesitate to ask for support - but could someone point me towards the relevant code that arranges the emoticons within labels so I could dig into this? Or alternatively, could you let me know if there an easy way with the latest version to control the scale/offset of emoticons relative to the font they're in?

Thanks in advance.

2
NGUI 3 Support / Unsupported characters in labels
« on: September 08, 2014, 01:21:18 PM »
Is it possible to control the behavior of labels when they're populated with characters that are unsupported by the font?

Specifically, for labels with bitmap fonts.

I'm dealing with Playstation TRCs, and there's a requirement that a single replacement character is used throughout the program for situations where unsupported characters are used (for example, in leaderboard usernames.)
It's not clear to me currently if the current behavior of simply removing unsupported characters will be acceptable.

Thanks!

3
NGUI 3 Support / Emoticon aspect ratio
« on: August 27, 2014, 05:31:51 PM »
Our emoticons seem to be only showing up in our font with a square shape. Is this by design - or should we expect that the shape it would take in the label would match the aspect ratio of the source image?

4
NGUI 3 Support / UIScrollView Jumps on button click
« on: August 13, 2014, 11:14:54 AM »
I'm seeing an issue in 3.68 where, when I select a button in a draggable scrollview with a controller or the enter key, the list suddenly jumps upon release of the button.

I'm still investigating the exact cause here. It seems that releasing a key sends a series of events that eventually causes the panel to start a Drag() event, and a raycast results in a non-zero offset.
It's not clear to me if it's intended that a key press should result in a drag like this that seems to be looking at drag/touch values.

I'll reply here if I can determine with more accuracy what's going on, but if anyone's seen this type of thing or has any ideas, I'd love to hear!


5
NGUI 3 Support / Some contributions (unified diff attached.)
« on: August 06, 2014, 02:25:51 PM »
I made some changes that I believe would be generally useful for NGUI users.

1. Added a "disableInput" public static bool to UICamera, which will signal NGUI to ignore all input. Useful for things like loading screens that happen on top of panels, etc. This is significantly simpler than messing with colliders to achieve the same effect.

2. Added a simple interface class with a GetAxis() function to UICamera, which can be replaced at runtime with a custom input provider that uses something other than Input.GetAxis(). I needed this to be able to plug in the cInput asset store plugin - and it'll be useful for console controller implementation too where the game might want to provide UI input from several axes.  One could take this a step further and replace all Input.X functions to allow even more flexibility. The "CustomInput" delegate provided by NGUI is insufficient for these purposes.

3. Added an "ignoreSoftClip" option to UIPanel.CalculateConstrainOffset, for situations where you don't want the soft clipping to affect the offset of the constraints.  Used this option for UIScrollView, as it seemed that list items shouldn't be offset by the soft clipping region by default. I'm actually not sure why this function should consider the soft clip region for constraints in any cases.

Here are the changes in a unified diff file as applied to version 3.6.8:
https://dl.dropboxusercontent.com/u/41564278/aaronNGUIChanges1.diff

-Aaron

6
NGUI 3 Support / Stacked UI panels with key bindings
« on: May 31, 2014, 08:05:46 AM »
I have a situation where several panels will "stack" on top of each other. For instance, a modal dialog will pop up on top of an options screen, which is overlaid on the main menu.

Each of the "stacking" screens will have a "back" button which I'd like to bind to a key or controller button.
Each of the panels is still active in the stack, but I'd like just the topmost to be reacting to key presses.

Is there a built-in component that could handle this situation gracefully? I've been using UIKeyBinding, but it seems to listen for key presses any time it's active. I was thinking about building a custom subclass that builds a stack of "active" listening buttons, and only letting the top-most react. But I'd like to know how others tackle this.

7
NGUI 3 Support / Single frame of full alpha using Alpha tween
« on: May 29, 2014, 06:49:14 PM »
I'm using version 3.0.9 f7.

I have an object with a UIPanel attached, and an alpha tween component that goes from 0 to 1.
I'm using a UIPlayTween component to activate this Tweet, with the setting to enable the object.

What I'm seeing is that the panel becomes active for one frame with a default alpha of 1, and then the tween activates.
Is there a way to fix this, other than ensuring that the alpha is at 0 on startup in this panel?

8
NGUI 3 Support / Tip: Keeping up-to-date with latest NGUI with SVN
« on: January 31, 2014, 11:37:41 AM »
So I'm always asking for help here, I thought I'd give something back :)

We use subversion for our project and don't have git access to NGUI.  I also have several local modifications to NGUI, which has made keeping up-to-date a bit of a pain.

Here's a method for updating that seems to work pretty well so far. This will probably seem pretty basic to any source-control gurus.

First, Create a separate project called "NGUI_Trunk", and import whatever version of NGUI you're currently using into it. Skip the "Examples" directory and anything else that's not in your project. Check this into svn.

Now when it's time to upgrade NGUI - here's what you'll do:
1. Go through the upgrade process as prescribed for NGUI.
2. Browse to the NGUI directory, and use this on the commandline:

"svn diff > mychanges.diff"

This will create a patch file that consists of all the changes made in NGUI since your last update.

3. Copy this .diff file to your project's NGUI folder, browse there, and use:

"patch -p0 -i ./mychanges.diff"

This will apply all the changes to your local project.

4. Review the changes and check in both projects.

I don't know if this is the "right" way to do this, but it's a lot less painful than manually re-entering your local changes after an update.

9
NGUI 3 Support / Request: Font Scale in Bitmap font widgets.
« on: January 29, 2014, 05:32:47 PM »
Short version: It would be super handy to have a "font scale" option for labels that use bitmap fonts.

Long version:
Having recently upgraded from NGUI 2.3x to the latest 3.x - I really like the new widget system with width and height.

However, there's one case it's proving a bit hard to work with: Bitmap fonts.

We have a single bitmap font, created at a fairly large size to handle a variety of font size needs in our UI.
Our general flow with 3.x is to set a label height that gives the results we want for the zize of that particular label, and then use a "shrink to fit" setup.

However - there are a few cases where the contents of a text box are unknown during the UI design - for instance in generic dialogs. The "shrink to fit" option here ends up drawing HUGE letters in the case where there's not much text, and tiny letters with lots of text.

We could use the widget transform scale values to scale down the font so that the maximum size matches the desired letter height.
But transform scale seems like the wrong way to do things in the new UI.

Thoughts?

10
NGUI 3 Support / UIPlaySound doesn't support controllers (fix)
« on: January 28, 2014, 04:08:37 PM »
It seems UIPlaySound with the "OnMouseOver" doesn't trigger when the button is selected - and there doesn't appear to be an option to enable this that I can see.

Here's the fix I employed, which mirrors the functionality in UIButtonColor:

protected virtual void OnSelect (bool isSelected)
   {
      if (enabled && (!isSelected || UICamera.currentScheme == UICamera.ControlScheme.Controller))
         OnHover(isSelected);
   }

11
NGUI 3 Support / Confusing UITweenPlay behavior
« on: January 24, 2014, 05:45:49 PM »
The UITweenPlay component has a Condition, and a separate play direction setting.

However, it seems that the OnHover() function implicitly assumes that if the Hover is ending, the direction should be reversed.
So, using a play direction of "reverse" with "on hover exit" results in a forward play.

Is this a bug?

12
NGUI 3 Support / Trigger tween with Hover OR select
« on: January 24, 2014, 03:34:46 PM »
I have a tween on a button that I'd like to trigger when the mouse hovers over the button, or when it's selected via UIButtonKeys.
I'd then like to trigger the reverse tween when the button becomes de-selected/de-hovered.

Is there an easy way to accomplish this?

13
NGUI 3 Support / 2.3.1-> 3.x upgrade woes: font size
« on: January 20, 2014, 11:12:50 PM »
I've spent the day attempting a 2.3.1 upgrade to the latest 3.0.9f version. I've been reading upgrade notes, various posts here, and watching the upgrade video.

One thing I didn't see mentioned was how to correctly update the various labels.
For us, it seems that virtually every label is scaled up to 3x or so the original size.

It seems there are a variety of posts here from folks having similar issues. Could someone summarize what exactly is going on?

We were using the widget scale to set the individual size of our text, and I understand that the upgrade process changed the scale of all of the label widgets to <1,1,1>. But it doesn't seem like it took the original scale into account when deciding what the width/height dimensions of the upgraded widgets would be.

Am I missing something? Were all of these setup incorrectly before? Is there no way for the upgrade scripts to figure out how to convert one to the other, and do I need to go through my UI and manually fix all of these?

Also - would it have been better to do this upgrade in a multi-step process between versions - and if so, how could I get my hands on an in-between version at this point?

Thanks for any advice!

14
NGUI 3 Support / Issues with Linux (older NGUI)
« on: January 12, 2014, 10:32:08 AM »
Hey all,
First - we are on an *extremely* old version of NGUI: 2.3.1.

We've been getting frequent reports from Linux users of problems with the UI disappearing. It seems very inconsistent, sometimes happening for a user in one session and then not in another. It's happening on a variety of Linux distros and video cards: Arch64, Debian, Manjaro linux x64, Ubuntu. Most of these reports come from people with capable machines, with SM3 graphics cards.

We've recently upgraded to Unity 4.3.1, and the problem persists.

I'm wondering if this rings a bell for anyone? Does it seem likely that upgrading to the latest NGUI might address any of these issues?

15
I ran into an issue where my clipped, draggable panel, which works fine in Ortho mode, doesn't work properly in Perspective mode. The depth is erratic and the items frequently disappear.

My understanding after reading the FAQ, and this thread:
http://www.tasharen.com/forum/index.php?topic=1660.0

Is that the only 100% reliable workaround to guarantee that the contents of my clipped panel are drawn on top, is to have them rendered with another shader that uses a different render queue depth.

I'm just wondering what the practical steps are that people are taking to effect this change, as my understanding of the steps seem really labor-intensive.
So far here's what I've done:
1. Duplicated the Unlit Colored shader, and modified it as described in the linked thread (changed renderqueue to Transparent + 1)
2. Duplicated my main atlas, and changed its material to this new shader (it's unclear what effect this will have on memory. Help?)
3. Gone into each widget in every one of my items that's part of a clipped panel, and changed its atlas to the duplicated one

So far, I think it's working, but now I'm seeing that my text labels aren't rendering at the right depth, so I suppose I also need to duplicate my font to point at the new atlas?

Overall, I'm just really surprised at all of the manual work needed to accomplish such a basic task. Am I missing something?

Pages: [1] 2