summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9303e08)
raw | patch | inline | side by side (parent: 9303e08)
author | binarymaster <x86corez@gmail.com> | |
Sat, 30 Sep 2017 17:05:27 +0000 (20:05 +0300) | ||
committer | binarymaster <x86corez@gmail.com> | |
Sat, 30 Sep 2017 17:05:27 +0000 (20:05 +0300) |
http://doom2d.org/forum/viewtopic.php?f=12&t=1947
src/editor/f_main.lfm | patch | blob | history | |
src/editor/f_main.pas | patch | blob | history | |
src/editor/g_language.pas | patch | blob | history |
diff --git a/src/editor/f_main.lfm b/src/editor/f_main.lfm
index b44cafc7a41de878f9a1a423e825db884f29ab33..344fefb0dac03850713cd2f0183a1e359ac9738e 100644 (file)
--- a/src/editor/f_main.lfm
+++ b/src/editor/f_main.lfm
object miLine1: TMenuItem
Caption = '-'
end
+ object miReopenMap: TMenuItem
+ Caption = 'Открыть заново'
+ ImageIndex = 1
+ ShortCut = 116
+ OnClick = miReopenMapClick
+ end
object miSaveMiniMap: TMenuItem
Caption = 'Сохранить мини-карту'
Bitmap.Data = {
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 292bcdafb9e7f3faf9e276b0e03ab08803bd2901..82bd18dec1de2ee47bb2044fb12b491f2c8e6527 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
miSaveMapAs: TMenuItem;
miOpenWadMap: TMenuItem;
miLine1: TMenuItem;
+ miReopenMap: TMenuItem;
miSaveMiniMap: TMenuItem;
miDeleteMap: TMenuItem;
miPackMap: TMenuItem;
procedure lbTextureListClick(Sender: TObject);
procedure lbTextureListDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState);
+ procedure miReopenMapClick(Sender: TObject);
procedure RenderPanelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure RenderPanelMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure RenderPanelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
SELECTFLAG_SHOTPANEL = 7;
SELECTFLAG_SELECTED = 8;
- RECENT_FILES_MENU_START = 11;
+ RECENT_FILES_MENU_START = 12;
CLIPBOARD_SIG = 'DF:ED';
end;
end;
+procedure TMainForm.miReopenMapClick(Sender: TObject);
+var
+ FileName, Resource: String;
+begin
+ if OpenedMap = '' then
+ Exit;
+
+ if MessageBox(0, PChar(_lc[I_MSG_REOPEN_MAP_PROMT]),
+ PChar(_lc[I_MENU_FILE_REOPEN]), MB_ICONQUESTION or MB_YESNO) <> idYes then
+ Exit;
+
+ g_ProcessResourceStr(OpenedMap, @FileName, nil, @Resource);
+ OpenMap(FileName, Resource);
+end;
+
procedure TMainForm.vleObjectPropertyGetPickList(Sender: TObject;
const KeyName: String; Values: TStrings);
begin
index af9b436f867e3f518dc1b11cb250120fe8374bf8..e1f7638b11d531df0f5009927a7941c0df16b977 100644 (file)
I_MSG_DELETE_MAP_PROMT,
I_MSG_MAP_DELETED,
I_MSG_MAP_DELETED_PROMT,
+ I_MSG_REOPEN_MAP_PROMT,
I_MSG_EXEC_ERROR,
I_MSG_SOUND_ERROR,
I_MSG_WAD_ERROR,
I_MENU_FILE_SAVE,
I_MENU_FILE_SAVE_AS,
I_MENU_FILE_OPEN_WAD,
+ I_MENU_FILE_REOPEN,
I_MENU_FILE_SAVE_MINI,
I_MENU_FILE_DELETE,
I_MENU_FILE_PACK_MAP,
'Карта удалена'),
('MSG MAP DELETED PROMT', 'Map "%s" is deleted',
'Карта "%s" удалена'),
+ ('MSG REOPEN MAP PROMT', 'Reopen this map?',
+ 'Загрузить карту заново?'),
('MSG EXEC ERROR', 'Game start error',
'Ошибка запуска игры'),
('MSG SOUND ERROR', 'Can''t play sound',
'Сохранить карту как...'),
('MENU FILE OPEN WAD', 'Select Map',
'Выбрать карту'),
+ ('MENU FILE REOPEN', 'Reopen Map',
+ 'Открыть заново'),
('MENU FILE SAVE MINI', 'Save Mini-map',
'Сохранить мини-карту'),
('MENU FILE DELETE', 'Delete Map from WAD...',
miSaveMap.Caption := _lc[I_MENU_FILE_SAVE];
miSaveMapAs.Caption := _lc[I_MENU_FILE_SAVE_AS];
miOpenWadMap.Caption := _lc[I_MENU_FILE_OPEN_WAD];
+ miReopenMap.Caption := _lc[I_MENU_FILE_REOPEN];
miSaveMiniMap.Caption := _lc[I_MENU_FILE_SAVE_MINI];
miDeleteMap.Caption := _lc[I_MENU_FILE_DELETE];
miPackMap.Caption := _lc[I_MENU_FILE_PACK_MAP];