From b705dfcaaef9152b31845f7e379a6dbee504897a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Porto?= Date: Wed, 13 Nov 2024 18:18:36 -0300 Subject: [PATCH] Editor: double-click in label invokes text editor --- Editor/AGS.Editor/Panes/GUIEditor.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Editor/AGS.Editor/Panes/GUIEditor.cs b/Editor/AGS.Editor/Panes/GUIEditor.cs index 8efbd28288..512303f8b0 100644 --- a/Editor/AGS.Editor/Panes/GUIEditor.cs +++ b/Editor/AGS.Editor/Panes/GUIEditor.cs @@ -1292,6 +1292,16 @@ private void bgPanel_MouseDoubleClick(object sender, MouseEventArgs e) objectToCheck = _selectedControl; } + if (_selectedControl != null && _selectedControl.ControlType == GUILabel.CONTROL_DISPLAY_NAME) + { + // it's a label we are double clicking + GUILabel label = (GUILabel)_selectedControl; + String text = MultilineStringEditorDialog.ShowEditor(label.Text); + if(text != null) + label.Text = text; + return; + } + foreach (PropertyInfo property in objectToCheck.GetType().GetProperties()) { if (property.GetCustomAttributes(typeof(AGSDefaultEventPropertyAttribute), true).Length > 0)