Skip to content

Commit

Permalink
Editor: double-click in label invokes text editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Nov 13, 2024
1 parent 9c4b5a2 commit b705dfc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Editor/AGS.Editor/Panes/GUIEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b705dfc

Please # to comment.