summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73501e9)
raw | patch | inline | side by side (parent: 73501e9)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 23 May 2023 17:41:00 +0000 (20:41 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 23 May 2023 17:41:00 +0000 (20:41 +0300) |
src/editor/f_addresource.pas | patch | blob | history | |
src/editor/f_main.pas | patch | blob | history | |
src/editor/f_packmap.pas | patch | blob | history | |
src/editor/f_savemap.pas | patch | blob | history |
index d67765e20d111ae91e253ee8350953e1a46ff8c4..f738384273e0e92aa8d74d2656175ef08389f274 100644 (file)
begin
if FResourceName = '' then
begin
- MessageBox(0, PChar(_lc[I_MSG_CHOOSE_RES]),
+ Application.MessageBox(PChar(_lc[I_MSG_CHOOSE_RES]),
PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
Exit;
end;
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 21758243722bf2ee7f371fb9eb0750fad41f7afc..2bf10e67abbf1a555c9616463e212a1e3cda4082 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
procedure ErrorMessageBox(str: String);
begin
- MessageBox(0, PChar(str), PChar(_lc[I_MSG_ERROR]),
+ Application.MessageBox(PChar(str), PChar(_lc[I_MSG_ERROR]),
MB_ICONINFORMATION or MB_OK or MB_DEFBUTTON1);
end;
s := g_ExtractFilePathName(RecentFiles[n]);
OpenMap(fn, s)
end
- else if MessageBox(0, PChar(_lc[I_MSG_DEL_RECENT_PROMT]), PChar(_lc[I_MSG_DEL_RECENT]), MB_ICONQUESTION or MB_YESNO) = idYes then
+ else if Application.MessageBox(PChar(_lc[I_MSG_DEL_RECENT_PROMT]), PChar(_lc[I_MSG_DEL_RECENT]), MB_ICONQUESTION or MB_YESNO) = idYes then
begin
RecentFiles.Delete(n);
RefreshRecentMenu();
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
- CanClose := MessageBox(0, PChar(_lc[I_MSG_EXIT_PROMT]),
+ CanClose := Application.MessageBox(PChar(_lc[I_MSG_EXIT_PROMT]),
PChar(_lc[I_MSG_EXIT]),
MB_ICONQUESTION or MB_YESNO or
MB_DEFBUTTON1) = idYes;
if OpenedMap = '' then
Exit;
- if MessageBox(0, PChar(_lc[I_MSG_REOPEN_MAP_PROMT]),
+ if Application.MessageBox(PChar(_lc[I_MSG_REOPEN_MAP_PROMT]),
PChar(_lc[I_MENU_FILE_REOPEN]), MB_ICONQUESTION or MB_YESNO) <> idYes then
Exit;
if i = -1 then
Exit;
- if MessageBox(0, PChar(Format(_lc[I_MSG_DEL_TEXTURE_PROMT],
+ if Application.MessageBox(PChar(Format(_lc[I_MSG_DEL_TEXTURE_PROMT],
[SelectedTexture()])),
PChar(_lc[I_MSG_DEL_TEXTURE]),
MB_ICONQUESTION or MB_YESNO or
procedure TMainForm.aNewMapExecute(Sender: TObject);
begin
- if (MessageBox(0, PChar(_lc[I_MSG_CLEAR_MAP_PROMT]),
- PChar(_lc[I_MSG_CLEAR_MAP]),
- MB_ICONQUESTION or MB_YESNO or
- MB_DEFBUTTON1) = mrYes) then
+ if Application.MessageBox(PChar(_lc[I_MSG_CLEAR_MAP_PROMT]), PChar(_lc[I_MSG_CLEAR_MAP]), MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON1) = mrYes then
FullClear();
end;
Exit;
MapName := SelectMapForm.lbMapList.Items[SelectMapForm.lbMapList.ItemIndex];
- if MessageBox(0, PChar(Format(_lc[I_MSG_DELETE_MAP_PROMT], [MapName, OpenDialog.FileName])), PChar(_lc[I_MSG_DELETE_MAP]), MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON2) <> mrYes then
+ if Application.MessageBox(PChar(Format(_lc[I_MSG_DELETE_MAP_PROMT], [MapName, OpenDialog.FileName])), PChar(_lc[I_MSG_DELETE_MAP]), MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON2) <> mrYes then
Exit;
g_DeleteResource(FileName, '', MapName, res);
if res <> 0 then
begin
- MessageBox(0, PChar('Cant delete map res=' + IntToStr(res)), PChar('Map not deleted!'), MB_ICONINFORMATION or MB_OK or MB_DEFBUTTON1);
+ Application.MessageBox(PChar('Cant delete map res=' + IntToStr(res)), PChar('Map not deleted!'), MB_ICONINFORMATION or MB_OK or MB_DEFBUTTON1);
Exit
end;
- MessageBox(
- 0,
+ Application.MessageBox(
PChar(Format(_lc[I_MSG_MAP_DELETED_PROMT], [MapName])),
PChar(_lc[I_MSG_MAP_DELETED]),
MB_ICONINFORMATION or MB_OK or MB_DEFBUTTON1
index 1259898100b2b25ed7494d22d3de04abb17f79b8..a8ad07a7eecc8b9120c3e4d9d6f7512b71c793d9 100644 (file)
--- a/src/editor/f_packmap.pas
+++ b/src/editor/f_packmap.pas
end
else
begin
- //MessageBox(0, PChar(Format(_lc[I_MSG_WAD_ERROR], [ExtractFileName(filename)])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
- MessageBox(0, PChar(Format(_lc[I_MSG_RES_ERROR], [filename, section, resource])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
+ //Application.MessageBox(PChar(Format(_lc[I_MSG_WAD_ERROR], [ExtractFileName(filename)])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
+ Application.MessageBox(PChar(Format(_lc[I_MSG_RES_ERROR], [filename, section, resource])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
Result := False
end
end;
index 6d9b947f2427633045c4e37a057b7b30a1f62add..c9fff9e176ad1ad4af64556d727649e390d3111f 100644 (file)
--- a/src/editor/f_savemap.pas
+++ b/src/editor/f_savemap.pas
for a := 0 to lbMapList.Count-1 do
if eMapName.Text = lbMapList.Items[a] then
begin
- ok := MessageBox(0, PChar(Format(_lc[I_MSG_MAP_EXISTS],
+ ok := Application.MessageBox(PChar(Format(_lc[I_MSG_MAP_EXISTS],
[eMapName.Text])),
PChar(_lc[I_MSG_SAVE_MAP]),
MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON1) = mrYes;