wiki.sine.space | sinespace

Difference between revisions of "Scripting/SUIScrollbar"

From wiki.sine.space
Jump to: navigation, search
(Added, defined and gave simple examples to all members (4) of SUIScrollbar)
 
m
Line 11: Line 11:
 
{{ScriptFunction|int|NumberOfSteps|{ get; set; }|The number of steps to use for the value. A value of 0 disables use of steps.|5= <pre>Space.Host.ExecutingObject.UIScrollbar.NumberOfSteps = 2</pre>}}
 
{{ScriptFunction|int|NumberOfSteps|{ get; set; }|The number of steps to use for the value. A value of 0 disables use of steps.|5= <pre>Space.Host.ExecutingObject.UIScrollbar.NumberOfSteps = 2</pre>}}
  
{{ScriptFunction|float|Size|{ get; set; }|The size of the scrollbar handle where 1 means it fills the entire scrollbar.|5= <pre></pre>}}
+
{{ScriptFunction|float|Size|{ get; set; }|The size of the scrollbar handle where 1 means it fills the entire scrollbar.|5= <pre>Space.Host.ExecutingObject.UIScrollbar.Size = 0.1</pre>}}
  
 
{{ScriptFunction|float|Value|{ get; set; }|The current value of the scrollbar, between 0 and 1.|5= <pre>Space.Host.ExecutingObject.UIScrollbar.Value = 0.5</pre>}}
 
{{ScriptFunction|float|Value|{ get; set; }|The current value of the scrollbar, between 0 and 1.|5= <pre>Space.Host.ExecutingObject.UIScrollbar.Value = 0.5</pre>}}

Revision as of 18:26, 27 December 2020

Members

OnValueChanged

void OnValueChanged (Closure callback)

Handling for when the scrollbar value is changed.

ovc = function ()
  Space.Log("Scrollbar value changed")
  end
Space.Host.ExecutingObject.UIScrollbar.OnValueChanged(ovc)



Properties

NumberOfSteps

int NumberOfSteps { get; set; }

The number of steps to use for the value. A value of 0 disables use of steps.

Space.Host.ExecutingObject.UIScrollbar.NumberOfSteps = 2


Size

float Size { get; set; }

The size of the scrollbar handle where 1 means it fills the entire scrollbar.

Space.Host.ExecutingObject.UIScrollbar.Size = 0.1


Value

float Value { get; set; }

The current value of the scrollbar, between 0 and 1.

Space.Host.ExecutingObject.UIScrollbar.Value = 0.5