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

Pages: [1] 2 3
1
NGUI 3 Support / PrintedSize returns wrong size
« on: December 18, 2014, 05:26:43 AM »
Hi

I am trying to achieve a chat list with bubbles around the text, and to not just have the bubbles fit the text tightly I am using printedSize from the label. However it seems to return wrong values!

this is my code
// Message placed left
bubbleSprite.width = (int)messageLabel.printedSize.x + Mathf.Abs(bubbleSprite.leftAnchor.absolute) + 50;

I have tried to setup a picture which should illustrate the problem. The blue area is the actual size of the label rect (828), the green indicates what the value of printedSize should be (approx. 794) and the red illustrates the size returned from printedSize (638)

Is there anything I am doing wrong or a call I need to make before retrieving printedSize? (tried messageLabel.UpdateNGUIText(); but no change)

2
NGUI 3 Support / Re: Selecting UIInput field without text selection
« on: October 23, 2014, 08:17:58 AM »
Nevermind, found a solution. I forgot to set the variable input.selectAllTextOnFocus = false;

3
NGUI 3 Support / Re: Selecting UIInput field without text selection
« on: October 23, 2014, 07:42:07 AM »
Did you guys resolve this, because Im facing a similar issue, where I am trying to create a simple text editor where you can press bold, italic etc. and it should be so that you just continue from where you left the text caret. I also get the whole text selected when setting input.isSelected = true


4
NGUI 3 Support / Re: Android Button click hover problem
« on: September 25, 2014, 02:07:34 AM »
Thanks! who'd know it was that simple :D

5
NGUI 3 Support / Re: Caret not showing at started selection
« on: September 24, 2014, 08:23:04 AM »
Never mind. I found that it was due to scaling, because I have a root at 2048 pixels fixed size, and the scaling is then hiding the caret, even though it's there.

6
NGUI 3 Support / Android Button click hover problem
« on: September 24, 2014, 07:55:18 AM »
Hi

I've found a problem on Android which makes buttons go to hover state right after a button is clicked and the button is switched. To make that make sense, let me try to explain.

I have 2 prefabs, which is basically 2 different screens. The two prefabs have a button placed at the same area (top left corner). When I press the button in the first prefab it destroy's that prefab, and instatiate prefab number 2. The button placed at the same area in prefab 2 then sets it's state to "normal", but just after it sets the state to "hover" and thereby the button looks like it is hovered, even though it should not be.

Hope this makes sense.

The problem is only occouring on Android, not iOS or editor. The problem startet to occour after upgrading to 3.7.3

9
NGUI 3 Support / Wierd error in 3.7.3
« on: September 23, 2014, 08:07:30 AM »
Hi

I just found this error is present after upgrading to 3.7.3 from 3.7.1. It happens when I drag across objects with an UIEventTrigger component, which can accidentally happen a lot on mobile devices :)


Failed to call function OnDragEnd of class UIEventTrigger
Calling function OnDragEnd with no parameters but the function requires 1.
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:1065)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1768)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1402)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1474)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:1221)

Failed to call function OnDragStart of class UIEventTrigger
Calling function OnDragStart with no parameters but the function requires 1.
UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
UICamera:Notify(GameObject, String, Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:1065)
UICamera:ProcessTouch(Boolean, Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1720)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1402)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1474)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:1221)


Looks like the inspector for UIEventTrigger do not cater OnDragStart and OnDragEnd, maybe this is the problem??

10
NGUI 3 Support / Caret not showing at started selection
« on: September 23, 2014, 02:37:50 AM »
Hi

I have came across a minor issue, that the UIInput caret "|" is not shown at the beginning of a selection of an input field. In order for it to show you will have to press twice on the input field or write something. The problem is occouring in the editor on both multiline and single line text. On iOS it works on single line input but not multiline, where you also have to click twice or write something (yes I have modified UIInput to hide the input on multiline and password, but also tried this with the original UIInput script).

EDIT: I have hideInput enabled on all instances


 Hope you have a solution :)

11
NGUI 3 Support / Re: UICenterOnChild not Working
« on: August 11, 2014, 03:07:13 AM »
It seems that it does not receive the OnDragFinished event. I have a simple setup

- ScrollView
-- UIGrid with UICenterOnChild
--- Widget with Collider and DragScrollView (hereunder a label and a texture)

Hope this helps you to identify the issue

12
NGUI 3 Support / UIinput, hideinput and autocorrect
« on: July 29, 2014, 05:42:45 AM »
Hi there

There seems to be a problem with auto-correct not working when input is hidden, is this a common issue, or just me? Have tested it on both iOS and Android. EDIT: I have tried using both only NGUI to test it and manually opening the keyboard, nothing seems to work. Guess it is a limitation with Unity :(

another issue that I have come across, when input is not hidden, the iOS input field is floating above the keyboard, is this something anyone have noticed? and have anyone solved it? (see attachment)

13
It is due to how NGUI captures input from the keyboard and how autocapitalization works on iOS. For a workaround, see my post here http://www.tasharen.com/forum/index.php?topic=9960.msg47765#msg47765

14
It is related to the way that autocapitalization works in iOS and how NGUI is getting it's inputs. For a workaround see my answer here http://www.tasharen.com/forum/index.php?topic=9960.msg47765#msg47765

15
NGUI 3 Support / Re: NGUI 3.6.4 - iOS - UIInput: Hide input
« on: June 30, 2014, 03:03:48 AM »
Now we can just hope for Unity to make a fix for it, I found a suggestion for it on Unity Feedback http://feedback.unity3d.com/suggestions/touchscreenkeyboard-auto-capitalization-support

Pages: [1] 2 3