-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add a [pulse]
built-in effect to RichTextLabel
#77117
Add a [pulse]
built-in effect to RichTextLabel
#77117
Conversation
d74e78b
to
c48847e
Compare
Seems useful! Thoughts:
|
Yeah I agree with your thoughts and especially this one. |
To do this, I need to check if it's possible to set a state variable when the RichTextLabel is last modified.
I'm not sure if a dedicated tag for bobbing is warranted, but I may as well remove the bobbing functionality entirely as I don't think it'll be used often. |
I've pushed a commit that removes the |
Don't spent too much time on it, can also be followup work. Would be useful though.
Makes sense IMO |
f511811
to
aa68fb2
Compare
This wouldn't work well with text gradually appearing with visible characters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks ok and it works correctly.
CC @Eoin-ONeill-Yokai, you might be interested ;) |
I think we're close to consensus so I'm putting this on the 4.2 milestone (too late for 4.1 as we entered feature freeze). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature looks good to me, same for the code. Will need to be documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I don't see any problems with the code.
I'm happy to see this integrated directly in the engine if others are; I admittedly only restricted it to a custom RichTextEffect implementation only as a proof of concept to make sure that the API was good enough as I had originally implemented it into the C++ directly. There's a discussion to be had on whether or not the custom RTEs could be less of a burden for users to use, but I don't think a decision should be made there until we really flesh out our asset library situation (as discussed in the sprint right now ;) )
Anyway, looks good and works as expected.
The "ghost" effect in the docs is very nice and quite similar - seems to me that its "span" variable could fit in nicely here, and make it a lot more flexible. Can we combine them? |
This doesn't seem to be something commonly used in games. We have a custom effect system so you can still use it 🙂 Either way, I've squashed commits in this PR and rebased it against |
In games, blinking text is one of the more frequently used animations. It can be (sparingly) used to bring attention to important messages in a chat log or inventory tooltip, for instance. This effect accepts the following options: - `freq`: How fast text blinks (higher is faster). - `color`: The target color multiplier for blinking. The default mostly fades out text, but not entirely (for better accessibility). - `ease`: The easing function exponent to use. Negative values provide in-out easing, which is why `-2.0` is the default.
aa68fb2
to
70e6c3c
Compare
Thanks! |
In games, blinking text is one of the more frequently used animations. It can be (sparingly) used to bring attention to important messages in a chat log or inventory tooltip, for instance.
This effect accepts the following options:
freq
: How fast text blinks (higher is faster).color
: The target color multiplier for blinking. The default mostly fades out text, but not entirely (for better accessibility).ease
: The easing function exponent to use. Negative values provide in-out easing, which is why-2.0
is the default.[pulse]
built-in effect to RichTextLabel godot-proposals#6516.Testing project: test_richtexteffect_pulse.zip
Note: Opening the project will print this error about 100 times, but this occurs when using unmodified
master
branch too:Preview
C++-based version (this PR) on the left, script-based version on the right (included in the testing project):
test_richtexteffect_pulse.mp4