Remove some unused statics.
This commit is contained in:
1 parent
1ff2182df6
commit
c9fb10a20b
5 files changed
+324
-97
No files matched your search
@@ -28,103 +28,7 @@
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static1>
|
||||
<Static2>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>SelectSlidePlayer</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>20</X>
|
||||
<Y>105</Y>
|
||||
<Z>-4,00</Z>
|
||||
<W>108</W>
|
||||
<H>20</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>SelectSlideColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static2>
|
||||
<Static3>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>SelectSlidePlayer</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>20</X>
|
||||
<Y>260</Y>
|
||||
<Z>-4,00</Z>
|
||||
<W>108</W>
|
||||
<H>20</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>SelectSlideColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static3>
|
||||
<Static4>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>SelectSlidePlayer</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>20</X>
|
||||
<Y>415</Y>
|
||||
<Z>-4,00</Z>
|
||||
<W>108</W>
|
||||
<H>20</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>SelectSlideColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static4>
|
||||
<Static5>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>SelectSlidePlayer</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>1152</X>
|
||||
<Y>105</Y>
|
||||
<Z>-4,00</Z>
|
||||
<W>108</W>
|
||||
<H>20</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>SelectSlideColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static5>
|
||||
<Static6>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>SelectSlidePlayer</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>1152</X>
|
||||
<Y>260</Y>
|
||||
<Z>-4,00</Z>
|
||||
<W>108</W>
|
||||
<H>20</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>SelectSlideColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static6>
|
||||
<Static7>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>SelectSlidePlayer</Skin>
|
||||
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
|
||||
<X>1152</X>
|
||||
<Y>415</Y>
|
||||
<Z>-4,00</Z>
|
||||
<W>108</W>
|
||||
<H>20</H>
|
||||
<!--<Color>: Static color from ColorScheme (high priority)-->
|
||||
<!--or <R>, <G>, <B>, <A> (lower priority)-->
|
||||
<Color>SelectSlideColor</Color>
|
||||
<!--<Reflection> If exists:-->
|
||||
<!-- <Space>: Reflection Space-->
|
||||
<!-- <Height>: Reflection Height-->
|
||||
</Static7>
|
||||
</Static1>
|
||||
<StaticPlayer1>
|
||||
<!--<Skin>: Texture name-->
|
||||
<Skin>PlayerSelector</Skin>
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Lib.Draw;
|
||||
|
||||
namespace Vocaluxe.Menu.Animations
|
||||
{
|
||||
public class CAnimation:IAnimation
|
||||
{
|
||||
private IAnimation _Animation;
|
||||
|
||||
public CAnimation(EAnimationType Type)
|
||||
{
|
||||
setAnimation(Type);
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
_Animation.Init();
|
||||
}
|
||||
|
||||
public bool LoadAnimation(string item, XPathNavigator navigator)
|
||||
{
|
||||
return _Animation.LoadAnimation(item, navigator);
|
||||
}
|
||||
|
||||
public bool SaveAnimation(XmlWriter writer)
|
||||
{
|
||||
return _Animation.SaveAnimation(writer);
|
||||
}
|
||||
|
||||
public void StartAnimation()
|
||||
{
|
||||
_Animation.StartAnimation();
|
||||
}
|
||||
|
||||
public void StopAnimation()
|
||||
{
|
||||
_Animation.StopAnimation();
|
||||
}
|
||||
|
||||
public void ResetAnimation()
|
||||
{
|
||||
_Animation.ResetAnimation();
|
||||
}
|
||||
|
||||
public bool AnimationActive()
|
||||
{
|
||||
return _Animation.AnimationActive();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
_Animation.Update();
|
||||
}
|
||||
|
||||
public void setRect(SRectF rect)
|
||||
{
|
||||
_Animation.setRect(rect);
|
||||
}
|
||||
|
||||
public SRectF getRect()
|
||||
{
|
||||
return _Animation.getRect();
|
||||
}
|
||||
|
||||
public void setColor(SColorF color)
|
||||
{
|
||||
_Animation.setColor(color);
|
||||
}
|
||||
|
||||
public SColorF getColor()
|
||||
{
|
||||
return _Animation.getColor();
|
||||
}
|
||||
|
||||
public void setAnimation(EAnimationType Type)
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case EAnimationType.Resize:
|
||||
_Animation = new CAnimationResize();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Lib.Draw;
|
||||
|
||||
namespace Vocaluxe.Menu.Animations
|
||||
{
|
||||
public enum EAnimationType
|
||||
{
|
||||
Resize
|
||||
}
|
||||
|
||||
public enum EAnimationRepeat
|
||||
{
|
||||
None,
|
||||
Reset,
|
||||
Repeat,
|
||||
RepeatWithReset
|
||||
}
|
||||
|
||||
public abstract class CAnimationFramework:IAnimation
|
||||
{
|
||||
public bool _AnimationLoaded;
|
||||
|
||||
public EAnimationType Type;
|
||||
public EAnimationRepeat Repeat;
|
||||
public float Speed;
|
||||
|
||||
public Stopwatch Timer = new Stopwatch();
|
||||
public bool ResetMode = false;
|
||||
|
||||
public abstract void Init();
|
||||
|
||||
public virtual bool LoadAnimation(string item, XPathNavigator navigator)
|
||||
{
|
||||
_AnimationLoaded = true;
|
||||
|
||||
_AnimationLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Speed", navigator, ref Speed);
|
||||
_AnimationLoaded &= CHelper.TryGetEnumValueFromXML<EAnimationRepeat>(item + "/Repeat", navigator, ref Repeat);
|
||||
|
||||
return _AnimationLoaded;
|
||||
}
|
||||
|
||||
public virtual bool SaveAnimation(XmlWriter writer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual void StartAnimation()
|
||||
{
|
||||
Timer.Start();
|
||||
}
|
||||
|
||||
public virtual void StopAnimation()
|
||||
{
|
||||
Timer.Stop();
|
||||
Timer.Reset();
|
||||
}
|
||||
|
||||
public virtual void ResetAnimation()
|
||||
{
|
||||
ResetMode = !ResetMode;
|
||||
}
|
||||
|
||||
public virtual bool AnimationActive()
|
||||
{
|
||||
return Timer.IsRunning;
|
||||
}
|
||||
|
||||
public virtual void setRect(SRectF rect)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual SRectF getRect()
|
||||
{
|
||||
return new SRectF();
|
||||
}
|
||||
|
||||
public virtual void setColor(SColorF color)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual SColorF getColor()
|
||||
{
|
||||
return new SColorF();
|
||||
}
|
||||
|
||||
public abstract void Update();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Lib.Draw;
|
||||
|
||||
namespace Vocaluxe.Menu.Animations
|
||||
{
|
||||
public class CAnimationResize : CAnimationFramework
|
||||
{
|
||||
public SRectF FinalRect;
|
||||
public SRectF CurrentRect;
|
||||
public SRectF OriginalRect;
|
||||
|
||||
public CAnimationResize()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
Type = EAnimationType.Resize;
|
||||
}
|
||||
|
||||
public override bool LoadAnimation(string item, XPathNavigator navigator)
|
||||
{
|
||||
//Load normal animation-options
|
||||
_AnimationLoaded &= base.LoadAnimation(item, navigator);
|
||||
|
||||
//Load specific animation-options
|
||||
_AnimationLoaded &= CHelper.TryGetFloatValueFromXML(item + "/X", navigator, ref FinalRect.X);
|
||||
_AnimationLoaded &= CHelper.TryGetFloatValueFromXML(item + "/Y", navigator, ref FinalRect.Y);
|
||||
_AnimationLoaded &= CHelper.TryGetFloatValueFromXML(item + "/W", navigator, ref FinalRect.W);
|
||||
_AnimationLoaded &= CHelper.TryGetFloatValueFromXML(item + "/H", navigator, ref FinalRect.H);
|
||||
|
||||
return _AnimationLoaded;
|
||||
}
|
||||
|
||||
public override void setRect(SRectF rect)
|
||||
{
|
||||
OriginalRect = rect;
|
||||
}
|
||||
|
||||
public override SRectF getRect()
|
||||
{
|
||||
return CurrentRect;
|
||||
}
|
||||
|
||||
public override void StartAnimation()
|
||||
{
|
||||
base.StartAnimation();
|
||||
|
||||
CurrentRect = OriginalRect;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
//Update CurrentRect
|
||||
if (!ResetMode)
|
||||
{
|
||||
CLog.LogError((CurrentRect.X + ((FinalRect.X - CurrentRect.X) / Speed * Timer.ElapsedMilliseconds)).ToString("#.#####"));
|
||||
CurrentRect.X = CurrentRect.X + ((FinalRect.X - CurrentRect.X) / Speed * Timer.ElapsedMilliseconds);
|
||||
CurrentRect.Y = CurrentRect.Y + ((FinalRect.Y - CurrentRect.Y) / Speed * Timer.ElapsedMilliseconds);
|
||||
CurrentRect.H = CurrentRect.H + ((FinalRect.H - CurrentRect.H) / Speed * Timer.ElapsedMilliseconds);
|
||||
CurrentRect.W = CurrentRect.W + ((FinalRect.W - CurrentRect.W) / Speed * Timer.ElapsedMilliseconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentRect.X = CurrentRect.X + ((OriginalRect.X - CurrentRect.X) / Speed * Timer.ElapsedMilliseconds);
|
||||
CurrentRect.Y = CurrentRect.Y + ((OriginalRect.Y - CurrentRect.Y) / Speed * Timer.ElapsedMilliseconds);
|
||||
CurrentRect.H = CurrentRect.H + ((OriginalRect.H - CurrentRect.H) / Speed * Timer.ElapsedMilliseconds);
|
||||
CurrentRect.W = CurrentRect.W + ((OriginalRect.W - CurrentRect.W) / Speed * Timer.ElapsedMilliseconds);
|
||||
}
|
||||
|
||||
if (CurrentRect.X == FinalRect.X && CurrentRect.Y == FinalRect.Y && CurrentRect.H == FinalRect.H && CurrentRect.W == FinalRect.W)
|
||||
{
|
||||
switch (Repeat)
|
||||
{
|
||||
case EAnimationRepeat.Repeat:
|
||||
StopAnimation();
|
||||
CurrentRect = OriginalRect;
|
||||
StartAnimation();
|
||||
break;
|
||||
|
||||
case EAnimationRepeat.RepeatWithReset:
|
||||
ResetAnimation();
|
||||
break;
|
||||
|
||||
case EAnimationRepeat.Reset:
|
||||
if (!ResetMode)
|
||||
ResetAnimation();
|
||||
else
|
||||
StopAnimation();
|
||||
break;
|
||||
|
||||
case EAnimationRepeat.None:
|
||||
StopAnimation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.XPath;
|
||||
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Lib.Draw;
|
||||
|
||||
namespace Vocaluxe.Menu.Animations
|
||||
{
|
||||
interface IAnimation
|
||||
{
|
||||
void Init();
|
||||
bool LoadAnimation(string item, XPathNavigator navigator);
|
||||
bool SaveAnimation(XmlWriter writer);
|
||||
|
||||
void setRect(SRectF rect);
|
||||
SRectF getRect();
|
||||
void setColor(SColorF color);
|
||||
SColorF getColor();
|
||||
|
||||
void StartAnimation();
|
||||
void StopAnimation();
|
||||
void ResetAnimation();
|
||||
bool AnimationActive();
|
||||
void Update();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user