예제 #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");}