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

Pages: [1]
1
NGUI 3 Support / Re: Disable Tweencolor on UIButton
« on: August 30, 2012, 01:20:41 AM »
Can't you just remove the color component? Or just toggle of the checkbox for the color component?

2
NGUI 3 Support / Re: Objects Display Issues
« on: August 22, 2012, 08:57:51 AM »
Do a couple of standard checks
- Are both the background and the checkbox texture in the same atlas? If not, set so the checkbox texture Z-value to be closer to the camera.
- Are they both under the same UIPanel? if yes, make sure the CheckBox texture has a higher depth than the background. If not, set so the checkbox texture Z-value to be closer to the camera.

3
NGUI 3 Support / [BUG] Anchoring to widgets that has a parent
« on: August 17, 2012, 02:03:33 AM »
Hi I've notice a pretty annoying bug, which I hope you can resolve for next NGUI patch.

I want to anchor different groups of widgets to each other and thought of the following solution, but it bugs.

Let say I have a Empty GameObject as a parent and under it I have a BackgroundWidget, a LabelWidget and a IconWidget. Since I want those widget to stick together its of course nice to have a parent for them so I can move them around together.

Now to the issue. I have another Empty GameObject Parent, with similar/other Widgets as childs and want to anchor the second gameobject parent (and all its widgets) under the first one. To be able to anchor the second game object parent under the first group of objects I need to know the size. Since the BackgroundWidget covers all the widgets, this is perfect to anchor too. So I put my Anchor Script to the Second Empty GameObject Parent and link it to the BackgroundWidget (slicedsprite) in the first group of gameobjects.

Now that should work perfectly I hoped, but the anchoring is totally messed up. It doesn't take the parents position into consideration, so anchoring only work for gameobjects that has the same parent. If I move the first Parent around the second group of gameobjects doesn't move even if they are anchor to the backgroundwidget (which changes position when I move the parent) becuase the localposition of the background widget stays the same. The position on the anchored group only changes if I change the localposition on the backgroundWidget and not the parent position.

I hope you understand the issue. Thanks

4
NGUI 3 Support / Anchoring Widgets to Label Widgets
« on: August 16, 2012, 04:14:03 AM »
Hi I'm currently having two text with different Sizes and I want the second text to anchor to the right of the first text. However the anchoring is static and doesn't change as I increase the length of the text, it only affects the Scale of the text, not the size. I'm guessing I will have the same issue, if I for example want to anchor a small icon to the right side of a text. Can you fixed so when anchoring to labels it calculates the actual size of the text so anchoring works out properly.

Thanks

5
NGUI 3 Support / [BUG] In scrollbar when changing elements in list
« on: August 10, 2012, 08:44:19 AM »
Hi NGUI,
I'm currently working with a text based inventory. It looks similar to the Quest Log tutorial made by you. I use however nested tables, which allows me to have dropdownlist under a dropdownlist. I first had trouble getting the table to reposition correctly, but solved it with adding a line of code in the reposition function that checks for table in the gameobjects parents and reposition those as well.

Now to the bug. I've added a scrollbar to the table allowing me to scroll when the list gets to large (elements get clipped). This works out fine until I close a tab in the list (similar to when you close a quest in your questlog example) while the scroll is in the bottom.

So to clarify: If I expand all items in the list the Scrollbar appear (since the list is so big). If the scroll button in the slider is at the top when I close a element, everything works fine and the scroll button in the slider expands to fit the table size since it doesn't have to scroll as much to see all elements in the list. If however the scrollbutton in the slider is at the very bottom and I after that close on of the tabs the scrollbar updates in the wrong direction. Its hard to describe better but instead of expanding upwards, it expands downwards making everything in the list jump a lot when I touch the scroll button in the slider.

So can you make a fix so the scrollbar and the table updates correctly when the scrollbutton is in the bottom of the slider and the elements in the table gets reduced so the slider size have to change.

Thanks,
Martin


*EDIT* Just tested your Quest Log example and you actual have the same problem there so you can easily test it yourself. Just expand all the items in the table, scroll down and minimize one of the element. The scroll then incorrectly updates and if you start drag the scroll you can see a major jump and reposition.

6
NGUI 3 Support / Re: How Can I use Dynamic size button
« on: August 01, 2012, 04:43:22 AM »
Its because you have checked/unchecked the "Automatic" checkbox in the UI Root settings.

Depending on that checkbox your GUI objects will either remain the size you specified or be resized to cover the same screen area no matter what resolution you use.

7
NGUI 3 Support / Dynamic tooltips with localization
« on: August 01, 2012, 04:40:20 AM »
Hi, there might be a simple answer to this question, but I haven't been able to find a smooth solution yet.

In my game I'm having tooltips to display what my abilities does, including damage, cast time etc. I also have items and talents that affects how much damage the abilities does. I'm having trouble being able to dynamically change the damage value when using localized text. Here is an example to show the problem. When displaying the text in the tooltip I use a function which takes in the text, damage parameter, cast time parameter etc. If I only had it in english, I can simple do like this to have the damage text change depending on the damage variable.

