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
Is it possible to put a spinner() into a Render() function of a component? The naive approach didn't work:
autoRender() -> Element override {
returnspinner(15, step_++);
}
The shipped examples only show how you can redraw the entire screen by sleeping from a thread. Is there a way to control to control the refresh rate from within a component that drives Render calls by the main loop? Or maybe use a steady clock within the component to set an internal refresh rate by something along the lines of if ((now - last_update_) > 1s)?
When I move the mouse over the component, I actually see the animation. So what I'm asking is perhaps: can a component generate (custom) events at given pulse?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is it possible to put a
spinner()
into aRender()
function of a component? The naive approach didn't work:The shipped examples only show how you can redraw the entire screen by sleeping from a thread. Is there a way to control to control the refresh rate from within a component that drives
Render
calls by the main loop? Or maybe use a steady clock within the component to set an internal refresh rate by something along the lines ofif ((now - last_update_) > 1s)
?When I move the mouse over the component, I actually see the animation. So what I'm asking is perhaps: can a component generate (custom) events at given pulse?
Beta Was this translation helpful? Give feedback.
All reactions