NGUI Tutorial 3
一、 Create a Button
一、(Menu)NGUI -> Create -> Sprite
二、attach box colider to the Sprite , then attach UIButton Script
三、Create - >Lable as Sprite's Child, Set it's Ahchors to it's Parent
(注意:不要给Lable添加box colider 这样Sprite按钮就接受不到事件了,因为Lable 的Depth 大于 Sprite)
四、Sprite attach UIButton Script Again ,set target as Lable
五、Hover the button ,you will seen Sprite and Lable all highlight.
二、Event Trigger -> Use Button Change
一、create a spirte ,which will be changed by button
二、attach Tween Height and Tween Width ,set valuse like that
(注意,set two scripts active false ,这样就不会一开始就变换形状了)
三、attach UIEvent Trigger to button,set event to change sprite,like that
四、now show the result
Hover: Change Size
Leave : Noraml Size
三、UIKeyBinding
绑定一个快捷键去激活一个按钮,输入框或选择一个对象。
一、Attach UIKeyBinding Script to button
二、Attach Test Scrpit to Sprite
三、Set OnClick Event Notify Object reference to Sprite
四、Now , you can enter 1,2,3 to change sprite color.
OfSourse you can alse 使用键盘来控制 UIInput
liket that
你也可以使用UIKeyNavigation ——附加这个脚步到你的控制上去允许使用键盘或控制器来定位UI(3.5.5新增)
NGUI Tutorial 3的更多相关文章
- NGUI Tutorial 4 ScrollView
一.createScrollView 1.First, select the panel you want to be your scroll view and right-click anywher ...
- NGUI 学习笔记实战——制作商城UI界面
http://www.cnblogs.com/chongxin/p/3876575.html Unity3D的uGUI听说最近4.6即将推出,但是目前NGUI等UI插件大行其道并且已经非常成熟,所以我 ...
- NGUI 的使用教程与实例(入门)(1 )
NGUI教程:步骤1-Scene 1.创建一个新的场景(New Scene).2.选择并删除场景里的MainCamera.3.在NGUI菜单下选择Create a New UI,会打开UI创建向导. ...
- Unity3d ngui基础教程
Unity3d ngui基础教程 NGUI教程:步骤1-Scene 1.创建一个新的场景(New Scene).2.选择并删除场景里的MainCamera.3.在NGUI菜单下选择Create a N ...
- NGUI: Documentation
Video Tutorials Basic Tutorial (v.2.5.0+) SD & HD atlas switching (advanced) Packed Font (advanc ...
- NGUI学习笔记(一)UILabel介绍
来个前言: 作为一个U3D程序员,自然要写一写U3D相关的内容了.想来想去还是从UI开始搞起,可能这也是最直观同时也最重要的部分之一了.U3D自带的UI系统,也许略坑,也没有太多介绍的价值,那么从今天 ...
- [翻译+山寨]Hangfire Highlighter Tutorial
前言 Hangfire是一个开源且商业免费使用的工具函数库.可以让你非常容易地在ASP.NET应用(也可以不在ASP.NET应用)中执行多种类型的后台任务,而无需自行定制开发和管理基于Windows ...
- NGUI裁剪模型和粒子
效果预览 注:Cube上附着的绿色是我添加的粒子效果. 软件环境 NGUI 3.9.x Unity 5.1 x64 相关知识 RenderTexture RenderTexture是一种特殊的纹理,它 ...
- Django 1.7 Tutorial 学习笔记
官方教程在这里 : Here 写在前面的废话:)) 以前学习新东西,第一想到的是找本入门教程,按照书上做一遍.现在看了各种网上的入门教程后,我觉得还是看官方Tutorial靠谱.书的弊端一说一大推 本 ...
随机推荐
- 4月12日学习笔记——jQuery事件
下面是在 jQuery 中最常使用的 bind()方法举例:$("#testDiv4").bind("click", showMsg); 我们为 id 是 te ...
- hdu 3665 Seaside floyd+超级汇点
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3665 题意分析:以0为起点,求到Sea的最短路径. 所以可以N为超级汇点,使用floyd求0到N的最短 ...
- 自定义textbox加入左右晃动效果
应用开发过程中经常会要求用户在textbox进行输入.例如:登陆,发布. 而一般没进行输入的时候我们都会简单的进行弹窗提示用户输入. 前阵子ios的同学搞了一个左右晃动的效果,觉得还不错,于是也搞了个 ...
- oracle 备份与还原 及相关操作
drop user 用户名 cascade; ........删除用户 create user 用户名 identified by 密码 default tablespace 数据文件名 tempor ...
- 网络A、B、C类IP地址的区别
学网络之前得先要明白几个概念:(起初我也不怎么知道后来就慢慢会了) 1字节=8位,1位就是1个数字,所以1字节等于8个数字. 2的8次方,和二进制11111111转换为十进制并不一回事. 0-127是 ...
- zedboard 构建嵌入式linux
本文通过五部完成zedboard的嵌入式LINUX搭建,所谓磨刀不五砍材工嘛 1:系统环境搭建 要准备好交叉编译环境 见http://blog.csdn.net/xiabodan/article/de ...
- JQuery在iframe中实现 点击后选中当前栏目的样式
二级或者三级折叠菜单参考http://www.cnblogs.com/qigege/p/5178947.html <script type="text/javascript" ...
- winform 清空界面所有控件已输入的值
rivate void btnClear_Click(object sender, EventArgs e){ ClearCntrValue(this.pnlContent);} 复制代码/// ...
- jquery鼠标滑过提示title具体实现代码
jquery鼠标滑过提示title的实现代码. 如下: <script type="text/javascript" src="http://ajax.google ...
- php 文件上传类 实例分享
最近在研究php上传的内容,找到一个不错的php上传类,分享下. <?php /** * 文件上传类 * class: uploadFile * edit: www.jbxue.com */ c ...