void SaveMaskExporterDialog::InitDialog() { SaveMaskExporterDialog::ui->setupUi(this); connect(ui->okButton, SIGNAL(clicked()), this, SLOT(SlotOkButton())); connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(SlotCancelButton())); connect(ui->renametextureButton,SIGNAL(clicked()),this,SLOT(SlotRenameTexture())); connect(ui->listTextureName,SIGNAL(itemSelectionChanged()),this,SLOT(SlotSelectionTextureName())); connect(ui->AllButton,SIGNAL(clicked()),this,SLOT(SlotSelectionAllButton())); connect(ui->NoneButton,SIGNAL(clicked()),this,SLOT(SlotSelectionNoneButton())); ui->renametextureButton->setDisabled(true); stdParFrame = new StdParFrame(this,glar); stdParFrame->loadFrameContent(*parSet); QVBoxLayout *vbox = new QVBoxLayout(this); vbox->addWidget(stdParFrame); ui->saveParBox->setLayout(vbox); QFileInfo fi(m->fullName()); this->setWindowTitle("Choose Saving Options for: '"+ fi.baseName() +"'"); // Show the additional parameters only for formats that have some. if(parSet->isEmpty()) ui->saveParBox->hide(); else ui->saveParBox->show(); //all - none ui->AllButton->setChecked(true); //ui->NoneButton->setChecked(true); SetTextureName(); SetMaskCapability(); }
SanityCrystal::SanityCrystal(Renderer* pRenderer, Engine* pEngine) : RenderedEntity(pRenderer, pEngine, new TextureRenderObject(pRenderer)) { auto textureObject = reinterpret_cast<TextureRenderObject*>(renderObject.get()); textureObject->SetTextureName(L"Entities1"); textureObject->SetTextureClip(Rect(128, 1, 160, 43)); b2BodyDef bodyDef; bodyDef.fixedRotation = true; bodyDef.type = b2_staticBody; bodyDef.angle = 0.0f; b2PolygonShape box; box.SetAsBox(0.25f, 0.32f); b2FixtureDef fixtureDef; fixtureDef.shape = &box; fixtureDef.density = 1.0f; fixtureDef.friction = 0.0f; fixtureDef.isSensor = true; SetBody(parent->GetPhysics()->CreateBody(&bodyDef)); body->CreateFixture(&fixtureDef); }
void Sector::Reset() { for( unsigned int x=0; x<SECTOR_HEIGHT_SIZE*SECTOR_HEIGHT_SIZE; ++x ) { zHeightMap[x] = 0.0f; } for( unsigned int x=0; x<SECTOR_BLEND_SIZE*SECTOR_BLEND_SIZE; ++x ) { zBlendMap[x*4] = 1.0f; zBlendMap[x*4+1] = 0.0f; zBlendMap[x*4+2] = 0.0f; zBlendMap[x*4+3] = 0.0f; zBlendMap2[x*4] = 0.0f; zBlendMap2[x*4+1] = 0.0f; zBlendMap2[x*4+2] = 0.0f; zBlendMap2[x*4+3] = 0.0f; } SetTextureName(0, "TerrainTexture.png"); SetTextureName(1, "Green.png"); SetTextureName(2, "Blue.png"); SetTextureName(3, "Red.png"); SetTextureName(4, "TerrainTexture.png"); SetTextureName(5, "Green.png"); SetTextureName(6, "Blue.png"); SetTextureName(7, "Red.png"); zAmbient[0] = 0.0f; zAmbient[1] = 0.0f; zAmbient[2] = 0.0f; ResetNormals(); SetEdited(false); }