TextField PasswordField
来源:互联网 发布:双11淘宝客服工作总结 编辑:程序博客网 时间:2024/06/11 14:04
using UnityEngine;
using System.Collections;
public class textFTest : MonoBehaviour {
// Use this for initialization
string editShow;
string editName;
string editPass;
void Start () {
editShow = "请输入正确的登陆名和密码";
editName = "请输入用户名";
editPass = "";
// editPass = "请输入密码:";
}
// Update is called once per frame
void Update () {
}
void OnGUI(){
GUI.Label (new Rect (10, 10, Screen.width, 30), editShow);
if (GUI.Button (new Rect (10, 130, 50, 30), "登录")) {
editShow = "您输入的用户名是"+editName+"输入的密码是"+editPass;
}
GUI.Label (new Rect (10, 50, 50, 30), "用户名");
GUI.Label (new Rect (10, 80, 50, 30), "密码");
editName = GUI.TextField (new Rect (70, 50, 200, 30), editName, 15);
editPass = GUI.PasswordField (new Rect (70, 80, 200, 30), editPass, "*"[0], 15);
}
}
using System.Collections;
public class textFTest : MonoBehaviour {
// Use this for initialization
string editShow;
string editName;
string editPass;
void Start () {
editShow = "请输入正确的登陆名和密码";
editName = "请输入用户名";
editPass = "";
// editPass = "请输入密码:";
}
// Update is called once per frame
void Update () {
}
void OnGUI(){
GUI.Label (new Rect (10, 10, Screen.width, 30), editShow);
if (GUI.Button (new Rect (10, 130, 50, 30), "登录")) {
editShow = "您输入的用户名是"+editName+"输入的密码是"+editPass;
}
GUI.Label (new Rect (10, 50, 50, 30), "用户名");
GUI.Label (new Rect (10, 80, 50, 30), "密码");
editName = GUI.TextField (new Rect (70, 50, 200, 30), editName, 15);
editPass = GUI.PasswordField (new Rect (70, 80, 200, 30), editPass, "*"[0], 15);
}
}
0 0
- TextField PasswordField
- Unity3D入门——GUI之TextField和PasswordField控件
- TextField控件、PasswordField控件、TextArea控件、Toggle 控件、ToolBar控件
- Tapestry学习七:关于组件(二)TextField, PasswordField and PageLink
- 利用JavaFx开发RIA桌面应用-TextField替换PasswordField做密码框
- JavaFX实现自定义“表单验证工具类”,简化对控件TextField、PassWordField、TextArea添加验证时的代码
- textField
- textField
- TextField
- TextField
- textfield
- TextField
- textField
- textField
- TextField
- TextField
- textfield
- TextField
- MySQL的账号密码管理
- 编写C程序容易犯错的地方
- My first java class!
- Linux中的popen函数
- dotNET_Reactor 命令行 参数大全
- TextField PasswordField
- 1090. Highest Price in Supply Chain (25)
- 面向对象编程中的对象的拷贝问题
- Android APP之间共享SharedPreference
- cocos3.9 【 Sublime Text 2 配置 】
- mysql 视图创建及使用
- HTTP基本原理(简介)
- 算法 - 数组
- ListView的适配(使用自定义ArrayAdapter)