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

Pages: [1] 2 3 ... 7
1
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: November 14, 2013, 11:28:08 AM »
For me at the moment the bigges issues are the anchor / stretch system (Extended my own versions) and the Depth ordering is making me going crazy.
If i have to set the offset of the UIAnchor to -50 after changing the font to make it re-appear ... that total wrong.

2
NGUI 3 Support / Re: Upgrading to 3x....Did I miss the first step?
« on: November 11, 2013, 03:57:22 AM »
Like the instructions are saying: 1. Start a new scene.

If you not having the scene with NGUI loaded while deleting and replacing the folder the references will not get lost.

If you do not open an new scene first you get what you got so far ... a lot of missing refferences.

3
NGUI 3 Support / Re: How to dynamically update a atlas?
« on: August 21, 2013, 07:04:41 AM »
Why do you not create an atlas for the items extra? (or multiple atlas if you have a lot items).
Its depending of how big the textures for the items are.

4
NGUI 3 Support / Re: Is it possible to tween all objects within a panel?
« on: August 02, 2013, 09:40:16 AM »
Its very easy to build a tweener for panel alpha. (Took me 1 minute)

(Converted form the normal alpha tween script)
  1. using UnityEngine;
  2.  
  3. /// <summary>
  4. /// Tween the panels's alpha.
  5. /// </summary>
  6.  
  7. [AddComponentMenu("NGUI/Tween/PanelAlpha")]
  8. public class TweenPanelAlpha : UITweener
  9. {
  10.         public float from = 1f;
  11.         public float to = 1f;
  12.  
  13.         Transform mTrans;
  14.         UIPanel mPanel;
  15.  
  16.         /// <summary>
  17.         /// Current alpha.
  18.         /// </summary>
  19.  
  20.         public float alpha { get { return mPanel.alpha; } set { mPanel.alpha = value; } }
  21.  
  22.         /// <summary>
  23.         /// Find all needed components.
  24.         /// </summary>
  25.  
  26.         void Awake () { mPanel = GetComponentInChildren<UIPanel>(); }
  27.  
  28.         /// <summary>
  29.         /// Interpolate and update the alpha.
  30.         /// </summary>
  31.  
  32.         override protected void OnUpdate (float factor, bool isFinished) { alpha = Mathf.Lerp(from, to, factor); }
  33.  
  34.         /// <summary>
  35.         /// Start the tweening operation.
  36.         /// </summary>
  37.  
  38.         static public TweenAlpha Begin (GameObject go, float duration, float alpha)
  39.         {
  40.                 TweenAlpha comp = UITweener.Begin<TweenAlpha>(go, duration);
  41.                 comp.from = comp.alpha;
  42.                 comp.to = alpha;
  43.                 return comp;
  44.         }
  45. }

5
NGUI 3 Support / Re: Asset Server and NGUI
« on: August 02, 2013, 05:30:38 AM »
You could use Mercurial + the Cache server , works fine without any problems.
I had trouble with the asset server myself , so switched to Mercurial.

6
NGUI 3 Support / Re: My NGUI suggestions.
« on: July 19, 2013, 02:34:15 AM »
Thanks for sharing ShinyMark, but did you read the head of the file you posted?

  1. //----------------------------------------------
  2. //            NGUI: Next-Gen UI kit
  3. // Copyright © 2011-2012 Tasharen Entertainment
  4. //----------------------------------------------

You are not allowed to distribute NGUI code.

You could send it to the NGUI Author or publish a diff file.

7
NGUI 3 Support / Re: circular scroll menu... is this possible?
« on: July 18, 2013, 02:33:37 AM »
NGUI does not have a prebuild component for that type of menu.
Nobody is hindering you to build it on your own.

8
NGUI 3 Support / Re: Panel's Alpha property to sub-panels
« on: July 17, 2013, 03:00:14 AM »
Why you don't buld a script that handles that for you?
Should not be much work.

Just make a script on the top level Panel that checks if the Alpha property changed and the goes by all child panels and apply the value.

9
NGUI 3 Support / Re: NGUI License Question
« on: July 17, 2013, 02:48:18 AM »
How i did understand ti t you can sell anything you make.
Just be sure not to include any NGUI code.
You can make your class inherit form an NGUI class.
Just make your package and make sure not to include anting form NGUI.
This will work because of every one who like to use it should have NGUI installed in the project.
(Hope this is correct , if not ArenMook will fix it  :) )

10
Do not post NGUI code in the form.
Send a email to support at tasharen.com with UISprite.cs attached.

11
NGUI 3 Support / Re: Need help in ToolTip implementation
« on: July 09, 2013, 05:12:49 AM »
The problem is on a touch base device there is not mouse -> Not mouse that can hover over an element  -> no OnHover event.

