Fix visibilty anim groups for layout animations
This commit is contained in:
parent
999a0c76ae
commit
2205174ffe
@ -96,17 +96,17 @@ namespace LayoutBXLYT
|
||||
if (Runtime.LayoutEditor.AnimationEditMode)
|
||||
{
|
||||
//Change any UI that can be keyed or is keyed
|
||||
tranXUD.ReloadTheme();
|
||||
tranYUD.ReloadTheme();
|
||||
tranZUD.ReloadTheme();
|
||||
rotXUD.ReloadTheme();
|
||||
rotYUD.ReloadTheme();
|
||||
rotZUD.ReloadTheme();
|
||||
scaleXUD.ReloadTheme();
|
||||
scaleYUD.ReloadTheme();
|
||||
sizeXUD.ReloadTheme();
|
||||
sizeYUD.ReloadTheme();
|
||||
alphaUD.ReloadTheme();
|
||||
tranXUD.SetUnkeyedTheme();
|
||||
tranYUD.SetUnkeyedTheme();
|
||||
tranZUD.SetUnkeyedTheme();
|
||||
rotXUD.SetUnkeyedTheme();
|
||||
rotYUD.SetUnkeyedTheme();
|
||||
rotZUD.SetUnkeyedTheme();
|
||||
scaleXUD.SetUnkeyedTheme();
|
||||
scaleYUD.SetUnkeyedTheme();
|
||||
sizeXUD.SetUnkeyedTheme();
|
||||
sizeYUD.SetUnkeyedTheme();
|
||||
alphaUD.SetUnkeyedTheme();
|
||||
|
||||
if (ActivePane.animController.PaneSRT.ContainsKey(LPATarget.TranslateX))
|
||||
tranXUD.SetKeyedTheme();
|
||||
@ -121,9 +121,16 @@ namespace LayoutBXLYT
|
||||
rotYUD.SetKeyedTheme();
|
||||
if (ActivePane.animController.PaneSRT.ContainsKey(LPATarget.RotateZ))
|
||||
rotZUD.SetKeyedTheme();
|
||||
|
||||
paneVisibleChk.ShowBorder = true;
|
||||
paneVisibleChk.BorderColor = Color.Red;
|
||||
paneVisibleChk.Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
paneVisibleChk.ShowBorder = false;
|
||||
paneVisibleChk.Refresh();
|
||||
|
||||
//Set UI to default theme colors
|
||||
tranXUD.ReloadTheme();
|
||||
tranYUD.ReloadTheme();
|
||||
|
@ -285,6 +285,9 @@ namespace LayoutBXLYT
|
||||
if (e is TreeViewEventArgs) {
|
||||
var node = ((TreeViewEventArgs)e).Node;
|
||||
|
||||
if (Runtime.LayoutEditor.AnimationEditMode)
|
||||
OnSelectedAnimationMode();
|
||||
|
||||
if (!isSelectedInViewer)
|
||||
ActiveViewport?.SelectedPanes.Clear();
|
||||
|
||||
@ -315,6 +318,13 @@ namespace LayoutBXLYT
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSelectedAnimationMode()
|
||||
{
|
||||
if (AnimationPanel == null) return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void UpdateViewport() {
|
||||
ActiveViewport?.UpdateViewport();
|
||||
}
|
||||
@ -1123,7 +1133,9 @@ namespace LayoutBXLYT
|
||||
{
|
||||
Runtime.LayoutEditor.AnimationEditMode = editorModeCB.SelectedIndex == 1;
|
||||
if (Runtime.LayoutEditor.AnimationEditMode)
|
||||
{
|
||||
chkAutoKey.Enabled = true;
|
||||
}
|
||||
else
|
||||
chkAutoKey.Enabled = false;
|
||||
|
||||
|
@ -411,7 +411,7 @@ namespace LayoutBXLYT
|
||||
|
||||
private void RenderPanes(BxlytShader shader, BasePane pane, bool isRoot, byte parentAlpha, bool parentAlphaInfluence, BasePane partPane = null, int stage = 0)
|
||||
{
|
||||
if (!pane.DisplayInEditor || !pane.animController.Visibile)
|
||||
if (!pane.DisplayInEditor)
|
||||
return;
|
||||
|
||||
GL.PushMatrix();
|
||||
@ -472,7 +472,7 @@ namespace LayoutBXLYT
|
||||
{
|
||||
bool isSelected = SelectedPanes.Contains(pane);
|
||||
|
||||
if (!pane.Visible)
|
||||
if (!pane.Visible && !pane.animController.Visibile)
|
||||
DrawDefaultPane(shader, pane, isSelected);
|
||||
else if (pane is IPicturePane)
|
||||
BxlytToGL.DrawPictureBox(pane, GameWindow, effectiveAlpha, Textures, isSelected);
|
||||
@ -1234,21 +1234,28 @@ namespace LayoutBXLYT
|
||||
posY = pane.Translate.Y - pickMouse.Y;
|
||||
}
|
||||
|
||||
if (!Runtime.LayoutEditor.TransformChidlren)
|
||||
pane.KeepChildrenTransform(posX, posY);
|
||||
|
||||
if (snapToGrid)
|
||||
if (Runtime.LayoutEditor.AnimationEditMode)
|
||||
{
|
||||
int gridCubeWidth = 16, gridCubeHeight = 16;
|
||||
|
||||
pane.Translate = new Syroot.Maths.Vector3F(
|
||||
(float)(Math.Round(posX / gridCubeWidth) * gridCubeWidth),
|
||||
(float)(Math.Round(posY / gridCubeHeight) * gridCubeHeight),
|
||||
posZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
pane.Translate = new Syroot.Maths.Vector3F( posX, posY, posZ);
|
||||
if (!Runtime.LayoutEditor.TransformChidlren)
|
||||
pane.KeepChildrenTransform(posX, posY);
|
||||
|
||||
if (snapToGrid)
|
||||
{
|
||||
int gridCubeWidth = 16, gridCubeHeight = 16;
|
||||
|
||||
pane.Translate = new Syroot.Maths.Vector3F(
|
||||
(float)(Math.Round(posX / gridCubeWidth) * gridCubeWidth),
|
||||
(float)(Math.Round(posY / gridCubeHeight) * gridCubeHeight),
|
||||
posZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
pane.Translate = new Syroot.Maths.Vector3F(posX, posY, posZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1251,6 +1251,15 @@ namespace BarSlider
|
||||
Controls.Add(textBox);
|
||||
}
|
||||
|
||||
private bool ShowUnkeyedBorder = false;
|
||||
|
||||
public void SetUnkeyedTheme()
|
||||
{
|
||||
ReloadTheme();
|
||||
|
||||
ShowUnkeyedBorder = true;
|
||||
}
|
||||
|
||||
public void SetKeyedTheme()
|
||||
{
|
||||
BackColor = FormThemes.BaseTheme.KeyFrameColor;
|
||||
@ -1266,6 +1275,8 @@ namespace BarSlider
|
||||
|
||||
public void ReloadTheme()
|
||||
{
|
||||
ShowUnkeyedBorder = false;
|
||||
|
||||
BackColor = FormThemes.BaseTheme.ValueBarSliderElapseBottmColor;
|
||||
|
||||
ThumbPenColor = FormThemes.BaseTheme.ValueBarSliderElapseBottmColor;
|
||||
@ -1347,6 +1358,15 @@ namespace BarSlider
|
||||
_elapsedInnerColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (ShowUnkeyedBorder)
|
||||
{
|
||||
e.Graphics.DrawRectangle(new Pen(Color.Red), new Rectangle(
|
||||
ClientRectangle.Location.X,
|
||||
ClientRectangle.Location.Y,
|
||||
ClientRectangle.Width - 1,
|
||||
ClientRectangle.Height- 1));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -21,6 +21,12 @@ namespace Toolbox.Library.Forms
|
||||
/// </summary>
|
||||
private Image TickTock => Properties.Resources.CheckMark;
|
||||
|
||||
public Color BorderColor = Color.Black;
|
||||
|
||||
public int BorderSize = 1;
|
||||
|
||||
public bool ShowBorder = false;
|
||||
|
||||
public STCheckBox()
|
||||
{
|
||||
SetColor();
|
||||
@ -59,6 +65,15 @@ namespace Toolbox.Library.Forms
|
||||
{
|
||||
e.Graphics.DrawImage(this.TickTock, 2, 2, 12, 12);
|
||||
}
|
||||
|
||||
if (ShowBorder)
|
||||
{
|
||||
e.Graphics.DrawRectangle(new Pen(BorderColor), new Rectangle(
|
||||
ClientRectangle.Location.X,
|
||||
ClientRectangle.Location.Y,
|
||||
ClientRectangle.Width - BorderSize,
|
||||
ClientRectangle.Height - BorderSize));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sets the size of the layout to 16x;16x
|
||||
|
Loading…
Reference in New Issue
Block a user