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

core: move parts of the animation system to hyprutils #8868

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

PaideiaDilemma
Copy link
Contributor

@PaideiaDilemma PaideiaDilemma commented Dec 27, 2024

Requires hyprwm/hyprutils#27

Describe your PR, what does it fix/add?

Moves core components of the animation system to hyprutils. (In order to use it in hyprlock as well)
Introduces smart pointers for animated variables and animation properties.

Interface changes:

  • AnimatedVaraibles are now created/initialized with g_pAnimationManager->createAnimation. That function takes a value to always have AnimatedVaraibles explicitly initialized to a value.
  • All AnimatedVariables are now SPs, resulting in a required operator* for assignments (e.g *m_vRealSize = Vector2D(42,42) and in a change from av.setValue to av->setValue
  • Animation config is now updated with av->setConfig.
  • CAnimatedVaraible now has member functions enabled, getBezierName and getStyle to get their config properties more easily.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Needs testing.
The damage handling was refactored a bit. Previously it damaged before and after a variable update in CAnimationManager::tick. I don't think that is needed and from what i tested it works the same as before.
Possibly needs to be reverted to how it worked before, but the damage handling needs to be moved into functions, because we need to upcast first to get the context of animated variables.

Is it ready for merging, or does it need work?

Need some testing and review.

Formatting needed because search-replace changes
@vaxerski
Copy link
Member

vaxerski commented Jan 1, 2025

I've pushed hyprutils 0.3.1, cmakelists can be updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants