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
If user triggers a specific input more than once in a frame, it won't visualize it correctly.
Fix: make the visualizer be event driven to allow to somehow manually separate the rectangles.
Some direct references: void GfxButton::update(bool keyState)
That's what creates the rectangles. Move the creation from there to something that gets called on input events. When that happens, if the last rectangle is not distant enough (the distance from the origin is less than rect.height + 1) then move it at rect.height + 1 (also shift all the existing ones). That's the only way to make it separate the rectangles correctly, even though it will break a little bit the "rectangles history", as the ones pushed upwards will appear to be pressed in the past. Update still has to make the last rectangle to grow (if the input is still held).
Another way of doing that is just increasing the tick-rate the program is run at (or even make it customizable)
The key reading is not event based, hence the only way is to increase the FPS.
The text was updated successfully, but these errors were encountered:
If user triggers a specific input more than once in a frame, it won't visualize it correctly.
Fix: make the visualizer be event driven to allow to somehow manually separate the rectangles.Some direct references:void GfxButton::update(bool keyState)
That's what creates the rectangles. Move the creation from there to something that gets called on input events. When that happens, if the last rectangle is not distant enough (the distance from the origin is less than
rect.height + 1
) then move it atrect.height + 1
(also shift all the existing ones). That's the only way to make it separate the rectangles correctly, even though it will break a little bit the "rectangles history", as the ones pushed upwards will appear to be pressed in the past. Update still has to make the last rectangle to grow (if the input is still held).Another way of doing that is just increasing the tick-rate the program is run at (or even make it customizable)The key reading is not event based, hence the only way is to increase the FPS.
The text was updated successfully, but these errors were encountered: