GUISettings.doubleClickSelectsWord 双击选择单词

var doubleClickSelectsWord : bool

Description描述

Should double-clicking select words in text fields.

在文本字段可以双击选择单词。

By default is set to true.

默认设置为true。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public string str = "This is a string with \n two lines of text";
	void OnGUI() {
		GUI.skin.settings.doubleClickSelectsWord = false;
		str = GUILayout.TextArea(str);
	}
}
// Disables word selecting with double click on the text area
//禁用文本区域双击选择单词
var str : String = "This is a string with \n two lines of text";

function OnGUI() {
	GUI.skin.settings.doubleClickSelectsWord = false;
	str = GUILayout.TextArea(str);
}
Page last updated: 2011-1-3