void Item::setPos(const Point &pos) { Parent::setPos(pos); setOutline(); setMaskBits(GeomMask); }
KateAttribute& KateAttribute::operator+=(const KateAttribute& a) { if (a.itemSet(Weight)) setWeight(a.weight()); if (a.itemSet(Italic)) setItalic(a.italic()); if (a.itemSet(Underline)) setUnderline(a.underline()); if (a.itemSet(Overline)) setOverline(a.overline()); if (a.itemSet(StrikeOut)) setStrikeOut(a.strikeOut()); if (a.itemSet(Outline)) setOutline(a.outline()); if (a.itemSet(TextColor)) setTextColor(a.textColor()); if (a.itemSet(SelectedTextColor)) setSelectedTextColor(a.selectedTextColor()); if (a.itemSet(BGColor)) setBGColor(a.bgColor()); if (a.itemSet(SelectedBGColor)) setSelectedBGColor(a.selectedBGColor()); return *this; }
bool Boss::init(){ _score = 666; _Model = Sprite3D::create("boss.obj", "boss.png"); //auto cannon2 = Sprite3D::create("bossCannon.obj", "boos.png"); if(_Model) { _Model->setScale(28); addChild(_Model); _Model->setRotation3D(Vertex3F(90,0,0)); static_cast<Sprite3D*>(_Model)->setOutline(0.1, Color3B(0,0,0)); _type = kEnemyBoss; _HP = 5000; _radius = 150; auto cannon1 = Sprite3D::create("bossCannon.obj", "boss.png"); _Cannon1 = Node::create(); addChild(_Cannon1); _Cannon1->addChild(cannon1); cannon1->setScale(28); cannon1->setRotation3D(Vertex3F(90,0,0)); _Cannon1->setPosition3D(Vertex3F(40,-100, 10)); cannon1->setOutline(0.1, Color3B(0,0,0)); auto cannon2 = Sprite3D::create("bossCannon.obj", "boss.png"); _Cannon2 = Node::create(); addChild(_Cannon2); _Cannon2->addChild(cannon2); cannon2->setScale(28); cannon2->setRotation3D(Vertex3F(90,0,0)); _Cannon2->setPosition3D(Vertex3F(-40,-100, 10)); cannon2->setOutline(0.1, Color3B(0,0,0)); //addChild(_Cannon2); //_Cannon2->setPosition(-20,-200); _Cannon1->setRotation(-45); _Cannon2->setRotation(45); enterTheBattle(); return true; } return false; }
void Opcode810AHandler::_run() { Logger::debug("SCRIPT") << "[810A] [=] void float_msg(object who, string msg, int type) " << std::endl; int type = _vm->dataStack()->popInteger(); unsigned int color = 0x000000ff; switch (type) { case -2: // CAPITAL RED LETTERS FF 00 00 color = 0xff0000ff; break; case -1: // Self-rotating colors @todo color = 0xff0000ff; // temporary taken from -2 break; case 0: case 8: case 13: color = 0xffff7fff; break; case 1: case 5: case 10: color = 0x555555ff; break; case 2: color = 0xff0000ff; break; case 3: color = 0x3cfb00ff; break; case 4: color = 0x30598eff; break; case 6: color = 0xa2a2a2ff; break; case 7: color = 0xff4949ff; break; case 9: color = 0xffffffff; break; case 11: color = 0x3c3c3cff; break; case 12: color = 0x757575ff; break; default: _error("float_msg - wrong type: " + std::to_string(type)); } auto string = _vm->dataStack()->popString(); auto object = _vm->dataStack()->popObject(); auto floatMessage = new UI::TextArea(string); floatMessage->setWidth(200); floatMessage->setWordWrap(true); floatMessage->setHorizontalAlign(UI::TextArea::HorizontalAlign::CENTER); floatMessage->setOutline(true); floatMessage->setOutlineColor(0x000000ff); floatMessage->setFont(ResourceManager::getInstance()->font("font1.aaf", color)); object->setFloatMessage(floatMessage); }