Breakroom is now Sinewave Campus. Book a meeting

SUIScrollbar

客户端组件
在此类中OnValueChanged
  1. OnValueChanged
  2. 属性
  3. Size
  4. Value
  5. NumberOfSteps
  6. NormalColor
  7. HighlightedColor
  8. PressedColor
  9. DisabledColor
  10. ColorMultiplier
  11. GameObject
成员 10
函数OnValueChangedHandling for when the scrollbar value is changed.
属性SizeThe size of the scrollbar handle where 1 means it fills the entire scrollbar.
属性ValueThe 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.

参数

名称类型默认值
callbackClosure–

返回值

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​

SColor NormalColor {get; set; }

示例

Lua
Space.Host.ExecutingObject.UIScrollbar.NormalColor = Color.Red

HighlightedColor​

SColor HighlightedColor {get; set; }

示例

Lua
Space.Host.ExecutingObject.UIScrollbar.HighlightedColor = Color.Red

PressedColor​

SColor PressedColor {get; set; }

示例

Lua
Space.Host.ExecutingObject.UIScrollbar.PressedColor = Color.Red

DisabledColor​

SColor DisabledColor {get; set; }

示例

Lua
Space.Host.ExecutingObject.UIScrollbar.DisabledColor = Color.Red

ColorMultiplier​

float ColorMultiplier {get; set; }

示例

Lua
Space.Host.ExecutingObject.UIScrollbar.ColorMultiplier = Color.Red

GameObject只读​

SGameObject GameObject {get; }

示例

Lua
theGameObject = Space.Host.ExecutingObject.UIScrollbar.GameObject