index 9d3a20ce1e6b619ffa359802745d2d5068a584bd..22d74cc5f8d4699f50e8802ae9d3f2cc99b605e6 100644 (file)
bOK: TButton;
bCancel: TButton;
- procedure FormActivate(Sender: TObject);
+ procedure FormShow(Sender: TObject);
procedure bCancelClick(Sender: TObject);
procedure bOKClick(Sender: TObject);
// 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.FormShow(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);
if gTriggers[a].TriggerType <> 0 then
b := b + 1;
lTriggerCount.Caption := IntToStr(b);
-
end;
procedure TMapOptionsForm.bCancelClick(Sender: TObject);
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;
begin
AddSkyForm.OKFunction := SetSky;
AddSkyForm.lbResourcesList.MultiSelect := False;
- AddSkyForm.SetResource := utf2win(eBack.Text);
+ AddSkyForm.SetResource := eBack.Text;
AddSkyForm.ShowModal();
end;
begin
AddSoundForm.OKFunction := SetMusic;
AddSoundForm.lbResourcesList.MultiSelect := False;
- AddSoundForm.SetResource := utf2win(eMusic.Text);
+ AddSoundForm.SetResource := eMusic.Text;
AddSoundForm.ShowModal();
end;