summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c570601)
raw | patch | inline | side by side (parent: c570601)
author | Stas'M <x86corez@gmail.com> | |
Tue, 22 May 2018 11:05:20 +0000 (14:05 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Tue, 22 May 2018 11:07:10 +0000 (14:07 +0300) |
http://doom2d.org/forum/viewtopic.php?f=12&t=1927
src/editor/f_main.pas | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 5c1e8bd728a3c914abf27ae0e72c700150e3ab89..d217b30d0864c21869dcc3981be725bf741ed740 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
var
panel: TPanel;
trigger: TTrigger;
- i: Integer;
- IDArray: DWArray;
rRect: TRectWH;
rSelectRect: Boolean;
wWidth, wHeight: Word;
TextureID: DWORD;
+
+ procedure SelectObjects(ObjectType: Byte);
+ var
+ i: Integer;
+ IDArray: DWArray;
+ begin
+ IDArray := ObjectInRect(rRect.X, rRect.Y,
+ rRect.Width, rRect.Height,
+ ObjectType, rSelectRect);
+
+ if IDArray <> nil then
+ for i := 0 to High(IDArray) do
+ SelectObject(ObjectType, IDArray[i], (ssCtrl in Shift) or rSelectRect);
+ end;
begin
if Button = mbLeft then
MouseLDown := False;
RemoveSelectFromObjects();
// Выделяем всё в выбранном прямоугольнике:
- IDArray := ObjectInRect(rRect.X, rRect.Y,
- rRect.Width, rRect.Height,
- pcObjects.ActivePageIndex+1, rSelectRect);
-
- if IDArray <> nil then
- for i := 0 to High(IDArray) do
- SelectObject(pcObjects.ActivePageIndex+1, IDArray[i],
- (ssCtrl in Shift) or rSelectRect);
+ if (ssCtrl in Shift) and (ssAlt in Shift) then
+ begin
+ SelectObjects(OBJECT_PANEL);
+ SelectObjects(OBJECT_ITEM);
+ SelectObjects(OBJECT_MONSTER);
+ SelectObjects(OBJECT_AREA);
+ SelectObjects(OBJECT_TRIGGER);
+ end
+ else
+ SelectObjects(pcObjects.ActivePageIndex+1);
FillProperty();
end;