12
With the Quality settings i mean the unity Quality settings : Edit -> Project settings -> Quality.

13
This looks for me like an perfect opportunity to use a Sliced Sprite (UISliced Sprite).
Just make it one sprite and play around with the Border Settings and you will be happy.

About compression: NGUI atlas are not compressed but if you have the Quality very low the setting for Texture quality is maybe not set to full res.

For the padding i would recommend a value of 8 pixels (that that works fine for me).

14
NGUI 3 Support / Re: slider problem
« on: June 27, 2013, 03:29:30 AM »
Are you sure that the slider is on the correct layer?
The layer of the slider object have to match the Event Reseiver Mask at the UICamera.
If this does not match the slider cant get any interaction events.

15
NGUI 3 Support / Re: UIStretch Oddities
« on: June 27, 2013, 03:22:56 AM »
I had the same problem but i created a script for that.

Just ad it to the Button gamobject and assign the background graphic to the targetTransform variable if the background sprite is not calld Background

(created for usage with UISlicedSprite background sprites)

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. [ExecuteInEditMode]
  5. [AddComponentMenu("NGUI/Helper/Collider Updater")]
  6. public class UpdateCollider : MonoBehaviour
  7. {
  8.        
  9.         public Transform targetTransform;
  10.         private BoxCollider cachedCollider;
  11.         public Vector2 sizeoffset = new Vector2 (1, 1);
  12.         public float depth;
  13.         /// <summary>
  14.         /// Getting Stuff Cached
  15.         /// </summary>
  16.         void Start ()
  17.         {
  18.                 if (targetTransform == null) {
  19.                         targetTransform = transform.FindChild ("Background");
  20.                 }
  21.                 if (this.GetComponent<BoxCollider> () != null) {
  22.                         cachedCollider = this.GetComponent<BoxCollider> ();
  23.                 }
  24.         }
  25.        
  26.         /// <summary>
  27.         /// Update the possition of the collider according to the sice of the target UISlicedSprite.
  28.         /// </summary>
  29.         void Update ()
  30.         {
  31.                 if (targetTransform != null) {
  32.                         cachedCollider.size = new Vector3 (sizeoffset.x * targetTransform.localScale.x, sizeoffset.y * targetTransform.localScale.y, targetTransform.localScale.z);
  33.                         cachedCollider.center = targetTransform.localPosition;
  34.                         if (targetTransform.GetComponent<UISlicedSprite> () != null) {
  35.                                 switch (targetTransform.GetComponent<UISlicedSprite> ().pivot) {
  36.                                 case UIWidget.Pivot.Bottom:
  37.                                         cachedCollider.center += new Vector3 (0, sizeoffset.y * targetTransform.localScale.y / -2, depth);
  38.                                         break;
  39.                                 case UIWidget.Pivot.BottomLeft:
  40.                                         cachedCollider.center += new Vector3 (+sizeoffset.x * targetTransform.localScale.x / 2, sizeoffset.y * targetTransform.localScale.y / 2, depth);
  41.                                         break;
  42.                                 case UIWidget.Pivot.BottomRight:
  43.                                         cachedCollider.center += new Vector3 (sizeoffset.x * targetTransform.localScale.x / -2, sizeoffset.y * targetTransform.localScale.y / 2, depth);
  44.                                         break;
  45.                                 case UIWidget.Pivot.Top:
  46.                                         cachedCollider.center += new Vector3 (0, sizeoffset.y * targetTransform.localScale.y / -2, 0);
  47.                                         break;
  48.                                 case UIWidget.Pivot.TopLeft:
  49.                                         cachedCollider.center += new Vector3 (sizeoffset.x * targetTransform.localScale.x / 2, sizeoffset.y * targetTransform.localScale.y / -2, depth);
  50.                                         break;
  51.                                 case UIWidget.Pivot.TopRight:
  52.                                         cachedCollider.center += new Vector3 (sizeoffset.x * targetTransform.localScale.x / -2, sizeoffset.y * targetTransform.localScale.y / -2, depth);
  53.                                         break;
  54.                                 case UIWidget.Pivot.Left:
  55.                                         cachedCollider.center += new Vector3 (sizeoffset.x * targetTransform.localScale.x / 2, 0, depth);
  56.                                         break;
  57.                                 case UIWidget.Pivot.Right:
  58.                                         cachedCollider.center += new Vector3 (sizeoffset.x * targetTransform.localScale.x / -2, 0, depth);
  59.                                         break;
  60.                                 case UIWidget.Pivot.Center:
  61.                                         cachedCollider.center += new Vector3 (cachedCollider.center.x, cachedCollider.center.y, depth);
  62.                                         break;
  63.                                 }
  64.                         }
  65.                 }
  66.         }
  67. }
  68.  

Pages: [1] 2 3 ... 7