/// Handles an entity inside the Trigger area. void RPG_Trigger::ProcessInside(VisBaseEntity_cl* entity) { OnInside(entity); if(m_onInsideSource) m_onInsideSource->TriggerAllTargets(); TriggerScriptEvent("OnInside", "*o", entity); }
/// Handles an entity leaving the Trigger area. void RPG_Trigger::ProcessExit(VisBaseEntity_cl* entity) { // check if this entity is in inside the trigger. int foundIndex = m_insideEntities.Find(entity); if(foundIndex > -1) { m_insideEntities.RemoveAt(foundIndex); OnExit(entity); if(m_onExitSource) m_onExitSource->TriggerAllTargets(); TriggerScriptEvent("OnExit", "*o", entity); } }
/// Handles an entity entering the Trigger area. void RPG_Trigger::ProcessEnter(VisBaseEntity_cl* entity) { if(CanTrigger() && IsValidEntity(entity)) { m_lastEnteredTime = Vision::GetTimer()->GetTime(); if(m_maxTriggerCount > 0) { ++m_curTriggerCount; } m_insideEntities.Add(entity); OnEnter(entity); if(m_onEnterSource) m_onEnterSource->TriggerAllTargets(); TriggerScriptEvent("OnEnter", "*o", entity); } }
/// \brief /// Called when mouse stops dragging this control GUI_IMPEXP virtual void OnDragEnd(VWindowBase *pOver) {TriggerScriptEvent("OnDragEnd", "*o", pOver);}
/// \brief /// Called when mouse starts dragging this control GUI_IMPEXP virtual void OnDragBegin(const hkvVec2 &vMousePos, int iButtonMask) {TriggerScriptEvent("OnDragBegin", "*mff", iButtonMask, vMousePos.x, vMousePos.y);}
/// \brief /// Called while mouse drags this control GUI_IMPEXP virtual void OnDragging(const hkvVec2 &vMouseDelta) {TriggerScriptEvent("OnDragging", "*ff", vMouseDelta.x, vMouseDelta.y);}
/// \brief /// Called when this control gets or loses focus GUI_IMPEXP virtual void OnSetFocus(bool bStatus) { SetStatus(ITEMSTATUS_HASFOCUS, bStatus); TriggerScriptEvent("OnSetFocus", "*b", bStatus); }
/// \brief /// If this control has focus, it receives the key code. GUI_IMPEXP virtual void OnKeyPressed(int iKey, int iKeyModifier) { TriggerScriptEvent("OnKeyPressed", "*im", iKey, iKeyModifier); }
/// \brief /// Called when the size of the window changed (called in SetSize) GUI_IMPEXP virtual void OnSizeChanged() {TriggerScriptEvent("OnSizeChanged");InvalidateCache();}
/// \brief /// Called when the window gets deactivated GUI_IMPEXP virtual void OnDeactivate() {TriggerScriptEvent("OnDeactivate");}
/// \brief /// Called after the dialog has been initialized GUI_IMPEXP virtual void OnInitDialog() {TriggerScriptEvent("OnInitDialog");}