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.horizontalSliderThumb 水平滑动条滑块
var horizontalSliderThumb : GUIStyle
Description描述
Style used by default for the thumb that is dragged in GUI.HorizontalSlider controls.
用于GUI.HorizontalSlider控件可拖动的滑块的默认样式。
The padding property is used to determine the size of the thumb.
padding属性用来确定滑块的大小。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public float hSliderValue = 0.0F;
public GUIStyle style;
void OnGUI() {
GUI.skin.horizontalSliderThumb = style;
hSliderValue = GUILayout.HorizontalSlider(hSliderValue, 0.0F, 10.0F);
}
}
// Modifies only the horizontal slider thumb style of the current GUISkin
//修改当前GUISkin的水平滑动条滑块的样式
var hSliderValue : float = 0.0;
var style : GUIStyle;
function OnGUI () {
GUI.skin.horizontalSliderThumb = style;
hSliderValue = GUILayout.HorizontalSlider (hSliderValue, 0.0, 10.0);
}
最后修改:2011年1月25日 Tuesday 16:40