예제 #1
0
 bool
 FromEvent::isTargetUpEvent(const ParamsUnion& paramsUnion) const
 {
   bool isDown = false;
   if (! isTargetEvent(isDown, paramsUnion)) return false;
   return ! isDown;
 }
예제 #2
0
  bool
  FromEvent::changePressingState(const ParamsUnion& paramsUnion, Flags currentFlags, Flags fromFlags)
  {
    bool isDown = false;
    if (! isTargetEvent(isDown, paramsUnion)) return false;

    if (isDown) {
      if (currentFlags.isOn(fromFlags)) {
        isPressing_ = true;
        return true;
      }

    } else {
      if (isPressing_) {
        isPressing_ = false;
        return true;
      }
    }

    return false;
  }
예제 #3
0
bool FromEvent::changePressingState(const Params_Base& paramsBase,
                                    const FlagStatus& currentFlags,
                                    const Vector_ModifierFlag& fromFlags) {
  bool isDown = false;
  if (!isTargetEvent(isDown, paramsBase)) return false;

  if (isDown) {
    if (currentFlags.isOn(fromFlags)) {
      isPressing_ = true;
      return true;
    }

  } else {
    if (isPressing_) {
      isPressing_ = false;
      return true;
    }
  }

  return false;
}
예제 #4
0
bool FromEvent::isTargetUpEvent(const Params_Base& paramsBase) const {
  bool isDown = false;
  if (!isTargetEvent(isDown, paramsBase)) return false;
  return !isDown;
}