Jump to content

Component: Button helper (Helpers): Difference between revisions

From Flowcode Help
No edit summary
No edit summary
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_buttonhelper.fcfx FC_Comp_Source_buttonhelper.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/buttonhelper.fcfx FC_Comp_Source_temp/buttonhelper.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_buttonhelper.fcfx FC_Comp_Source_buttonhelper.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/buttonhelper.fcfx FC_Comp_Source_temp/buttonhelper.fcfx]


==Detailed description==
==Detailed description==
Line 57: Line 57:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 64: Line 66:


==Macro reference==
==Macro reference==
===Clear===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Clear'''
|-
| colspan="2" | Clears all objects from the lists This leaves no links for the button helper&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
===GetState===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetState'''
|-
| colspan="2" | Returns true if the button is depressed, else false&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


===GetStateFor===
===GetStateFor===
Line 84: Line 114:




===Clear===
===GetTarget===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Clear'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTarget'''
|-
|-
| colspan="2" | Clears all objects from the lists This leaves no links for the button helper&nbsp;
| colspan="2" | Gets the target handle the property links to&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SetDisabledPos===
===Register===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDisabledPos'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Register'''
|-
|-
| colspan="2" | Sets the position of the released button &nbsp;
| colspan="2" | Adds the object to the list if not already there&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | PositionHandle
| width="90%" | Target
|-
|-
| colspan="2" | A handle to the position of the depressed location&nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 117: Line 147:




===SetEnabledPos===
===SetAutoReset===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEnabledPos'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset'''
|-
|-
| colspan="2" | Sets the position of the depressed button &nbsp;
| colspan="2" | Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop &nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | PositionHandle
| width="90%" | State
|-
|-
| colspan="2" | A handle to the position of the depressed location&nbsp;
| colspan="2" | Set true to reset to off on sim stop, else false to retain state&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 155: Line 185:




===SetDisabledPosFor===
===SetAxisFor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDisabledPosFor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAxisFor'''
|-
|-
| colspan="2" | Sets the disabled position for an object&nbsp;
| colspan="2" | Sets the movement axis as an Axis_... constant&nbsp;
|-
|-
|-
|-
Line 169: Line 199:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Position
| width="90%" | Axis
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Movement axis to set to, default 4&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 179: Line 209:




===GetTarget===
===SetDisabledPos===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTarget'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDisabledPos'''
|-
|-
| colspan="2" | Gets the target handle the property links to&nbsp;
| colspan="2" | Sets the position of the released button &nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | PositionHandle
|}
 
 
===GetState===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| colspan="2" | A handle to the position of the depressed location&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetState'''
|-
|-
| colspan="2" | Returns true if the button is depressed, else false&nbsp;
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===Register===
===SetDisabledPosFor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Register'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetDisabledPosFor'''
|-
|-
| colspan="2" | Adds the object to the list if not already there&nbsp;
| colspan="2" | Sets the disabled position for an object&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Target
| width="90%" | Target
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Position
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 226: Line 252:




===SetNotify===
===SetEnabledPos===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetNotify'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEnabledPos'''
|-
|-
| colspan="2" | Sets the object to notify when the button is pressed or released &nbsp;
| colspan="2" | Sets the position of the depressed button &nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Handle
| width="90%" | PositionHandle
|-
|-
| colspan="2" | The handle of the object - 0 to use the caller object&nbsp;
| colspan="2" | A handle to the position of the depressed location&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Ident
|-
| colspan="2" | The identifier to send in the System.Notify message&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 250: Line 271:




===SetLatchingFor===
===SetEnabledPosFor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatchingFor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEnabledPosFor'''
|-
|-
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
| colspan="2" | Sets the enabled position for an object&nbsp;
|-
|-
|-
|-
Line 264: Line 285:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Enabled
| width="90%" | Position
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 274: Line 295:




===SetMode===
===SetLatching===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMode'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatching'''
|-
|-
| colspan="2" | Sets the animation mode for the button&nbsp;
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Mode
| width="90%" | Enabled
|-
|-
| colspan="2" | 0=User, 1=Up/Down, 2 = Lever&nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 293: Line 314:




===SetEnabledPosFor===
===SetLatchingFor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetEnabledPosFor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatchingFor'''
|-
|-
| colspan="2" | Sets the enabled position for an object&nbsp;
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
|-
|-
|-
|-
Line 307: Line 328:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Position
| width="90%" | Enabled
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 317: Line 338:




===SetPivotPosFor===
===SetMode===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPosFor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMode'''
|-
|-
| colspan="2" | Sets the position the lever rotates around for an object&nbsp;
| colspan="2" | Sets the animation mode for the button&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Target
| width="90%" | Mode
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | 0=User, 1=Up/Down, 2 = Lever&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Position
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 384: Line 400:




===SetAxisFor===
===SetMovementFor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAxisFor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovementFor'''
|-
|-
| colspan="2" | Sets the movement axis as an Axis_... constant&nbsp;
| colspan="2" | Sets the movement in units or PI/16 steps for the button&nbsp;
|-
|-
|-
|-
Line 398: Line 414:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Axis
| width="90%" | Move
|-
|-
| colspan="2" | Movement axis to set to, default 4&nbsp;
| colspan="2" | Movement to set to, default 4&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 408: Line 424:




===SetPivotPos===
===SetNotify===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPos'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetNotify'''
|-
|-
| colspan="2" | Sets the position of the object the lever rotates around &nbsp;
| colspan="2" | Sets the object to notify when the button is pressed or released &nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | PositionHandle
| width="90%" | Handle
|-
| colspan="2" | The handle of the object - 0 to use the caller object&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| width="90%" | Ident
|-
|-
| colspan="2" | A handle to the position of the depressed location&nbsp;
| colspan="2" | The identifier to send in the System.Notify message&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 427: Line 448:




