GUISkin.verticalSliderThumb 垂直滑动条滑块

var verticalSliderThumb : GUIStyle

Description描述

Style used by default for the thumb that is dragged in GUI.VerticalSlider controls.

用于GUI.VerticalSlider控件可拖动的滑块的默认样式。

The padding property is used to determine the size of the thumb.

padding属性用来确定滑块的大小。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public float vSliderValue = 0.0F;
	public GUIStyle style;
	void OnGUI() {
		GUI.skin.verticalSliderThumb = style;
		vSliderValue = GUILayout.VerticalSlider(vSliderValue, 10.0F, 0.0F);
	}
}
// Modifies only the vertical slider thumb style of the current GUISkin
//修改当前GUISkin的垂直滑动条滑块的样式

var vSliderValue : float = 0.0;
var style : GUIStyle;

function OnGUI () {
	GUI.skin.verticalSliderThumb = style;
	vSliderValue = GUILayout.VerticalSlider (vSliderValue, 10.0, 0.0);
}
Page last updated: 2011-1-25