You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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. InResourceInfoBar.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
definedstruct
, vs theNAS2D::Timer
field used to animate based on those parameters.The text was updated successfully, but these errors were encountered: