GUISkin
- box
- button
- customStyles
- FindStyle
- font
- GetStyle
- horizontalScrollbarLeftButton
- horizontalScrollbarRightButton
- horizontalScrollbarThumb
- horizontalScrollbar
- horizontalSliderThumb
- horizontalSlider
- label
- scrollView
- settings
- textArea
- textField
- toggle
- verticalScrollbarDownButton
- verticalScrollbarThumb
- verticalScrollbarUpButton
- verticalScrollbar
- verticalSliderThumb
- verticalSlider
- window
GUISkin.verticalSlider 垂直滑动条
var verticalSlider : GUIStyle
Description描述
Style used by default for the background part of GUI.VerticalSlider controls.
用于GUI.VerticalSlider控件背景部分的默认样式。
The padding property is used to determine the size of the area the thumb can be dragged within.
Padding属性是用来确定滑块可拖动区域的大小。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public float vSliderValue = 0.0F;
public GUIStyle style;
void OnGUI() {
GUI.skin.verticalSlider = style;
vSliderValue = GUILayout.VerticalSlider(vSliderValue, 10.0F, 0.0F);
}
}
// Modifies only the vertical slider style of the current GUISkin
//修改当前GUISkin的垂直滑动条的样式
var vSliderValue : float = 0.0;
var style : GUIStyle;
function OnGUI () {
GUI.skin.verticalSlider = style;
vSliderValue = GUILayout.VerticalSlider (vSliderValue, 10.0, 0.0);
}
最后修改:2011年1月25日 Tuesday 16:36