Is using a timer to repaint the GUI at specific intervals the best approach? I’m trying to repaint my GUI component every x milliseconds.
I’m currently running into some issues. I need to send in a reference to my GUI component into my Timer constructor so that way I can access the the repaint function of my GUI component. So I need to include that GUI component in the header of my Timer, but I need to include the Timer in the header of my GUI component, so that I can use it. Using this method, Id have to use forward declaration in order to avoid an endless loop of includes, or a macro,
Is there a better way to have access to the repaint method from the Timer? Or even a totally different method?