SUIScrollbar
客户端组件
成员 10
| 函数 | OnValueChanged | Handling for when the scrollbar value is changed. |
| 属性 | Size | The size of the scrollbar handle where 1 means it fills the entire scrollbar. |
| 属性 | Value | The current value of the scrollbar, between 0 and 1. |
| 属性 | NumberOfSteps | – |
| 属性 | NormalColor | – |
| 属性 | HighlightedColor | – |
| 属性 | PressedColor | – |
| 属性 | DisabledColor | – |
| 属性 | ColorMultiplier | – |
| 属性 | GameObject | – |
OnValueChanged
void OnValueChanged(Closure callback)
Handling for when the scrollbar value is changed.
参数
| 名称 | 类型 | 默认值 |
|---|---|---|
| callback | Closure | – |
返回值
void
示例
Lua
function OCV()
--
end
Space.Host.ExecutingObject.UIScrollbar.OnValueChanged(OCV)
属性
Size
float Size {get; set; }
The size of the scrollbar handle where 1 means it fills the entire scrollbar.
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.Size = 0.1
Value
float Value {get; set; }
The current value of the scrollbar, between 0 and 1.
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.Value = 0.5
NumberOfSteps
int NumberOfSteps {get; set; }
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.NumberOfSteps = 2
NormalColor
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.NormalColor = Color.Red
HighlightedColor
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.HighlightedColor = Color.Red
PressedColor
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.PressedColor = Color.Red
DisabledColor
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.DisabledColor = Color.Red
ColorMultiplier
float ColorMultiplier {get; set; }
示例
Lua
Space.Host.ExecutingObject.UIScrollbar.ColorMultiplier = Color.Red
GameObject只读
示例
Lua
theGameObject = Space.Host.ExecutingObject.UIScrollbar.GameObject



