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

Extract glow/throb code to class #1611

Open
DanRStevens opened this issue Feb 19, 2025 · 0 comments
Open

Extract glow/throb code to class #1611

DanRStevens opened this issue Feb 19, 2025 · 0 comments

Comments

@DanRStevens
Copy link
Member

The reworked glow/throb code in DetailMap.cpp is perhaps more generally usable, and should be extracted to a class with the glow parameters set as constructor arguments.

The code in DetailMap.cpp is used to pulse the mining beacons. In ResourceInfoBar.cpp there is similar code to pulse the resource display when resources are low. We should try to re-use code here.

It would be fine for the instances of the class to be static variables (members of an unnamed namespace), replacing the current grouping of static variables.

Maybe at some time in the future, instances of the class might become member fields of the class that uses them, though maybe not.

We might possibly want to distinguish between the glow parameters, which could be collected into a constexpr defined struct, vs the NAS2D::Timer field used to animate based on those parameters.

Throb::Throb(const ThrobParameters& throbParameters)
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

No branches or pull requests

1 participant