void SButton::DrawContent(BRect content_rect, bool pushed, bool window_activated) { SetPenSize(1); if(label) { if(IsEnabled()) { if((!pushed && Behavior() != S_TWO_STATE_BUTTON) || (Value() == 0 && Behavior() == S_TWO_STATE_BUTTON)) { SetDrawingMode(B_OP_COPY); if(button_style == DANO_STYLE) #ifdef B_BEOS_VERSION_DANO { SetHighColor(ui_color(B_CONTROL_TEXT_COLOR)); SetLowColor(ui_color(B_CONTROL_BACKGROUND_COLOR)); } #else { SetHighColor(0, 0, 0, 255); SetLowColor(245, 245, 245, 255); } #endif else { SetHighColor(0, 0, 0, 255); SetLowColor(232, 232, 232, 255); } } else { if(button_style == DANO_STYLE)
// // Behavior moveArcBehavior(target) // Last modified: 07Nov2009 // // Moves the robot using the parameterized movement vector, // returning the appropriate robot behavior. // // Returns: the appropriate robot behavior // Parameters: // target in/out the target move of the behavior // Behavior Robot::moveArcBehavior(const Vector &target) { GLfloat theta = target.angle(); GLfloat phi = this->heading.angle(); GLfloat delta = degreesToRadians(theta); GLfloat cosDelta = cos(delta); GLfloat sinDelta = sin(delta); GLfloat t = cosDelta * cosDelta * sign(cosDelta); GLfloat r = sinDelta * sinDelta * sign(sinDelta); behavior = Behavior(ACTIVE, t, r, maxSpeed()); if (abs(theta) < 90.0f) behavior.setDiffVel(maxSpeed() * (t + r), maxSpeed() * (t - r)); else behavior.setDiffVel(maxSpeed() * (t - r), maxSpeed() * (t + r)); return behavior; /* GLfloat r = target.magnitude(); if (r <= threshold()) return moveStop(); GLfloat theta = degreesToRadians(target.angle()); if (theta == 0.0f) return moveForwardBehavior(r); else return moveArcBehavior((abs(theta) > degreesToRadians(angThreshold())) ? 0.0f : r * theta / sin(theta), getDiameter() * theta); */ } // moveArcBehavior(const Vector &)
void LockableButton::MouseDown(BPoint point) { if ((modifiers() & B_SHIFT_KEY) != 0 || Value() == B_CONTROL_ON) SetBehavior(B_TOGGLE_BEHAVIOR); else SetBehavior(B_BUTTON_BEHAVIOR); Message()->SetInt32("behavior", Behavior()); BButton::MouseDown(point); }
bool RenderCore::GetBehavior(DWORD& dwBehaviors, VertexProcessingType vpt) { unsigned int num = m_DeviceCombo.VertexProcessingTypeList.size(); for(unsigned int i = 0; i < m_DeviceCombo.VertexProcessingTypeList.size(); ++i) { if(m_DeviceCombo.VertexProcessingTypeList[i] == vpt) { dwBehaviors = Behavior(vpt); return true; } } return false; }
// // Behavior moveArcBehavior(t, r, s) // Last modified: 03Sep2006 // // Moves the robot using the parameterized translational // and rotational velocities, returning the appropriate robot behavior. // // Returns: the appropriate robot behavior // Parameters: // t in the translational velocity of the behavior // r in the rotational velocity of the behavior // s in the status of the behavior (default ACTIVE) // Behavior Robot::moveArcBehavior(const GLfloat t, const GLfloat r, const Status s) { return Behavior(s, t, r, maxSpeed()); } // moveArcBehavior(const GLfloat, const GLfloat, const Status)
void freettcn::TE::CModule::TestComponentStart(const TriComponentId &componentId, const TciBehaviourIdType &behaviorId, const TciParameterListType ¶meterList) const { TestComponent(componentId).Start(Behavior(behaviorId), parameterList); }
void Creature::Update() { moveTimer++; Behavior(); }
bool IMessage::IsResponse() const { return Behavior() == MessageBehavior::Response; }