X-Git-Url: https://deadsoftware.ru/gitweb?p=d2df-editor.git;a=blobdiff_plain;f=src%2Feditor%2Ff_mapoptions.pas;h=9d3a20ce1e6b619ffa359802745d2d5068a584bd;hp=a194fa929071a597c29b9eaafa08e8baba658f6c;hb=3dc2fe6b3d29cd54425db8f590e922f2dce50e99;hpb=212386359ea0af4e0a861f9bf92c45a1516ac87c diff --git a/src/editor/f_mapoptions.pas b/src/editor/f_mapoptions.pas index a194fa9..9d3a20c 100644 --- a/src/editor/f_mapoptions.pas +++ b/src/editor/f_mapoptions.pas @@ -1,13 +1,13 @@ unit f_mapoptions; -{$MODE Delphi} +{$INCLUDE ../shared/a_modes.inc} interface uses SysUtils, Classes, Forms, Dialogs, Controls, StdCtrls, ComCtrls, Buttons, - f_main; + f_main, utils; type TMapOptionsForm = class (TForm) @@ -112,13 +112,13 @@ uses // Callbacks to receive results from resource choosing dialogs function SetSky: Boolean; begin - MapOptionsForm.eBack.Text := AddSkyForm.ResourceName; + MapOptionsForm.eBack.Text := win2utf(AddSkyForm.ResourceName); Result := True; end; function SetMusic: Boolean; begin - MapOptionsForm.eMusic.Text := AddSoundForm.ResourceName; + MapOptionsForm.eMusic.Text := win2utf(AddSoundForm.ResourceName); Result := True; end; @@ -128,12 +128,12 @@ var a, b: Integer; begin // General map options - eMapName.Text := gMapInfo.Name; - eMapDescription.Text := gMapInfo.Description; - eAuthor.Text := gMapInfo.Author; + eMapName.Text := win2utf(gMapInfo.Name); + eMapDescription.Text := win2utf(gMapInfo.Description); + eAuthor.Text := win2utf(gMapInfo.Author); - eBack.Text := gMapInfo.SkyName; - eMusic.Text := gMapInfo.MusicName; + eBack.Text := win2utf(gMapInfo.SkyName); + eMusic.Text := win2utf(gMapInfo.MusicName); eMapWidth.Text := IntToStr(gMapInfo.Width); eMapHeight.Text := IntToStr(gMapInfo.Height); @@ -191,11 +191,11 @@ begin with gMapInfo do begin - Name := eMapName.Text; - Description := eMapDescription.Text; - Author := eAuthor.Text; - SkyName := eBack.Text; - MusicName := eMusic.Text; + Name := utf2win(eMapName.Text); + Description := utf2win(eMapDescription.Text); + Author := utf2win(eAuthor.Text); + SkyName := utf2win(eBack.Text); + MusicName := utf2win(eMusic.Text); if Width > newWidth then MapOffset.X := 0; @@ -236,7 +236,7 @@ procedure TMapOptionsForm.bSelectBackClick(Sender: TObject); begin AddSkyForm.OKFunction := SetSky; AddSkyForm.lbResourcesList.MultiSelect := False; - AddSkyForm.SetResource := eBack.Text; + AddSkyForm.SetResource := utf2win(eBack.Text); AddSkyForm.ShowModal(); end; @@ -244,7 +244,7 @@ procedure TMapOptionsForm.bSelectMusicClick(Sender: TObject); begin AddSoundForm.OKFunction := SetMusic; AddSoundForm.lbResourcesList.MultiSelect := False; - AddSoundForm.SetResource := eMusic.Text; + AddSoundForm.SetResource := utf2win(eMusic.Text); AddSoundForm.ShowModal(); end;