summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 323503b)
raw | patch | inline | side by side (parent: 323503b)
author | Stas'M <x86corez@gmail.com> | |
Tue, 22 May 2018 12:06:08 +0000 (15:06 +0300) | ||
committer | Stas'M <x86corez@gmail.com> | |
Tue, 22 May 2018 12:06:41 +0000 (15:06 +0300) |
http://doom2d.org/forum/viewtopic.php?f=12&t=1568
src/editor/f_main.pas | patch | blob | history | |
src/editor/g_language.pas | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index d217b30d0864c21869dcc3981be725bf741ed740..a810a63637c87848381a1c051228b1cfd91a1f7c 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
procedure RefreshRecentMenu();
procedure OpenMapFile(FileName: String);
function RenderMousePos(): TPoint;
+ procedure RecountSelectedObjects();
end;
const
str: String;
begin
MainForm.vleObjectProperty.Strings.Clear();
+ MainForm.RecountSelectedObjects();
// Отображаем свойства если выделен только один объект:
if SelectedObjectCount() <> 1 then
Result := RenderPanel.ScreenToClient(Mouse.CursorPos);
end;
+procedure TMainForm.RecountSelectedObjects();
+begin
+ if SelectedObjectCount() = 0 then
+ StatusBar.Panels[0].Text := ''
+ else
+ StatusBar.Panels[0].Text := Format(_lc[I_CAP_STAT_SELECTED], [SelectedObjectCount()]);
+end;
+
procedure TMainForm.RenderPanelMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
var
if gTriggers[a].TriggerType <> TRIGGER_NONE then
SelectObject(OBJECT_TRIGGER, a, True);
end;
+
+ RecountSelectedObjects();
end;
procedure TMainForm.tbGridOnClick(Sender: TObject);
for a := 0 to High(gTriggers) do
if gTriggers[a].TriggerType <> TRIGGER_NONE then
SelectObject(OBJECT_TRIGGER, a, True);
+
+ RecountSelectedObjects();
end;
procedure TMainForm.Splitter1CanResize(Sender: TObject;
index b6a779d66be54d6d0f92060bbc4a7bfca8639e7d..cf9998fc8c0444dcf8d35ace2990668195f52ad1 100644 (file)
I_CAP_REMOVE,
I_CAP_TEXTURE,
I_CAP_ANIMATION,
+ I_CAP_STAT_SELECTED,
I_CTRL_PROP_KEY,
I_CTRL_PROP_VALUE,
'Текстура: %dx%d'),
('CAP ANIMATION', 'Animation: %dx%d, %d frames',
'Анимация: %dx%d, %d кадров'),
+ ('CAP STAT SELECTED', 'Selected objects: %d',
+ 'Выделено объектов: %d'),
('CTRL PROP KEY', 'Property',
'Свойство'),