Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WApps] Add ItemOpacity property #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

huiyueun
Copy link
Contributor

Signed-off-by: huiyu.eun [email protected]

@@ -152,12 +152,12 @@ internal void AnimateShowPage(RotaryItemWrapper wrapper, bool isReverse = true,
rotaryItem.Position = new Position(pos.X + (isReverse ? 70 : -70), pos.Y); ;

animationCore.AnimateTo(rotaryItem, "Position", pos, 167 + sTime, 84 + sTime + 334, alphaSineOut33);
animationCore.AnimateTo(rotaryItem, "Opacity", 1.0f, 167 + sTime, 84 + sTime + 334, alphaSineOut33);
animationCore.AnimateTo(rotaryItem, "Opacity", rotaryItem.ItemOpacity, 167 + sTime, 84 + sTime + 334, alphaSineOut33);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

float previousOpacity = rotaryItem.Opacity;
            rotaryItem.Opacity = 0.0f;
...
                animationCore.AnimateTo(rotaryItem, "Opacity", previousOpacity, 167 + sTime, 84 + sTime + 334, alphaSineOut33);

@huiyueun huiyueun force-pushed the NUI_Add_opacity_Property branch from c392622 to 596c968 Compare July 10, 2020 08:29
}
set
{
itemOpacity = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ Opacity = itemOpacity;

And after modifying test app it only then works:

-            float opacity = last.Opacity != 0.5f ? 0.5f : 1.0f;
-            last.Opacity = opacity;
+            float opacity = last.ItemOpacity != 0.5f ? 0.5f : 1.0f;^M
+            last.ItemOpacity = opacity;^M

@rabbitfor rabbitfor force-pushed the master branch 2 times, most recently from e3c4c42 to cd8f109 Compare November 16, 2020 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants