Пример #1
0
/// 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);
}
Пример #2
0
/// 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);
  }
}
Пример #3
0
/// 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);
  }
}
Пример #4
0
 /// \brief
 ///   Called when mouse stops dragging this control
 GUI_IMPEXP virtual void OnDragEnd(VWindowBase *pOver) {TriggerScriptEvent("OnDragEnd", "*o", pOver);}
Пример #5
0
 /// \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);}
Пример #6
0
 /// \brief
 ///   Called while mouse drags this control
 GUI_IMPEXP virtual void OnDragging(const hkvVec2 &vMouseDelta) {TriggerScriptEvent("OnDragging", "*ff", vMouseDelta.x, vMouseDelta.y);}
Пример #7
0
 /// \brief
 ///   Called when this control gets or loses focus
 GUI_IMPEXP virtual void OnSetFocus(bool bStatus) 
 {
   SetStatus(ITEMSTATUS_HASFOCUS, bStatus); 
   TriggerScriptEvent("OnSetFocus", "*b", bStatus);
 }
Пример #8
0
 /// \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);
 }
Пример #9
0
 /// \brief
 ///   Called when the size of the window changed (called in SetSize)
 GUI_IMPEXP virtual void OnSizeChanged() {TriggerScriptEvent("OnSizeChanged");InvalidateCache();}
Пример #10
0
 /// \brief
 ///   Called when the window gets deactivated
 GUI_IMPEXP virtual void OnDeactivate() {TriggerScriptEvent("OnDeactivate");}
Пример #11
0
 /// \brief
 ///   Called after the dialog has been initialized
 GUI_IMPEXP virtual void OnInitDialog() {TriggerScriptEvent("OnInitDialog");}