code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using UnityEditor; using System.Collections.Generic; /// <summary> /// Unity doesn't keep the values of static variab...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/NGUISettings.cs
C#
asf20
15,891
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using UnityEditor; [CustomEditor(typeof(TweenColor))] public class TweenColorEditor : UITweenerEditor { public overr...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/TweenColorEditor.cs
C#
asf20
766
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using UnityEditor; using System; using System.Collections.Generic; /// <summary> /// This script adds the NGUI menu o...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/NGUIMenu.cs
C#
asf20
18,007
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_3_5 && !UNITY_FLASH #define DYNAMIC_FONT #endif using UnityEngine; using UnityEditor; /// <summary> /// Inspector class used...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/UILabelInspector.cs
C#
asf20
8,912
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEditor; using UnityEngine; using System.Collections.Generic; /// <summary> /// Draw Call Viewer shows a list of draw calls cr...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/UIDrawCallViewer.cs
C#
asf20
5,370
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using UnityEditor; [CanEditMultipleObjects] [CustomEditor(typeof(UIForwardEvents))] public class UIForwardEventsEdito...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/UIForwardEventsEditor.cs
C#
asf20
528
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if UNITY_3_5 using UnityEngine; using UnityEditor; [CanEditMultipleObjects] [CustomEditor(typeof(UITable))] public class UITableEditor ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Editor/UITableEditor.cs
C#
asf20
358
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- // Dynamic font support contributed by the NGUI community members: // Unisip, zh4ox, Mudwiz, Nicki, DarkMagicCK. #if !UNITY_3_5 && !UNIT...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIFont.cs
C#
asf20
14,859
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Simple script that lets you localize a UIWidget. /// </summary> [ExecuteInEditMode] [RequireCompon...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UILocalize.cs
C#
asf20
2,273
//-------------------------------------------- // NGUI: HUD Text // Copyright © 2012 Tasharen Entertainment //-------------------------------------------- using UnityEngine; /// <summary> /// Attaching this script to an object will make it visibly follow another object, even if the two are using d...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIFollowTarget.cs
C#
asf20
3,448
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script can be used to stretch objects relative to the screen's width and height. /// The most ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIStretch.cs
C#
asf20
7,554
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script can be used to restrict camera rendering to a specific part of the screen by specifyin...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIViewport.cs
C#
asf20
1,235
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// This is a script used to keep the game object scaled to 2/(Screen...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIRoot.cs
C#
asf20
5,844
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// This script should be attached to each camera that's used to draw...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UICamera.cs
C#
asf20
43,311
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; using System; [System.Serializable] public class UISpriteData { public string name...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UISpriteData.cs
C#
asf20
2,527
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// If you don't have or don't wish to create an atlas, you can simpl...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UITexture.cs
C#
asf20
5,794
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_EDITOR && (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY) #define MOBILE #endif using UnityEngine; using Sys...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIInput.cs
C#
asf20
29,874
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Convenience script that resizes the camera's orthographic size to match the screen size. /// This ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIOrthoCamera.cs
C#
asf20
1,118
using UnityEngine; using System.Collections.Generic; /// <summary> /// Example script that can be used to show tooltips. /// </summary> [AddComponentMenu("NGUI/UI/Tooltip")] public class UITooltip : MonoBehaviour { static protected UITooltip mInstance; public Camera uiCamera; public UILabel text; public UISprite...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UITooltip.cs
C#
asf20
4,706
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_3_5 && !UNITY_FLASH #define DYNAMIC_FONT #endif using UnityEngine; using System.Collections.Generic; using System; using Alig...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UILabel.cs
C#
asf20
37,049
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if UNITY_FLASH || UNITY_WP8 || UNITY_METRO #define USE_SIMPLE_DICTIONARY #endif using UnityEngine; using System.Collections.Generic; /...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIPanel.cs
C#
asf20
43,207
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; using System; /// <summary> /// UI Atlas contains a collection of sprites inside on...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIAtlas.cs
C#
asf20
11,467
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Sprite is a textured element in the UI hierarchy. /// </summary> ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UISprite.cs
C#
asf20
32,631
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_3_5 && !UNITY_FLASH #define DYNAMIC_FONT #endif using UnityEngine; using System.Collections.Generic; using System.Text; /// ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UITextList.cs
C#
asf20
6,879
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Very simple sprite animation. Attach to a sprite and specify a co...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UISpriteAnimation.cs
C#
asf20
3,114
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_1 && !UNITY_4_2 using UnityEngine; using System.Collections.Generic; /// <summary> /// 2D Spri...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UI2DSprite.cs
C#
asf20
5,649
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_1 && !UNITY_4_2 using UnityEngine; /// <summary> /// Small script that makes it easy to create...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UI2DSpriteAnimation.cs
C#
asf20
1,384
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script can be used to anchor an object to the side or corner of the screen, panel, or a widget...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/UI/UIAnchor.cs
C#
asf20
5,749
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Similar to UIButtonColor, but adds a 'disabled' state based on wh...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButton.cs
C#
asf20
4,918
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Attaching this script to an object will let you trigger remote fu...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIEventTrigger.cs
C#
asf20
2,308
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script, when attached to a panel turns it into a scroll view. /// You can then attach UIDragSc...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIScrollView.cs
C#
asf20
24,341
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections; /// <summary> /// Allows dragging of the specified scroll view by mouse or touch. /// </sum...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragScrollView.cs
C#
asf20
2,639
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections; /// <summary> /// Widget container is a generic type class that acts like a non-resizeable ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIWidgetContainer.cs
C#
asf20
492
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Allows dragging of the camera object and restricts camera's movement to be within bounds of the are...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragCamera.cs
C#
asf20
1,566
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Simple example script of how a button can be colored when the mouse hovers over it or it gets press...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButtonColor.cs
C#
asf20
5,989
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Plays the specified sound. /// </summary> [AddComponentMenu("NGUI/Interaction/Play Sound")] public...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIPlaySound.cs
C#
asf20
1,677
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Extended progress bar that has backwards compatibility logic and ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UISlider.cs
C#
asf20
4,337
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Sends a message to the remote object when something happens. /// </summary> [AddComponentMenu("NGU...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButtonMessage.cs
C#
asf20
1,983
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using AnimationOrTween; using System.Collections.Generic; /// <summary> /// Simple toggle functionality. /// </summar...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIToggle.cs
C#
asf20
5,487
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Deprecated component. Use UIKeyNavigation instead. /// </summary> [ExecuteInEditMode] [AddComponen...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButtonKeys.cs
C#
asf20
1,423
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections; /// <summary> /// Allows dragging of the specified target object by mouse or touch, optiona...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragObject.cs
C#
asf20
7,986
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// When Drag & Drop event begins in UIDragDropItem, it will re-parent itself to the UIDragDropRoot ins...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragDropRoot.cs
C#
asf20
718
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// All children added to the game object with this script will be ar...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UITable.cs
C#
asf20
6,194
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Simple example script of how a button can be offset visibly when the mouse hovers over it or it get...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButtonOffset.cs
C#
asf20
1,732
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Very simple script that can be attached to a slider and will control the volume of all sounds playe...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UISoundVolume.cs
C#
asf20
783
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Works together with UIDragCamera script, allowing you to drag a secondary camera while keeping it c...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDraggableCamera.cs
C#
asf20
6,282
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Example script showing how to activate or deactivate MonoBehavio...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIToggledComponents.cs
C#
asf20
1,538
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Attaching this script to a widget makes it react to key events such as tab, up, down, etc. /// </su...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIKeyNavigation.cs
C#
asf20
5,161
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; [AddComponentMenu("NGUI/Interaction/Drag and Drop Container")] public class UIDragDropContainer : MonoBehaviour { p...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragDropContainer.cs
C#
asf20
357
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script makes it possible for a scroll view to wrap its content, creating endless scroll views....
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIWrapContent.cs
C#
asf20
5,911
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script can be used to forward events from one object to another. /// In most cases you should ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIForwardEvents.cs
C#
asf20
2,270
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Simple progress bar that fills itself based on the specified valu...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIProgressBar.cs
C#
asf20
9,979
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- #if !UNITY_3_5 && !UNITY_4_0 && !UNITY_4_1 && !UNITY_4_2 #define USE_MECANIM #endif using UnityEngine; using System.Collections.Generic;...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIPlayAnimation.cs
C#
asf20
7,592
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Attach this script to a popup list, the parent of a group of toggles, or to a toggle itself to save...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UISavedOption.cs
C#
asf20
2,407
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Turns the popup list it's attached to into a language selection l...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/LanguageSelection.cs
C#
asf20
945
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script makes it possible to resize the specified widget by dragging on the object this script ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragResize.cs
C#
asf20
2,769
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using AnimationOrTween; using System.Collections.Generic; /// <summary> /// Play the specified tween on click. /// </...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIPlayTween.cs
C#
asf20
7,829
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// All children added to the game object with this script will be re...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIGrid.cs
C#
asf20
10,079
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Ever wanted to be able to auto-center on an object within a draggable panel? /// Attach this script...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UICenterOnChild.cs
C#
asf20
5,296
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This class makes it possible to activate or select something by pressing a key (such as space bar f...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIKeyBinding.cs
C#
asf20
3,055
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Popup list can be used to display pop-up menus and drop-down list...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIPopupList.cs
C#
asf20
19,518
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Example script showing how to activate or deactivate a game objec...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIToggledObjects.cs
C#
asf20
1,626
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// UIDragDropItem is a base script for your own Drag & Drop operations. /// </summary> [AddComponentM...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIDragDropItem.cs
C#
asf20
6,167
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Sample script showing how easy it is to implement a standard button that swaps sprites. /// </summa...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIImageButton.cs
C#
asf20
1,914
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Scroll bar functionality. /// </summary> [ExecuteInEditMode] [Ad...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIScrollBar.cs
C#
asf20
4,177
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Attaching this script to an element of a scroll view will make it possible to center on it by click...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UICenterOnClick.cs
C#
asf20
1,161
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Simple example script of how a button can be scaled visibly when the mouse hovers over it or it get...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButtonScale.cs
C#
asf20
1,802
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Simple example script of how a button can be rotated visibly when the mouse hovers over it or it ge...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Scripts/Interaction/UIButtonRotation.cs
C#
asf20
1,790
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections; /// <summary> /// Simple script that shows how to download a remote texture and assign it t...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/DownloadTexture.cs
C#
asf20
829
using UnityEngine; /// <summary> /// Change the shader level-of-detail to match the quality settings. /// </summary> [ExecuteInEditMode] [AddComponentMenu("NGUI/Examples/Shader Quality")] public class ShaderQuality : MonoBehaviour { int mCurrent = 600; void Update () { int current = (QualitySettings.GetQualityL...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/ShaderQuality.cs
C#
asf20
442
using UnityEngine; public class OpenURLOnClick : MonoBehaviour { void OnClick () { UILabel lbl = GetComponent<UILabel>(); if (lbl != null) { string url = lbl.GetUrlAtPosition(UICamera.lastHit.point); if (!string.IsNullOrEmpty(url)) Application.OpenURL(url); } } }
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/OpenURLOnClick.cs
C#
asf20
285
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Trivial script that fills the label's contents gradually, as if someone was typing. /// </summary> ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/TypewriterEffect.cs
C#
asf20
1,274
using UnityEngine; /// <summary> /// Very simple example of how to use a TextList with a UIInput for chat. /// </summary> [RequireComponent(typeof(UIInput))] [AddComponentMenu("NGUI/Examples/Chat Input")] public class ChatInput : MonoBehaviour { public UITextList textList; public bool fillWithDummyData = false; U...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/ChatInput.cs
C#
asf20
1,238
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; [AddComponentMenu("NGUI/Examples/Drag and Drop Item (Example)")] public class ExampleDragDropItem : UIDragDropItem { ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/ExampleDragDropItem.cs
C#
asf20
1,270
using UnityEngine; /// <summary> /// Attaching this script to an object will make it turn as it gets closer to left/right edges of the screen. /// Look at how it's used in Example 6. /// </summary> [AddComponentMenu("NGUI/Examples/Window Auto-Yaw")] public class WindowAutoYaw : MonoBehaviour { public int updateOrder...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/WindowAutoYaw.cs
C#
asf20
809
using UnityEngine; /// <summary> /// Attach this script to a child of a draggable window to make it tilt as it's dragged. /// Look at how it's used in Example 6. /// </summary> [AddComponentMenu("NGUI/Examples/Window Drag Tilt")] public class WindowDragTilt : MonoBehaviour { public int updateOrder = 0; public float...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/WindowDragTilt.cs
C#
asf20
737
using UnityEngine; [AddComponentMenu("NGUI/Examples/Load Level On Click")] public class LoadLevelOnClick : MonoBehaviour { public string levelName; void OnClick () { if (!string.IsNullOrEmpty(levelName)) { Application.LoadLevel(levelName); } } }
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/LoadLevelOnClick.cs
C#
asf20
274
using UnityEngine; /// <summary> /// Want something to spin? Attach this script to it. Works equally well with rigidbodies as without. /// </summary> [AddComponentMenu("NGUI/Examples/Spin")] public class Spin : MonoBehaviour { public Vector3 rotationsPerSecond = new Vector3(0f, 0.1f, 0f); public bool ignoreTimeScal...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/Spin.cs
C#
asf20
927
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Example script that resizes the widget it's attached to in order to envelop the target content. ///...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/EnvelopContent.cs
C#
asf20
1,357
using UnityEngine; [AddComponentMenu("NGUI/Examples/Spin With Mouse")] public class SpinWithMouse : MonoBehaviour { public Transform target; public float speed = 1f; Transform mTrans; void Start () { mTrans = transform; } void OnDrag (Vector2 delta) { UICamera.currentTouch.clickNotifica...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/SpinWithMouse.cs
C#
asf20
621
using UnityEngine; /// <summary> /// Simple script used by Tutorial 11 that sets the color of the sprite based on the string value. /// </summary> [ExecuteInEditMode] [RequireComponent(typeof(UIWidget))] [AddComponentMenu("NGUI/Examples/Set Color on Selection")] public class SetColorOnSelection : MonoBehaviour { UIW...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/SetColorOnSelection.cs
C#
asf20
902
using UnityEngine; /// <summary> /// Attach to a game object to make its position always lag behind its parent as the parent moves. /// </summary> [AddComponentMenu("NGUI/Examples/Lag Position")] public class LagPosition : MonoBehaviour { public int updateOrder = 0; public Vector3 speed = new Vector3(10f, 10f, 10f)...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/LagPosition.cs
C#
asf20
1,052
using UnityEngine; /// <summary> /// Attach to a game object to make its rotation always lag behind its parent as the parent rotates. /// </summary> [AddComponentMenu("NGUI/Examples/Lag Rotation")] public class LagRotation : MonoBehaviour { public int updateOrder = 0; public float speed = 10f; public bool ignoreTi...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/LagRotation.cs
C#
asf20
804
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// This script automatically changes the color of the specified sprite based on the value of the slid...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/UISliderColors.cs
C#
asf20
1,230
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Simple example of an OnDrop event accepting a game object. In this case we check to see if there is...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/ExampleDragDropSurface.cs
C#
asf20
1,094
using UnityEngine; /// <summary> /// Placing this script on the game object will make that game object pan with mouse movement. /// </summary> [AddComponentMenu("NGUI/Examples/Pan With Mouse")] public class PanWithMouse : MonoBehaviour { public Vector2 degrees = new Vector2(5f, 3f); public float range = 1f; Tran...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/PanWithMouse.cs
C#
asf20
990
using UnityEngine; /// <summary> /// This simple example script is used in Tutorial 5 to show how custom events work. /// </summary> public class Tutorial5 : MonoBehaviour { /// <summary> /// This function is called by the duration slider. Since it's called by a slider, /// UIProgressBar.current will contain the c...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/Tutorial5.cs
C#
asf20
888
using UnityEngine; /// <summary> /// Attaching this script to an object will make that object face the specified target. /// The most ideal use for this script is to attach it to the camera and make the camera look at its target. /// </summary> [AddComponentMenu("NGUI/Examples/Look At Target")] public class ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/LookAtTarget.cs
C#
asf20
851
using UnityEngine; using System.Collections.Generic; /// <summary> /// Attach this script to any object that has idle animations. /// It's expected that the main idle loop animation is called "idle", and idle /// break animations all begin with "idle" (ex: idleStretch, idleYawn, etc). /// The script will place ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/Other/PlayIdleAnimations.cs
C#
asf20
2,152
using UnityEditor; using UnityEngine; using System.Collections.Generic; /// <summary> /// Inventory System search functionality. /// </summary> public class InvFindItem : ScriptableWizard { /// <summary> /// Private class used to return data from the Find function below. /// </summary> struct FindResult { pub...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Editor/InvFindItem.cs
C#
asf20
3,735
using UnityEngine; using UnityEditor; using System.Collections.Generic; /// <summary> /// Inspector class used to edit Inventory Databases. /// </summary> [CustomEditor(typeof(InvDatabase))] public class InvDatabaseInspector : Editor { static int mIndex = 0; bool mConfirmDelete = false; /// <summary> /// Draw a...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Editor/InvDatabaseInspector.cs
C#
asf20
11,185
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Equip the specified items on the character when the script is started. /// </summary> ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/EquipItems.cs
C#
asf20
1,234
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Abstract UI component observing an item somewhere in the inventor...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIItemSlot.cs
C#
asf20
4,328
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// A UI script that keeps an eye on the slot in a storage container. /// </summary> [AddC...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIStorageSlot.cs
C#
asf20
876
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Create and equip a random item on the specified target....
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/EquipRandomItem.cs
C#
asf20
997
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; using System.Collections.Generic; /// <summary> /// Storage container that stores items. /// </summary> ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIItemStorage.cs
C#
asf20
3,076
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// A UI script that keeps an eye on the slot in character equipment. /// </summary> [AddC...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/UIEquipmentSlot.cs
C#
asf20
898
//---------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2014 Tasharen Entertainment //---------------------------------------------- using UnityEngine; /// <summary> /// Selectable sprite that follows the mouse. /// </summary> [RequireComponent(typeof(UISprite))] [Add...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/Game/UICursor.cs
C#
asf20
2,640
using UnityEngine; using System.Collections.Generic; /// <summary> /// Inventory System statistic /// </summary> [System.Serializable] public class InvStat { /// <summary> /// Customize this enum with statistics appropriate for your own game /// </summary> public enum Identifier { Strength, ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/System/InvStat.cs
C#
asf20
3,204
using UnityEngine; [AddComponentMenu("NGUI/Examples/Item Attachment Point")] public class InvAttachmentPoint : MonoBehaviour { /// <summary> /// Item slot that this attachment point covers. /// </summary> public InvBaseItem.Slot slot; GameObject mPrefab; GameObject mChild; /// <summary> /// ...
zzzstrawhatzzz
trunk/client/Assets/NGUI/Examples/Scripts/InventorySystem/System/InvAttachmentPoint.cs
C#
asf20
1,111