Fix name collision on new Focused event in control
This commit is contained in:
@@ -59,12 +59,12 @@ namespace FlaxEditor.GUI
|
||||
/// <summary>
|
||||
/// Occurs when items gets clicked by the user.
|
||||
/// </summary>
|
||||
public event Action<Item> Clicked;
|
||||
public event Action<Item> ItemClicked;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when items gets focused.
|
||||
/// </summary>
|
||||
public event Action<Item> Focused;
|
||||
public event Action<Item> ItemFocused;
|
||||
|
||||
/// <summary>
|
||||
/// The tint color of the text.
|
||||
@@ -203,7 +203,7 @@ namespace FlaxEditor.GUI
|
||||
if (button == MouseButton.Left && _isMouseDown)
|
||||
{
|
||||
_isMouseDown = false;
|
||||
Clicked?.Invoke(this);
|
||||
ItemClicked?.Invoke(this);
|
||||
}
|
||||
|
||||
return base.OnMouseUp(location, button);
|
||||
@@ -222,7 +222,7 @@ namespace FlaxEditor.GUI
|
||||
{
|
||||
base.OnGotFocus();
|
||||
|
||||
Focused?.Invoke(this);
|
||||
ItemFocused?.Invoke(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -434,7 +434,7 @@ namespace FlaxEditor.GUI
|
||||
/// <param name="item">The item.</param>
|
||||
public void AddItem(Item item)
|
||||
{
|
||||
item.Clicked += OnClickItem;
|
||||
item.ItemClicked += OnClickItem;
|
||||
ContainerControl parent = ItemsPanel;
|
||||
if (!string.IsNullOrEmpty(item.Category))
|
||||
{
|
||||
|
||||
@@ -484,7 +484,7 @@ namespace FlaxEditor.Tools.Foliage
|
||||
Tag = i,
|
||||
Parent = _items,
|
||||
};
|
||||
itemView.Clicked += OnFoliageTypeListItemClicked;
|
||||
itemView.ItemClicked += OnFoliageTypeListItemClicked;
|
||||
|
||||
y += itemView.Height + _items.Spacing;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace FlaxEditor.Tools.Foliage
|
||||
Tag = i,
|
||||
Parent = itemPanel,
|
||||
};
|
||||
itemView.Clicked += OnFoliageTypeListItemClicked;
|
||||
itemView.ItemClicked += OnFoliageTypeListItemClicked;
|
||||
|
||||
itemPanel.Height = 34;
|
||||
itemPanel.Parent = _items;
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace FlaxEditor.Windows
|
||||
lastItem.TintColor = new Color(0.75f, 0.75f, 1.0f, 1.0f);
|
||||
else if (flags.HasFlag(DebugCommands.CommandFlags.Read) && !flags.HasFlag(DebugCommands.CommandFlags.Write))
|
||||
lastItem.TintColor = new Color(0.85f, 0.85f, 0.85f, 1.0f);
|
||||
lastItem.Focused += item =>
|
||||
lastItem.ItemFocused += item =>
|
||||
{
|
||||
// Set command
|
||||
Set(item.Name);
|
||||
|
||||
Reference in New Issue
Block a user