When methods like background, color, line_width and so on are run during the setup event, their behavior should be different than in other events. Instead of setting the current color, for example, color should change the default color that is reset at the start of each frame. This results in the most intuitive user experience.
The current implementation of this logic is a mess and should be improved. Two possible approaches are:
Create an alternate "setup mode" module with default-setting implementations. This module is loaded at startup then swapped out once drawing starts for the normal implementations.
Leave method implementations as is then, in between setup and the first update call, figure out the values of these special functions and store them as defaults.
When methods like
background
,color
,line_width
and so on are run during thesetup
event, their behavior should be different than in other events. Instead of setting the current color, for example,color
should change the default color that is reset at the start of each frame. This results in the most intuitive user experience.The current implementation of this logic is a mess and should be improved. Two possible approaches are:
The second approach is the cleanest.