GuiScriptNotifyCtrl¶
A control which adds several reactions to other GUIs via callbacks.
- Inherit:
- GuiControl
Description¶
GuiScriptNotifyCtrl does not exist to render anything. When parented or made a child of other controls, you can toggle flags on or off to make use of its specialized callbacks. Normally these callbacks are used as utility functions by the GUI Editor, or other container classes. However, for very fancy GUI work where controls interact with each other constantly, this is a handy utility to make use of.
Example:
// Common member fields left out for sake of examplenewGuiScriptNotifyCtrl()
{
onChildAdded = "0";
onChildRemoved = "0";
onChildResized = "0";
onParentResized = "0";
};
Methods¶
-
void
GuiScriptNotifyCtrl::
onChildAdded
(SimObjectId ID, SimObjectId childID)¶ Called when a child is added to this GUI.
Parameters: - ID – Unique object ID assigned when created (this in script).
- childID – Unique object ID of child being added.
-
void
GuiScriptNotifyCtrl::
onChildRemoved
(SimObjectId ID, SimObjectId childID)¶ Called when a child is removed from this GUI.
Parameters: - ID – Unique object ID assigned when created (this in script).
- childID – Unique object ID of child being removed.
-
void
GuiScriptNotifyCtrl::
onChildResized
(SimObjectId ID, SimObjectId childID)¶ Called when a child is of this GUI is being resized.
Parameters: - ID – Unique object ID assigned when created (this in script).
- childID – Unique object ID of child being resized.
-
void
GuiScriptNotifyCtrl::
onGainFirstResponder
(SimObjectId ID)¶ Called when this GUI gains focus.
Parameters: ID – Unique object ID assigned when created (this in script).
-
void
GuiScriptNotifyCtrl::
onLoseFirstResponder
(SimObjectId ID)¶ Called when this GUI loses focus.
Parameters: ID – Unique object ID assigned when created (this in script).
-
void
GuiScriptNotifyCtrl::
onParentResized
(SimObjectId ID)¶ Called when this GUI’s parent is resized.
Parameters: ID – Unique object ID assigned when created (this in script).
-
void
GuiScriptNotifyCtrl::
onResize
(SimObjectId ID)¶ Called when this GUI is resized.
Parameters: ID – Unique object ID assigned when created (this in script).
Fields¶
-
bool
GuiScriptNotifyCtrl::
onChildAdded
¶ Enables/disables onChildAdded callback.
-
bool
GuiScriptNotifyCtrl::
onChildRemoved
¶ Enables/disables onChildRemoved callback.
-
bool
GuiScriptNotifyCtrl::
onChildResized
¶ Enables/disables onChildResized callback.
-
bool
GuiScriptNotifyCtrl::
onGainFirstResponder
¶ Enables/disables onGainFirstResponder callback.
-
bool
GuiScriptNotifyCtrl::
onLoseFirstResponder
¶ Enables/disables onLoseFirstResponder callback.
-
bool
GuiScriptNotifyCtrl::
onParentResized
¶ Enables/disables onParentResized callback.
-
bool
GuiScriptNotifyCtrl::
onResize
¶ Enables/disables onResize callback.