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.verticalScrollbarThumb 垂直滚动条滑块
var verticalScrollbarThumb : GUIStyle
Description描述
Style used by default for the thumb that is dragged in GUI.VerticalScrollbar controls.
用于GUI.VerticalScrollbar控件可拖动的滑块的默认样式。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public float hSbarValue;
public GUIStyle style;
void OnGUI() {
GUI.skin.verticalScrollbarThumb = style;
hSbarValue = GUILayout.VerticalScrollbar(hSbarValue, 1.0F, 0.0F, 10.0F);
}
}
// Modifies only the vertical scrollbar thumb of the current GUISkin
//修改当前GUISkin垂直滚动条滑块的样式
var hSbarValue : float;
var style : GUIStyle;
function OnGUI () {
GUI.skin.verticalScrollbarThumb = style;
hSbarValue = GUILayout.VerticalScrollbar (hSbarValue, 1.0, 0.0, 10.0);
}
最后修改:2011年1月25日 Tuesday 17:19