FCMControl

Summary of modifications:

  • Setters that accept FCString now also accept Lua string and number.
  • In getters with an FCString parameter, the parameter is now optional and a Lua string is returned.
  • Ported GetParent from PDK to allow the parent window to be accessed from a control.
  • Handlers for the Command event can now be set on a control.
  • Added methods for storing and restoring control state, which allows controls to correctly maintain their values across multiple script executions

Functions

Init

fcmcontrol.Init(self)

View source

[Internal]

Input Type Description
self FCMControl

GetParent

fcmcontrol.GetParent(self)

View source

[PDK Port] Returns the control’s parent window. Do not override or disable this method.

Input Type Description
self FCMControl
Return type Description
FCMCustomWindow

RegisterParent

fcmcontrol.RegisterParent(self, window)

View source

[Fluid] [Internal] Used to register the parent window when the control is created. Do not disable this method.

Input Type Description
self FCMControl
window FCMCustomWindow

GetEnable

fcmcontrol.GetEnable(self)

View source

[Override] Hooks into control state restoration.

Input Type Description
self FCMControl
Return type Description
boolean

SetEnable

fcmcontrol.SetEnable(self, enable)

View source

[Fluid] [Override] Hooks into control state restoration.

Input Type Description
self FCMControl
enable boolean

GetVisible

fcmcontrol.GetVisible(self)

View source

[Override] Hooks into control state restoration.

Input Type Description
self FCMControl
Return type Description
boolean

SetVisible

fcmcontrol.SetVisible(self, visible)

View source

[Fluid] [Override] Hooks into control state restoration.

Input Type Description
self FCMControl
visible boolean

GetLeft

fcmcontrol.GetLeft(self)

View source

[Override] Hooks into control state restoration.

Input Type Description
self FCMControl
Return type Description
number

SetLeft

fcmcontrol.SetLeft(self, left)

View source

[Fluid] [Override] Hooks into control state restoration.

Input Type Description
self FCMControl
left number

GetTop

fcmcontrol.GetTop(self)

View source

[Override] Hooks into control state restoration.

Input Type Description
self FCMControl
Return type Description
number

SetTop

fcmcontrol.SetTop(self, top)

View source

[Fluid] [Override] Hooks into control state restoration.

Input Type Description
self FCMControl
top number

GetHeight

fcmcontrol.GetHeight(self)

View source

[Override] Hooks into control state restoration.

Input Type Description
self FCMControl
Return type Description
number

SetHeight

fcmcontrol.SetHeight(self, height)

View source

[Fluid] [Override] Hooks into control state restoration.

Input Type Description
self FCMControl
height number

GetWidth

fcmcontrol.GetWidth(self)

View source

[Override] Hooks into control state restoration.

Input Type Description
self FCMControl
Return type Description
number

SetWidth

fcmcontrol.SetWidth(self, width)

View source

[Fluid] [Override] Hooks into control state restoration.

Input Type Description
self FCMControl
width number

GetText

fcmcontrol.GetText(self, str)

View source

[Override] Returns a Lua string and makes passing an FCString optional. Also hooks into control state restoration.

Input Type Description
self FCMControl
str (optional) FCString
Return type Description
string

SetText

fcmcontrol.SetText(self, str)

View source

[Fluid] [Override] Accepts Lua string and number in addition to FCString. Also hooks into control state restoration.

Input Type Description
self FCMControl
str `FCString string

UseStoredState

fcmcontrol.UseStoredState(self)

View source

[Internal] Checks if this control should use its stored state instead of the live state from the control. Do not override or disable this method.

Input Type Description
self FCMControl
Return type Description
boolean

StoreState

fcmcontrol.StoreState(self)

View source

[Fluid] [Internal] Stores the control’s current state. Do not disable this method. Override as needed but call the parent first.

Input Type Description
self FCMControl

RestoreState

fcmcontrol.RestoreState(self)

View source

[Fluid] [Internal] Restores the control’s stored state. Do not disable this method. Override as needed but call the parent first.

Input Type Description
self FCMControl

AddHandleCommand

fcmcontrol.AddHandleCommand(self, callback)

View source

[Fluid] Adds a handler for command events.

Input Type Description
self FCMControl
callback function See FCCustomLuaWindow.HandleCommand in the PDK for callback signature.

RemoveHandleCommand

fcmcontrol.RemoveHandleCommand(self, callback)

View source

[Fluid] Removes a handler added with AddHandleCommand.

Input Type Description
self FCMControl
callback function