Merge branch 'category-rework' of https://github.com/Tryibion/FlaxEngine into Tryibion-category-rework
This commit is contained in:
@@ -134,9 +134,13 @@ namespace FlaxEditor.GUI
|
||||
Render2D.FillRectangle(rect, color);
|
||||
}
|
||||
}
|
||||
// Indent for drop panel items is handled by drop panel margin
|
||||
var indent = Float2.Zero;
|
||||
if (Parent is not DropPanel)
|
||||
indent = new Float2(Editor.Instance.Icons.ArrowRight12.Size.X + 2, 0);
|
||||
|
||||
// Draw name
|
||||
Render2D.DrawText(style.FontSmall, Name, textRect, TintColor * (Enabled ? style.Foreground : style.ForegroundDisabled), TextAlignment.Near, TextAlignment.Center);
|
||||
Render2D.DrawText(style.FontSmall, Name, textRect + indent, TintColor * (Enabled ? style.Foreground : style.ForegroundDisabled), TextAlignment.Near, TextAlignment.Center);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -262,6 +266,10 @@ namespace FlaxEditor.GUI
|
||||
}
|
||||
}
|
||||
category.Visible = anyVisible;
|
||||
if (string.IsNullOrEmpty(_searchBox.Text))
|
||||
category.Close(false);
|
||||
else
|
||||
category.Open(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,9 +346,14 @@ namespace FlaxEditor.GUI
|
||||
var categoryPanel = new DropPanel
|
||||
{
|
||||
HeaderText = item.Category,
|
||||
ArrowImageOpened = new SpriteBrush(Editor.Instance.Icons.ArrowDown12),
|
||||
ArrowImageClosed = new SpriteBrush(Editor.Instance.Icons.ArrowRight12),
|
||||
EnableDropDownIcon = true,
|
||||
ItemsMargin = new Margin(28, 0, 2, 2),
|
||||
HeaderColor = Style.Current.Background,
|
||||
Parent = parent,
|
||||
};
|
||||
categoryPanel.Open(false);
|
||||
categoryPanel.Close(false);
|
||||
_categoryPanels.Add(categoryPanel);
|
||||
parent = categoryPanel;
|
||||
}
|
||||
@@ -382,6 +395,7 @@ namespace FlaxEditor.GUI
|
||||
item2.UpdateFilter(null);
|
||||
}
|
||||
category.Visible = true;
|
||||
category.Close(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/// <summary>
|
||||
/// Behavior instance script that runs Behavior Tree execution.
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API Behavior : public Script
|
||||
API_CLASS(Attributes="Category(\"Flax Engine\")") class FLAXENGINE_API Behavior : public Script
|
||||
{
|
||||
API_AUTO_SERIALIZATION();
|
||||
DECLARE_SCRIPTING_TYPE(Behavior);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/// Actor script component that synchronizes the Transform over the network.
|
||||
/// </summary>
|
||||
/// <remarks>Interpolation and prediction logic based on https://www.gabrielgambetta.com/client-server-game-architecture.html.</remarks>
|
||||
API_CLASS(Namespace="FlaxEngine.Networking") class FLAXENGINE_API NetworkTransform : public Script, public INetworkSerializable
|
||||
API_CLASS(Namespace="FlaxEngine.Networking", Attributes="Category(\"Flax Engine\")") class FLAXENGINE_API NetworkTransform : public Script, public INetworkSerializable
|
||||
{
|
||||
API_AUTO_SERIALIZATION();
|
||||
DECLARE_SCRIPTING_TYPE(NetworkTransform);
|
||||
|
||||
Reference in New Issue
Block a user