diff --git a/Import/GacUI.cpp b/Import/GacUI.cpp index 830b5e8a..e5b80c4e 100644 --- a/Import/GacUI.cpp +++ b/Import/GacUI.cpp @@ -13525,6 +13525,7 @@ GuiFiniteAnimation { protected: vuint64_t length = 0; + vuint64_t currentTime = 0; Func run; public: @@ -13540,7 +13541,7 @@ GuiFiniteAnimation void Run()override { - auto currentTime = GetTime(); + currentTime = GetTime(); if (currentTime < length && run) { run(currentTime); @@ -13549,7 +13550,7 @@ GuiFiniteAnimation bool GetStopped()override { - return GetTime() >= length; + return currentTime >= length; } }; diff --git a/SampleForDoc/GacUI/UIRes/32bits/kb_animation.bin b/SampleForDoc/GacUI/UIRes/32bits/kb_animation.bin index 50869d82..7bc13dcd 100644 Binary files a/SampleForDoc/GacUI/UIRes/32bits/kb_animation.bin and b/SampleForDoc/GacUI/UIRes/32bits/kb_animation.bin differ diff --git a/SampleForDoc/GacUI/UIRes/64bits/kb_animation.bin b/SampleForDoc/GacUI/UIRes/64bits/kb_animation.bin index 3e39e258..3dd5fc80 100644 Binary files a/SampleForDoc/GacUI/UIRes/64bits/kb_animation.bin and b/SampleForDoc/GacUI/UIRes/64bits/kb_animation.bin differ diff --git a/SampleForDoc/GacUI/XmlRes/kb_animation/Resource.xml b/SampleForDoc/GacUI/XmlRes/kb_animation/Resource.xml index 934b42ee..9094faec 100644 --- a/SampleForDoc/GacUI/XmlRes/kb_animation/Resource.xml +++ b/SampleForDoc/GacUI/XmlRes/kb_animation/Resource.xml @@ -108,11 +108,7 @@ (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; } + if (x < 0.5) { return x * x * 2; } else { return 1 - (1 - x) * (1 - x) * 2; } } ]]> @@ -139,15 +135,15 @@ { case Normal: { - newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::NormalSelected(), cast UInt64 1000); + newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::NormalSelected(), cast UInt64 500); } case Active: { - newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::ActiveSelected(), cast UInt64 1000); + newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::ActiveSelected(), cast UInt64 500); } case Pressed: { - newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::PressedSelected(), cast UInt64 1000); + newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::PressedSelected(), cast UInt64 500); } } } @@ -157,15 +153,15 @@ { case Normal: { - newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Normal(), cast UInt64 1000); + newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Normal(), cast UInt64 500); } case Active: { - newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Active(), cast UInt64 1000); + newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Active(), cast UInt64 500); } case Pressed: { - newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Pressed(), cast UInt64 1000); + newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Pressed(), cast UInt64 500); } } }