Summary of modifications:
ThumbPositionChange
custom control event (see note).Note on ThumbPositionChange
event:
Command events do not fire for FCCtrlSlider
controls, so a workaround is used to make the ThumbPositionChange
events work.
If using JW/RGPLua version 0.55 or lower, then the event dispatcher will run with the next Command event for a different control. In these versions the event is unreliable as the user will need to interact with another control for the change in thumb position to be registered.
If using version 0.56 or later, then the dispatcher will run every 1 second. This is more reliable than in earlier versions but it still will not fire immediately.
fcmctrlslider.RegisterParent(self, window)
[Internal] [Override]
Input | Type | Description |
---|---|---|
self |
FCMCtrlSlider |
|
window |
FCMCustomLuaWindow |
fcmctrlslider.SetThumbPosition(self, position)
[Fluid] [Override]
Ensures that ThumbPositionChange
event is triggered.
Input | Type | Description |
---|---|---|
self |
FCMCtrlSlider |
|
position |
number |
fcmctrlslider.SetMinValue(self, minvalue)
[Fluid] [Override]
Ensures that ThumbPositionChange
is triggered.
Input | Type | Description |
---|---|---|
self |
FCMCtrlSlider |
|
minvalue |
number |
fcmctrlslider.SetMaxValue(self, maxvalue)
[Fluid] [Override]
Ensures that ThumbPositionChange
is triggered.
Input | Type | Description |
---|---|---|
self |
FCMCtrlSlider |
|
maxvalue |
number |
fcmctrlslider.HandleThumbPositionChange(control, last_position)
[Callback Template]
Input | Type | Description |
---|---|---|
control |
FCMCtrlSlider |
The slider that was moved. |
last_position |
string |
The previous value of the control’s thumb position. |
fcmctrlslider.AddHandleChange(self, callback)
[Fluid] Adds a handler for when the slider’s thumb position changes. The even will fire when:
Input | Type | Description |
---|---|---|
self |
FCMCtrlSlider |
|
callback |
function |
See HandleThumbPositionChange for callback signature. |
fcmctrlslider.RemoveHandleThumbPositionChange(self, callback)
[Fluid]
Removes a handler added with AddHandleThumbPositionChange
.
Input | Type | Description |
---|---|---|
self |
FCMCtrlSlider |
|
callback |
function |