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

Pages: [1]
1
NGUI 3 Support / Re: Using DPAD with UIScrollBar
« on: December 13, 2016, 02:54:50 PM »
Hello

Sorry in the time to get back. We have been crazy with the PS4 port. When it's complete I'll send a full list of mods I've made to NGUI. There's only a couple, and they may be rejected, but they were what was needed to fully convert a touch game to dpad.

So with the problem I have right now - the pan control & dpad up / down are the same control.

I have a UIScrollView which has a UIGrid underneath. Inside that UIGrid I have a selection of UIButtons which all have UIKeyNavigation items on them and I can select the buttons up and down. What I want is, as I select the buttons I want the UIScrollView to always show the highlighted button.

However I am detecting OnPan messages coming to my UIScrollView which is then sent to the vertical scroll bar which then pans all of the content so my highlighted buttons scroll out of view. I'm wondering if there's a way I can ensure that the UIScrollView always displays the highlighted button?

2
NGUI 3 Support / Using DPAD with UIScrollBar
« on: October 27, 2016, 09:17:56 AM »
I am almost complete with porting my game over to DPAD with NGUI. Just one last thing.

The game uses UIScrollBar and has prefabs inside which are selectable buttons. If I move the controller up or down, the selected button moves fine. However it also moves the scroll bar too (I have Pan set to horizonta as well). Is it possible to adjust UIScrollBar so that it keeps whatever is hovered over, central inside the UIScrollBar in view? Obviously if it's the first, or last item, then it should still be at the top / bottom of the UIScrollBar.

Essentially I need to decouble pan as it's being used by whatever has hover in the window.

That way, in controller mode, I could select the different objects and the scroll bar would auto scroll as I went through them

3
NGUI 3 Support / Re: Custom glyphs in Font coming out odd sizes & shapes
« on: October 05, 2016, 11:55:13 AM »
I got to the bottom of this. The glyph has to be the same height as the point size of the font. You can't throw any old point size and it resizes. Also if you atlas has multiple fonts, with multiple sizes, then you need to include multiple size glyphs to go with those fonts

4
NGUI 3 Support / Custom glyphs in Font coming out odd sizes & shapes
« on: October 05, 2016, 10:21:17 AM »
Hello

I've used TexturePacker to add some custom emoticons to my font and these are appearing in game. However they are scaling to odd sizes, and also offseting in strange ways. The 3 test lines I have are shown:

In the first one the glyph is larger than the font.
In the second it's a bit to small & floating in the air
The final one is the test font that is provided with NGUI as a test.

I'm wondering if there's anything I need to do, any care I need, with regard to importing my glyphs? When I edit the sprite in the font I can see that padding etc is set to 0. The sprite takes up it's full space. It's 82x82 pixels where as the built in sprite is 20x20 pixels. Is there any magic thing I need to look out for?

5
Thanks. The UIKeyNavigation component is working well however it doesn't handle the case that I need. Which is:

1. User has two buttons, side by side, user uses dpad to navigate to button 2 (on the right) which they click
2. Continue button now appears below the two buttons, I want to automatically navigate to the new continue button so it's a button click to leave the screen rather than a dpad down then button click
3. I need to teleport focus / hover to the continue button have it hover, do it's animations etc.

I'll try the UICamera.controllerNavigationObject to see if that works.

6
Hello,

I am well underway porting to dpad and there are occasions where I want to reveal a button and to teleport focus on it - this includes having it highlight. Current I am activating it then using

UICamera.hoveredObject = newlyActivatedObject;

This seems to work in the majority of cases however I'm finding that often the hover state (if I have a hover tween texture) isn't set even though focus is on that button. Is there a more "official" way I should be teleporting focus around the screen when navigating by dpad?

7
Hello

Basically as the topic states. I have a button which I can navigate to using my dpad. However I want more than simply click. I want, if it's highlighted, to pick up up/down and to call two separate functions based on whether the up/down is called. I guess I could have my own script which checks what is highlighted in NGUI and then checks for joystick up/down and calls relevant functions but was wondering if this functionality is available in NGUI already? It looks similar to sliders.

8
Is there a way of teleporting the mouse pointer to the button selected with DPad at all? Am converting some UI to DPAD and it's going well but I'd like the mouse cursor to follow the d-pad selection.

Pages: [1]