Export color animation functions & implemented RemoveColorAnimation#241
Merged
themrdemonized merged 3 commits intothemrdemonized:all-in-one-vs2022-wpofrom Jun 3, 2025
Conversation
Contributor
|
Damn I never even knew we had color animations. |
afdc963
into
themrdemonized:all-in-one-vs2022-wpo
9 of 10 checks passed
Contributor
Author
|
@Bence7661 Color animations did exist on When calling Here is the code in engine that does that. Source : src/xrGame/ui/UIXmlInit.cpp#L174 LPCSTR str_flag = xml_doc.ReadAttrib(path, index, "light_anim", "");
int flag_cyclic = xml_doc.ReadAttribInt(path, index, "la_cyclic", 1);
int flag_text = xml_doc.ReadAttribInt(path, index, "la_text", 1);
int flag_texture = xml_doc.ReadAttribInt(path, index, "la_texture", 1);
int flag_alpha = xml_doc.ReadAttribInt(path, index, "la_alpha", 0);
u8 flags = 0;
if (flag_cyclic) flags |= LA_CYCLIC;
if (flag_alpha) flags |= LA_ONLYALPHA;
if (flag_text) flags |= LA_TEXTCOLOR;
if (flag_texture) flags |= LA_TEXTURECOLOR;
pWnd->SetColorAnimation(str_flag, flags);For your information, color animations are also implemented on Here's again a fragment from the engine. Source : src/xrGame/ui/UIXmlInit.cpp#L212 LPCSTR str_flag = xml_doc.ReadAttrib(path, index, "light_anim", "");
int flag_cyclic = xml_doc.ReadAttribInt(path, index, "la_cyclic", 1);
int flag_alpha = xml_doc.ReadAttribInt(path, index, "la_alpha", 0);
u8 flags = LA_TEXTCOLOR;
if (flag_cyclic) flags |= LA_CYCLIC;
if (flag_alpha) flags |= LA_ONLYALPHA;
pWnd->SetColorAnimation(str_flag, flags); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
In this PR, I added new script exports for :
CUIStatic::SetColorAnimationCUIStatic::ResetColorAnimationCUIStatic::RemoveColorAnimationCUIStatic::RemoveColorAnimationis a new method that unsets color animation variables, and sets the texture color to white.