//--------------------------------------------------------------------------- #include #pragma hdrstop #include "SimulationAdvSet_F.h" #include "Simulation_F.h" #include "common.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "RzButton" #pragma link "RzRadChk" #pragma link "RzTrkBar" #pragma link "RzPanel" #pragma link "RzRadGrp" #pragma resource "*.dfm" //--------------------------------------------------------------------------- #define IDS_SIMULATION_ADV_SET StringTable[0] #define IDS_OPTIMIZE StringTable[1] #define IDS_NO_OPTIMIZE StringTable[2] #define IDS_SPANDEX_SET StringTable[3] #define IDS_EFFECT StringTable[4] #define IDS_NONE StringTable[5] #define IDS_SOLID StringTable[6] #define IDS_WAVE StringTable[7] #define IDS_INTENSITY StringTable[8] #define IDS_INVERT_SHADE StringTable[9] #define IDS_COLORONCOLOR StringTable[10] #define IDS_DRAW StringTable[11] #define IDS_RANDOMNESS StringTable[12] //--------------------------------------------------------------------------- TSimulationAdvSetForm *SimulationAdvSetForm; //--------------------------------------------------------------------------- __fastcall TSimulationAdvSetForm::TSimulationAdvSetForm(TComponent* Owner) : TForm(Owner) { StringTable.Create(BaseDir, Language, "Simulation Adv"); Caption=IDS_SIMULATION_ADV_SET; //gbOptimize->Caption=IDS_OPTIMIZE; lbOptimize->Caption=IDS_OPTIMIZE; cbNoOptimize->Caption=IDS_NO_OPTIMIZE; cbColorOnColor->Caption=IDS_COLORONCOLOR; //gbDraw->Caption=IDS_DRAW; lbDraw->Caption=IDS_DRAW; //gbSpandexSet->Caption=IDS_SPANDEX_SET; lbSpandexSet->Caption=IDS_SPANDEX_SET; rgEffect->Caption=IDS_EFFECT; rgEffect->Items->Clear(); rgEffect->Items->Add(IDS_NONE); rgEffect->Items->Add(IDS_SOLID); rgEffect->Items->Add(IDS_WAVE); lbPower->Caption=IDS_INTENSITY; cbInvert->Caption=IDS_INVERT_SHADE; cbrandomness->Caption=IDS_RANDOMNESS; SetFont(); } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::SetFont(){ SetSmallFont(Font); SetSmallFont(lbOptimize->Font); SetSmallFont(lbDraw->Font); SetSmallFont(lbSpandexSet->Font); SetSmallFont(lbPower->Font); } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::SetData(){ cbNoOptimize->Checked=!SimulationForm->sd.optimization; cbColorOnColor->Checked=SimulationForm->sd.coc; rgEffect->ItemIndex=SimulationForm->sd.span_effect; tbPower->Position=SimulationForm->sd.span_power; cbInvert->Checked=SimulationForm->sd.span_invert; cbrandomness->Checked=SimulationForm->sd.randomness;//gabriel } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::cbNoOptimizeClick(TObject *Sender) { SimulationForm->sd.optimization=!cbNoOptimize->Checked; } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::rgEffectClick(TObject *Sender) { SimulationForm->sd.span_effect=rgEffect->ItemIndex; } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::tbPowerChange(TObject *Sender) { SimulationForm->sd.span_power=tbPower->Position; } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::cbInvertClick(TObject *Sender) { SimulationForm->sd.span_invert=cbInvert->Checked; } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::FormActivate(TObject *Sender) { SetData(); } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::FormPaint(TObject *Sender) { SetData(); } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::cbColorOnColorClick(TObject *Sender) { SimulationForm->sd.coc=cbColorOnColor->Checked; } //--------------------------------------------------------------------------- void __fastcall TSimulationAdvSetForm::cbrandomnessClick(TObject *Sender) { SimulationForm->sd.randomness=cbrandomness->Checked; } //---------------------------------------------------------------------------