ShowText("Fireball", "[" + NGUITools.EncodeColor(Color.blue) + "]Hurls a flaming ball of fire that deals [" + NGUITools.EncodeColor(Color.white) + "]" + mDamage.ToString() + "[" + NGUITools.EncodeColor(Color.blue) + "]damage. In addition the target will get [" + NGUITools.EncodeColor(Color.cyan) + "]stunned [" + NGUITools.EncodeColor(Color.blue) + "] for a short time.

Now the damage get changed automatically when the mDamage variable is changed. This won't work if I need the text localized in several languages.

The solution I would want is to be able to manually specify codes, similair to the codes used to specify colors; for example a [Damage] code so I simple can do something like this:

UILabel text = GetLocalizedText("Fireball");
text.SetParameter("Damage", mDamage);
ShowText(GetLocalizedHeader("Fireball"), text);


Is this something that is already build in or do I have to code something like this manually?

Thanks

8
NGUI 3 Support / Re: Racing Track Minimap By NGUI
« on: May 30, 2012, 07:14:38 AM »
Anchor a UISprite, showing the map, to the Top Right corner using UIAnchor.
Then manually calculate the position of the players to correctly display them above your minimap and render additional sprite for each player.

9
NGUI 3 Support / Disabled interaction on clipped objects?
« on: May 29, 2012, 04:45:37 AM »
Hi Aren,
And as always, thanks for an amazing GUI tool!

I've working with a scene where we have a listbox full with items and a clipping area so only some of them are visible. Each listbox item is clickable.
Problem is they are still clickable even if they are clipped/invisible (outside of the clipping area). I've seen your example where you have colliders outside the clipping area to prevent this. Its a good solution, but it won't work in my case since I have lots of other clickable buttons around the clipping area, which needs to be clickable, so I can have a collider over them.

Now your thinking; why don't you have those button "over" the colliers. Well its not that simple because the clipping area is part of a popup windows that lies over those buttons in the background, so I need to have the popup in front of the buttons.

Is there any way you can make clipped UI elements to not steal the OnClick events from my other buttons? Or is there any other good solutions to my problem?

kind regards,
Shelt

10
NGUI 3 Support / Re: how to disable resize / rescale
« on: May 21, 2012, 04:33:07 AM »
Make sure to have the "Automatic" option unchecked in the UIRoot

11
NGUI 3 Support / Re: OnTooltip
« on: April 17, 2012, 01:27:32 AM »
I have to get back to you on this Aren; still having issues with OnTooltip.

Even if I create a new project, import NGUI and open your example scene with the character and inventory, I still get this issue with OnTooltip still being called even if I constantly move my mouse.

I have tried narrow the problem down and found out that the code never gets into this if-statement in the UICamera.cs

  1. if (i == 0 && currentTouch.pos != lastTouchPosition)
  2. {
  3.         if (mTooltipTime != 0f) mTooltipTime = Time.realtimeSinceStartup + tooltipDelay;
  4.         else if (mTooltip != null) ShowTooltip(false);
  5.         currentTouch.pos = lastTouchPosition;
  6. }
  7.  

When debugging it seems currentTouch.pos is always the same as lastTouchPosition, preventing the timer from reseting, which it should when the mouse is in constant moving.

There still might be some problems on my side, but seems so strange that I get the same issue if I create a new project and import NGUI and just try out the tooltip in your character scene...

12
NGUI 3 Support / OnTooltip
« on: April 16, 2012, 03:34:42 AM »
Hi!
I've a couple of gui elements that triggers a tooltip when hover them after 0.2 sec. It was a couple of weeks before I worked with them the last time, today however I noticed that they all got visible even though I was constantly moving the mouse; meaning OnTooltip still gets called even if the mouse is in movement. From the comment for the OnTooltip event it states that it should only be called if the mouse hovers over a collider for some time without moving.

Has this been changed for NGUI or is it me that have messed something up?

*EDIT*
I come up with another question as well. Is it possible in a smooth way to Anchor a Tooltip to a gameobject. Im working on a tooltip script that allows you to specify if the tooltip should be displayed Top, TopLeft, TopRight, Left... etc. from the gameobject which the script is attached to. Currently its a real fuzz to calculate the screen position of the gameobject, the screen size of the gameobjects boundary box, the Tooltip screen size and from there set the Tooltip Position.

Any thoughts on how to solve this without doing massive calculations?



Thanks,
Shelt

13
NGUI 3 Support / Labels in different Resolutions
« on: April 12, 2012, 09:07:17 AM »
I'm about to investigate if there will be any problems with label text when changing resolution. The major problem i'm concerned about is if the label with get blurry if scaled down to much or scaled up to much when only using one font texture. Just wanted to get some quick thoughts before I begin to save some time.

Could the best way to handle this have several textures of the same font but with different font sizes and change the texture used on all labels in the game when the user changes resolution? For example have font textures for font size 10, 15, 20, 25, 30, 40 and 50?

If that is the way to go I see problem in massive texture charts if I for example want to add a Chinese font with lots of characters and then have to multiply the texture with 7 to have clean texts in game for all resolutions.

I would like some comments and thoughts for you!

Thanks,
Shelt

14
NGUI 3 Support / Re: NGUI 2.00
« on: April 12, 2012, 08:51:18 AM »
Hi Aren!
Great to see that you are adding scroll bars! Any thoughts of expanding the dropdown class to be able to support scroll list if the amount of dropdown items is greater then a value you can specify? Would be great in for example an option menu where you want to have a dropdown to change the resolution, so you don't get a huge dropdown list because the amount of resolution choices and you only want X amount to be visible.

Thanks for a great asset!
regards,
Shelt

Pages: [1]