言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

GUILayout.Toolbar

public static function Toolbar(selected: int, contents: GUIContent[], style: GUIStyle, params options: GUILayoutOption[]): int;

Parameters

selected 選択したグリッドボタンのインデックス
texts グリッドボタン上に表示する文字列配列
images グリッドボタン上に表示するテクスチャ配列
contents グリッドボタンのテキスト、画像、ツールチップとなるGUIContent配列
style 使用するスタイル。省略された場合は、現在のGUISkinにある button スタイルを使用します。
options 特別なレイアウト対応をするためのレイアウトオプションリスト。ここに渡された値は style で定義された設定を上書きします。
See Also: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight.

Returns

int 選択したボタンのインデックスを返します

Description

ツールバー


ゲームビューのツールバー

	var toolbarInt : int = 0;
	var toolbarStrings : String[] = ["Toolbar1", "Toolbar2", "Toolbar3"];

	function OnGUI () {
		toolbarInt = GUILayout.Toolbar (toolbarInt, toolbarStrings);
	}