===SetAutoReset===
===SetPivotPos===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPos'''
|-
|-
| colspan="2" | Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop &nbsp;
| colspan="2" | Sets the position of the object the lever rotates around &nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | State
| width="90%" | PositionHandle
|-
|-
| colspan="2" | Set true to reset to off on sim stop, else false to retain state&nbsp;
| colspan="2" | A handle to the position of the depressed location&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 446: Line 467:




===SetLatching===
===SetPivotPosFor===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatching'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPosFor'''
|-
|-
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
| colspan="2" | Sets the position the lever rotates around for an object&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Enabled
| width="90%" | Target
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
===Unregister===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Unregister'''
|-
| colspan="2" | Removes the object to the list if present&nbsp;
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Target
| width="90%" | Position
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 484: Line 491:




===SetMovementFor===
===Unregister===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovementFor'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Unregister'''
|-
|-
| colspan="2" | Sets the movement in units or PI/16 steps for the button&nbsp;
| colspan="2" | Removes the object to the list if present&nbsp;
|-
|-
|-
|-
Line 497: Line 504:
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Move
|-
| colspan="2" | Movement to set to, default 4&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID

Revision as of 12:03, 3 February 2023

Author Matrix Ltd
Version 1.1
Category Helpers


Button helper component

A button overlay that allows any object to behave like a button

Component Source Code

Please click here to download the component source project: FC_Comp_Source_temp/buttonhelper.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/buttonhelper.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples





Macro reference

Clear

Clear
Clears all objects from the lists This leaves no links for the button helper 
- VOID Return


GetState

GetState
Returns true if the button is depressed, else false 
- BOOL Return


GetStateFor

GetStateFor
Returns true if the button is depressed, else false 
- HANDLE Target
 
- BOOL Return


GetTarget

GetTarget
Gets the target handle the property links to 
- HANDLE Return


Register

Register
Adds the object to the list if not already there 
- HANDLE Target
 
- VOID Return


SetAutoReset

SetAutoReset
Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop  
- BOOL State
Set true to reset to off on sim stop, else false to retain state 
- VOID Return


SetAxis

SetAxis
Sets the movement axis as an Axis_... constant 
- BYTE Axis
Movement axis to set to, default 4 
- VOID Return


SetAxisFor

SetAxisFor
Sets the movement axis as an Axis_... constant 
- HANDLE Target
 
- BYTE Axis
Movement axis to set to, default 4 
- VOID Return


SetDisabledPos

SetDisabledPos
Sets the position of the released button  
- HANDLE PositionHandle
A handle to the position of the depressed location 
- VOID Return


SetDisabledPosFor

SetDisabledPosFor
Sets the disabled position for an object 
- HANDLE Target
 
- HANDLE Position
 
- VOID Return


SetEnabledPos

SetEnabledPos
Sets the position of the depressed button  
- HANDLE PositionHandle
A handle to the position of the depressed location 
- VOID Return


SetEnabledPosFor

SetEnabledPosFor
Sets the enabled position for an object 
- HANDLE Target
 
- HANDLE Position
 
- VOID Return


SetLatching

SetLatching
Sets whether the button is depressed when the mouse is released 
- BOOL Enabled
 
- VOID Return


SetLatchingFor

SetLatchingFor
Sets whether the button is depressed when the mouse is released 
- HANDLE Target
 
- BOOL Enabled
 
- VOID Return


SetMode

SetMode
Sets the animation mode for the button 
- BYTE Mode
0=User, 1=Up/Down, 2 = Lever 
- VOID Return


SetModeFor

SetModeFor
Sets the animation mode for the button 
- HANDLE Target
The target object, 0 for 'set default' 
- BYTE Mode
0=User, 1=Up/Down, 2 = Lever 
- VOID Return


SetMovement

SetMovement
Sets the movement in units or PI/16 steps for the button 
- FLOAT Move
Movement to set to - default is 4 
- VOID Return


SetMovementFor

SetMovementFor
Sets the movement in units or PI/16 steps for the button 
- HANDLE Target
 
- FLOAT Move
Movement to set to, default 4 
- VOID Return


SetNotify

SetNotify
Sets the object to notify when the button is pressed or released  
- HANDLE Handle
The handle of the object - 0 to use the caller object 
- ULONG Ident
The identifier to send in the System.Notify message 
- VOID Return


SetPivotPos

SetPivotPos
Sets the position of the object the lever rotates around  
- HANDLE PositionHandle
A handle to the position of the depressed location 
- VOID Return


SetPivotPosFor

SetPivotPosFor
Sets the position the lever rotates around for an object 
- HANDLE Target
 
- HANDLE Position
 
- VOID Return


Unregister

Unregister
Removes the object to the list if present 
- HANDLE Target
 
- VOID Return



Property reference

Properties
Host component
 
Lever pivot