X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Feditor%2Ff_mapoptions.pas;h=a69c5cfbe434938855fc776c4c337f73bd4e52fb;hb=352afa5b7b27f7783344f1878fcfa1fae1001db1;hp=9d3a20ce1e6b619ffa359802745d2d5068a584bd;hpb=3dc2fe6b3d29cd54425db8f590e922f2dce50e99;p=d2df-editor.git diff --git a/src/editor/f_mapoptions.pas b/src/editor/f_mapoptions.pas index 9d3a20c..a69c5cf 100644 --- a/src/editor/f_mapoptions.pas +++ b/src/editor/f_mapoptions.pas @@ -77,7 +77,7 @@ type bOK: TButton; bCancel: TButton; - procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); procedure bCancelClick(Sender: TObject); procedure bOKClick(Sender: TObject); @@ -112,28 +112,26 @@ uses // Callbacks to receive results from resource choosing dialogs function SetSky: Boolean; begin - MapOptionsForm.eBack.Text := win2utf(AddSkyForm.ResourceName); + MapOptionsForm.eBack.Text := AddSkyForm.ResourceName; Result := True; end; function SetMusic: Boolean; begin - MapOptionsForm.eMusic.Text := win2utf(AddSoundForm.ResourceName); + MapOptionsForm.eMusic.Text := AddSoundForm.ResourceName; Result := True; end; -// Form processing -procedure TMapOptionsForm.FormActivate(Sender: TObject); -var - a, b: Integer; +procedure TMapOptionsForm.FormCreate(Sender: TObject); + var a, b: Integer; begin // General map options - eMapName.Text := win2utf(gMapInfo.Name); - eMapDescription.Text := win2utf(gMapInfo.Description); - eAuthor.Text := win2utf(gMapInfo.Author); + eMapName.Text := gMapInfo.Name; + eMapDescription.Text := gMapInfo.Description; + eAuthor.Text := gMapInfo.Author; - eBack.Text := win2utf(gMapInfo.SkyName); - eMusic.Text := win2utf(gMapInfo.MusicName); + eBack.Text := gMapInfo.SkyName; + eMusic.Text := gMapInfo.MusicName; eMapWidth.Text := IntToStr(gMapInfo.Width); eMapHeight.Text := IntToStr(gMapInfo.Height); @@ -174,7 +172,6 @@ begin if gTriggers[a].TriggerType <> 0 then b := b + 1; lTriggerCount.Caption := IntToStr(b); - end; procedure TMapOptionsForm.bCancelClick(Sender: TObject); @@ -191,11 +188,11 @@ begin with gMapInfo do begin - Name := utf2win(eMapName.Text); - Description := utf2win(eMapDescription.Text); - Author := utf2win(eAuthor.Text); - SkyName := utf2win(eBack.Text); - MusicName := utf2win(eMusic.Text); + Name := eMapName.Text; + Description := eMapDescription.Text; + Author := eAuthor.Text; + SkyName := eBack.Text; + MusicName := eMusic.Text; if Width > newWidth then MapOffset.X := 0; @@ -236,7 +233,7 @@ procedure TMapOptionsForm.bSelectBackClick(Sender: TObject); begin AddSkyForm.OKFunction := SetSky; AddSkyForm.lbResourcesList.MultiSelect := False; - AddSkyForm.SetResource := utf2win(eBack.Text); + AddSkyForm.SetResource := eBack.Text; AddSkyForm.ShowModal(); end; @@ -244,7 +241,7 @@ procedure TMapOptionsForm.bSelectMusicClick(Sender: TObject); begin AddSoundForm.OKFunction := SetMusic; AddSoundForm.lbResourcesList.MultiSelect := False; - AddSoundForm.SetResource := utf2win(eMusic.Text); + AddSoundForm.SetResource := eMusic.Text; AddSoundForm.ShowModal(); end;