mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-03-23 15:52:56 +08:00
...
This commit is contained in:
@@ -13525,6 +13525,7 @@ GuiFiniteAnimation
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
vuint64_t length = 0;
|
vuint64_t length = 0;
|
||||||
|
vuint64_t currentTime = 0;
|
||||||
Func<void(vuint64_t)> run;
|
Func<void(vuint64_t)> run;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -13540,7 +13541,7 @@ GuiFiniteAnimation
|
|||||||
|
|
||||||
void Run()override
|
void Run()override
|
||||||
{
|
{
|
||||||
auto currentTime = GetTime();
|
currentTime = GetTime();
|
||||||
if (currentTime < length && run)
|
if (currentTime < length && run)
|
||||||
{
|
{
|
||||||
run(currentTime);
|
run(currentTime);
|
||||||
@@ -13549,7 +13550,7 @@ GuiFiniteAnimation
|
|||||||
|
|
||||||
bool GetStopped()override
|
bool GetStopped()override
|
||||||
{
|
{
|
||||||
return GetTime() >= length;
|
return currentTime >= length;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -108,11 +108,7 @@
|
|||||||
<Interpolation><![CDATA[
|
<Interpolation><![CDATA[
|
||||||
func (x: double): double
|
func (x: double): double
|
||||||
{
|
{
|
||||||
var d = 0.1;
|
if (x < 0.5) { return x * x * 2; } else { return 1 - (1 - x) * (1 - x) * 2; }
|
||||||
if (x < d) { return 0; }
|
|
||||||
if (x > (1 - d)) { return 1; }
|
|
||||||
var y = (x - d) * (1 / (1 - d * 2));
|
|
||||||
if (y < 0.5) { return y * y * 2; } else { return 1 - (1 - y) * (1 - y) * 2; }
|
|
||||||
}
|
}
|
||||||
]]></Interpolation>
|
]]></Interpolation>
|
||||||
<Targets>
|
<Targets>
|
||||||
@@ -139,15 +135,15 @@
|
|||||||
{
|
{
|
||||||
case Normal:
|
case Normal:
|
||||||
{
|
{
|
||||||
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::NormalSelected(), cast UInt64 1000);
|
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::NormalSelected(), cast UInt64 500);
|
||||||
}
|
}
|
||||||
case Active:
|
case Active:
|
||||||
{
|
{
|
||||||
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::ActiveSelected(), cast UInt64 1000);
|
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::ActiveSelected(), cast UInt64 500);
|
||||||
}
|
}
|
||||||
case Pressed:
|
case Pressed:
|
||||||
{
|
{
|
||||||
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::PressedSelected(), cast UInt64 1000);
|
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::PressedSelected(), cast UInt64 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,15 +153,15 @@
|
|||||||
{
|
{
|
||||||
case Normal:
|
case Normal:
|
||||||
{
|
{
|
||||||
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Normal(), cast UInt64 1000);
|
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Normal(), cast UInt64 500);
|
||||||
}
|
}
|
||||||
case Active:
|
case Active:
|
||||||
{
|
{
|
||||||
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Active(), cast UInt64 1000);
|
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Active(), cast UInt64 500);
|
||||||
}
|
}
|
||||||
case Pressed:
|
case Pressed:
|
||||||
{
|
{
|
||||||
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Pressed(), cast UInt64 1000);
|
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Pressed(), cast UInt64 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user