GUI.PasswordField

public static function PasswordField(position: Rect, password: string, maskChar: char): string;
public static string PasswordField(Rect position, string password, char maskChar);
public static function PasswordField(position: Rect, password: string, maskChar: char, maxLength: int): string;
public static string PasswordField(Rect position, string password, char maskChar, int maxLength);
public static function PasswordField(position: Rect, password: string, maskChar: char, style: GUIStyle): string;
public static string PasswordField(Rect position, string password, char maskChar, GUIStyle style);
public static function PasswordField(position: Rect, password: string, maskChar: char, maxLength: int, style: GUIStyle): string;
public static string PasswordField(Rect position, string password, char maskChar, int maxLength, GUIStyle style);

Parameters

position Rectangle on the screen to use for the text field.
password Password to edit. The return value of this function should be assigned back to the string as shown in the example.
maskChar Character to mask the password with.
maxLength The maximum length of the string. If left out, the user can type for ever and ever.
style The style to use. If left out, the textField style from the current GUISkin is used.

Returns

string The edited password.

Description

Make a text field where the user can enter a password.

using UnityEngine;
using System.Collections; public class ExampleClass : MonoBehaviour {
public string passwordToEdit = "My Password";
void OnGUI() {
passwordToEdit = GUI.PasswordField(new Rect(10, 10, 200, 20), passwordToEdit, "*"[0], 25);
}
}

GUI PasswordField的更多相关文章

  1. Unity3D入门之GUI基础以及常用GUI控件使用(2)

    1.GUI基础 (1)GUI部分是每帧擦除重绘的,只应该在OnGUI中绘制GUI,按钮:GUILayout.Button(“Hello”); 只读标签:GUILayout.Label() (2)修改控 ...

  2. Unity3D学习笔记(一)GUI控件的调用

    GUI控件:1.在Start中初始化,在OnGUI中调整.2.公有变量才会出现在Inspector面板.3.GUI控件的初始化和处理在OnGUI内完成.4.JavaScript的中文为UTF-8编码可 ...

  3. 2.GUI控件的使用 --《UNITY 3D 游戏开发》笔记

    1.Label 控件 编写脚本文件,直接绑定在main camera上 public class labelScript : MonoBehaviour { //设定一个值来接收外部赋值的字符串 pu ...

  4. unity3d之GUI

    1.Button void OnGUI() { , , , ), "up")) {flg=true; } , , , ), "down")) {flg=fals ...

  5. Unity3D笔记六 GUI游戏界面

    1.Label:标签控件,可以在游戏中用来展示文本字符串信息,不仅可以写字还可以贴图片. 2.Button:按钮控件,一般分图片按钮和普通的按钮,还有一个连续按钮RepeatButton注意,这个在W ...

  6. Unity3D入门

    Unity3D是一款应用广泛的3D游戏引擎,本文主要介绍unity3D的简单应用,安装过程略过. 在游戏的整个开发过程中,游戏界面设计占据非常重要的地位.因为游戏启动后,第一个映入眼帘的就是整个游戏U ...

  7. [转]unity3d 脚本参考-技术文档

    unity3d 脚本参考-技术文档 核心提示:一.脚本概览这是一个关于Unity内部脚本如何工作的简单概览.Unity内部的脚本,是通过附加自定义脚本对象到游戏物体组成的.在脚本对象内部不同志的函数被 ...

  8. unity textFilde

    #pragma strict private var editUsername:String; private var editPassword:String; private var editSho ...

  9. Unity3D脚本中文系列教程(七)

    http://dong2008hong.blog.163.com/blog/static/4696882720140311445677/?suggestedreading&wumii Unit ...

随机推荐

  1. spring boot / cloud (一) 使用filter防止XSS

    spring boot / cloud (一) 使用filter防止XSS 前言 XSS(跨站脚本攻击) 跨站脚本攻击(Cross Site Scripting),为不和层叠样式表(Cascading ...

  2. 聊聊GIS中那些坐标系

    从第一次上地图学的课开始,对GIS最基本的地图坐标系统就很迷.也难怪,我那时候并不是GIS专业的学生,仅仅是一门开卷考试的专业选修课,就没怎么在意. 等我真正接触到了各种空间数据产品,我才知道万里长征 ...

  3. Spring中AOP简介与切面编程的使用

    Spring中AOP简介与使用 什么是AOP? Aspect Oriented Programming(AOP),多译作 "面向切面编程",也就是说,对一段程序,从侧面插入,进行操 ...

  4. Java后台开发必备软件(windows环境下)

    一.必备软件 1.Jdk,推荐下载最新版2.Ide,推荐 IntelliJ IDEA3.服务器,如 tomcat / jetty4.数据库终端界面,推荐 Navicat Premium(自行破解),5 ...

  5. django全文检索

    -------------------linux下配置操作1.在虚拟环境中依次安装包 1.pip install django-haystack haystack:django的一个包,可以方便地对m ...

  6. 工具类:将其他编码类型转换成UTF-8或者其他类型的工具类

    将其他编码类型转换成UTF-8或者其他类型的工具类 public static String changeUTF(String str) { String newStr = null; try { n ...

  7. Varnsih调用多台后端主机

    author:JevonWei 版权声明:原创作品 Varnsih调用多个后端主机 环境 Varnish 192.168.198.139 图片服务端 192.168.198.120 程序服务端 192 ...

  8. 编译安装dropbear

    author:JevonWei 版权声明:原创作品 dropbear也可实现ssh远程登录的作业 1. 安装开发包组 yum -y groupinstall "Development Too ...

  9. 【DDD】领域驱动设计实践 —— 架构风格及架构实例

    概述 DDD为复杂软件的设计提供了指导思想,其将易发生变化的业务核心域放置在限定上下文中,在确保核心域一致性和内聚性的基础上,DDD可以被多种语言和多种技术框架实现,具体的框架实现需要根据实际的业务场 ...

  10. MySQL的JOIN(三):JOIN优化实践之内循环的次数

    这篇博文讲述如何优化内循环的次数.内循环的次数受驱动表的记录数所影响,驱动表记录数越多,内循环就越多,连接效率就越低下,所以尽量用小表驱动大表.先插入测试数据. CREATE TABLE t1 ( i ...