Merge remote-tracking branch 'origin/master' into 1.9
This commit is contained in:
@@ -279,6 +279,64 @@ namespace FlaxEngine
|
||||
public static void DrawBox(OrientedBoundingBox box, Color color, float duration = 0.0f, bool depthTest = true)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the arc.
|
||||
/// </summary>
|
||||
/// <param name="position">The center position.</param>
|
||||
/// <param name="orientation">The orientation.</param>
|
||||
/// <param name="radius">The radius.</param>
|
||||
/// <param name="angle">The angle (in radians) of the arc (arc is facing positive Z axis - forward). Use PI*2 for full disc (360 degrees).</param>
|
||||
/// <param name="color">The color.</param>
|
||||
/// <param name="duration">The duration (in seconds). Use 0 to draw it only once.</param>
|
||||
/// <param name="depthTest">If set to <c>true</c> depth test will be performed, otherwise depth will be ignored.</param>
|
||||
public static void DrawArc(Vector3 position, Quaternion orientation, float radius, float angle, Color color, float duration = 0.0f, bool depthTest = true)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the wireframe arc.
|
||||
/// </summary>
|
||||
/// <param name="position">The center position.</param>
|
||||
/// <param name="orientation">The orientation.</param>
|
||||
/// <param name="radius">The radius.</param>
|
||||
/// <param name="angle">The angle (in radians) of the arc (arc is facing positive Z axis - forward). Use PI*2 for full disc (360 degrees).</param>
|
||||
/// <param name="color">The color.</param>
|
||||
/// <param name="duration">The duration (in seconds). Use 0 to draw it only once.</param>
|
||||
/// <param name="depthTest">If set to <c>true</c> depth test will be performed, otherwise depth will be ignored.</param>
|
||||
public static void DrawWireArc(Vector3 position, Quaternion orientation, float radius, float angle, Color color, float duration = 0.0f, bool depthTest = true)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the cone.
|
||||
/// </summary>
|
||||
/// <param name="position">The center position.</param>
|
||||
/// <param name="orientation">The orientation.</param>
|
||||
/// <param name="radius">The radius.</param>
|
||||
/// <param name="angleXY">The angle (in radians) of the cone over the XY axis (cone forward is over X).</param>
|
||||
/// <param name="angleXZ">The angle (in radians) of the cone over the XZ axis (cone forward is over X).</param>
|
||||
/// <param name="color">The color.</param>
|
||||
/// <param name="duration">The duration (in seconds). Use 0 to draw it only once.</param>
|
||||
/// <param name="depthTest">If set to <c>true</c> depth test will be performed, otherwise depth will be ignored.</param>
|
||||
public static void DrawCone(Vector3 position, Quaternion orientation, float radius, float angleXY, float angleXZ, Color color, float duration = 0.0f, bool depthTest = true)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draws the wireframe cone.
|
||||
/// </summary>
|
||||
/// <param name="position">The center position.</param>
|
||||
/// <param name="orientation">The orientation.</param>
|
||||
/// <param name="radius">The radius.</param>
|
||||
/// <param name="angleXY">The angle (in radians) of the cone over the XY axis (cone forward is over X).</param>
|
||||
/// <param name="angleXZ">The angle (in radians) of the cone over the XZ axis (cone forward is over X).</param>
|
||||
/// <param name="color">The color.</param>
|
||||
/// <param name="duration">The duration (in seconds). Use 0 to draw it only once.</param>
|
||||
/// <param name="depthTest">If set to <c>true</c> depth test will be performed, otherwise depth will be ignored.</param>
|
||||
public static void DrawWireCone(Vector3 position, Quaternion orientation, float radius, float angleXY, float angleXZ, Color color, float duration = 0.0f, bool depthTest = true)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -937,7 +937,7 @@ void Actor::EndPlay()
|
||||
}
|
||||
|
||||
// Cleanup managed object
|
||||
DestroyManaged();
|
||||
//DestroyManaged();
|
||||
if (IsRegistered())
|
||||
UnregisterObject();
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ void Script::EndPlay()
|
||||
Flags &= ~ObjectFlags::IsDuringPlay;
|
||||
|
||||
// Cleanup managed object
|
||||
DestroyManaged();
|
||||
//DestroyManaged();
|
||||
if (IsRegistered())
|
||||
UnregisterObject();
|
||||
}
|
||||
|
||||
@@ -200,6 +200,8 @@ namespace FlaxEngine.GUI
|
||||
/// <inheritdoc />
|
||||
public override void Update(float deltaTime)
|
||||
{
|
||||
base.Update(deltaTime);
|
||||
|
||||
// Update navigation
|
||||
if (SkipEvents)
|
||||
{
|
||||
@@ -215,8 +217,6 @@ namespace FlaxEngine.GUI
|
||||
UpdateNavigation(deltaTime, _canvas.NavigateRight.Name, NavDirection.Right, ref _navigationHeldTimeRight, ref _navigationRateTimeRight);
|
||||
UpdateNavigation(deltaTime, _canvas.NavigateSubmit.Name, ref _navigationHeldTimeSubmit, ref _navigationRateTimeSubmit, SubmitFocused);
|
||||
}
|
||||
|
||||
base.Update(deltaTime);
|
||||
}
|
||||
|
||||
private void ConditionalNavigate(NavDirection direction)
|
||||
|
||||
@@ -48,8 +48,8 @@ namespace FlaxEngine.GUI
|
||||
{
|
||||
if (alphaText.Length == 3 && alphaText[0] == '#')
|
||||
style.Color.A = ((StringUtils.HexDigit(alphaText[1]) << 4) + StringUtils.HexDigit(alphaText[2])) / 255.0f;
|
||||
else if (alphaText.Length > 1 && alphaText[alphaText.Length - 1] == '%')
|
||||
style.Color.A = float.Parse(alphaText.Substring(0, alphaText.Length - 1)) / 100.0f;
|
||||
else if (alphaText.Length > 1 && alphaText[alphaText.Length - 1] == '%' && float.TryParse(alphaText.Substring(0, alphaText.Length - 1), out var alpha))
|
||||
style.Color.A = alpha / 100.0f;
|
||||
}
|
||||
context.StyleStack.Push(style);
|
||||
}
|
||||
@@ -297,8 +297,8 @@ namespace FlaxEngine.GUI
|
||||
{
|
||||
if (float.TryParse(text, out var width))
|
||||
output = width;
|
||||
if (text.Length > 1 && text[text.Length - 1] == '%')
|
||||
output = input * float.Parse(text.Substring(0, text.Length - 1)) / 100.0f;
|
||||
if (text.Length > 1 && text[text.Length - 1] == '%' && float.TryParse(text.Substring(0, text.Length - 1), out width))
|
||||
output = input * width / 100.0f;
|
||||
used = true;
|
||||
}
|
||||
return used;
|
||||
|
||||
Reference in New Issue
Block a user