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

Pages: [1] 2 3 4
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 / Re: Emoticon aspect ratio
« on: August 30, 2014, 10:58:08 AM »
Ahh - indeed you're right. It turns out I had a rogue transform scale on one of the objects in the hierarchy.
Sorry for the false alarm :(

4
NGUI 3 Support / Re: Emoticon aspect ratio
« on: August 29, 2014, 09:32:22 AM »
Hmm, I'm not seeing that changing the padding affects the shape of the Emoticons, only the offset within the label and the overall size.
I'm also not seeing it update until I restart the game.

Is this a feature that only works with dynamic fonts or something?

5
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?

6
NGUI 3 Support / Re: UIScrollView Jumps on button click
« on: August 13, 2014, 01:48:18 PM »
So, the intricacies of the input processing for key presses and how ProcessTouch() works are still a bit beyond me, but I did find what appears to be a solution...

It seems that this code that processes the submit press/unpress:
  1. if (submitKeyDown || submitKeyUp)
  2.       {
  3.          currentScheme = ControlScheme.Controller;
  4.          
  5.           currentTouch.last = currentTouch.current;
  6.           currentTouch.current = mCurrentSelection;
  7.          
  8.          
  9.          ProcessTouch(submitKeyDown, submitKeyUp);
  10.          currentTouch.last = null;
  11.       }
  12.  

Guarantees that when the un-press happens, currentTouch.current is not equal to currentTouch.last.

This in turn triggers this code:
  1.         // If the drag process hasn't started yet but we've already moved off the object, start it immediately
  2.                         if (!currentTouch.dragStarted && currentTouch.last != currentTouch.current)
  3.  

This ultimately means that Drag() gets called on the scroll view, which seems to be looking at mouse/touch deltas or something and coming up with some bogus values that aren't relevant.

My solution was to swap these two lines around, which has the end result that a submit key release won't be considered a "drag" event at all:

  currentTouch.last = currentTouch.current;
  currentTouch.current = mCurrentSelection;

Does that seem like an appropriate fix?

7
NGUI 3 Support / Re: UIScrollView Jumps on button click
« on: August 13, 2014, 11:32:45 AM »
I shuld also note that the jump seems more or less severe based on where the mouse is at the time on the screen.
Feels like the wires are being crossed a bit here, I just haven't nailed down exactly how.

8
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!


9
NGUI 3 Support / Re: Some contributions (unified diff attached.)
« on: August 08, 2014, 08:01:22 AM »
Ok, thanks!

10
NGUI 3 Support / Re: Some contributions (unified diff attached.)
« on: August 07, 2014, 07:31:21 AM »
Thanks for considering these changes.

Regarding 1: Creating a whole screen collider as you describe is what I was referring to as "messing with colliders." This also doesn't account for buttons that are selected with a controller - having a collider over them doesn't prevent the keyboard/controller from changing the selection or pushing buttons. Technically, one can work around this by selecting 'null' during the period where you want input to be disabled - but this can have unwanted visual side-effects. For instance, when the Steam overlay pops up, I don't want to visually de-select the active UI element - I just want the input disabled. There's also a time when I want to "debounce" dialogs for a brief period so the user doesn't inadvertantly click a button as soon as it pops up,but without literally de-selecting the buttons in the dialog visually. This change adds 3 lines of code and solves all of these issues elegantly.

Regarding #3: Here is an example of a scrolling list with a soft-clip before the change. The soft clip region at the top is factored into the constraints, creating an unwanted offset from the top of the panel:


And here is the correct version with the list elements properly flush with the top of the panel:


I think this usage case for soft clipping as a region *inside* the panel, is probably fairly typical for lists that look like IOS scrolling lists.

11
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

12
NGUI 3 Support / Re: Stacked UI panels with key bindings
« on: May 31, 2014, 01:21:18 PM »
Hmm, but I don't always want to hide a previous window. A trivial example is a model yes/no dialog.

Thanks for the speedy reply; sounds like I'll need to build my own solution.

13
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.

14
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?

15
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.

Pages: [1] 2 3 4