Skip to content

Document event order when using views (on_draw, on_update) #1232

@DigiDuncan

Description

@DigiDuncan

Enhancement request:

Make Window and View's on_draw() call self.clear() instead of pass.

What should be added/changed?

See above 😅
It's possible this only makes sense to do for Window and not View, as @einarf points out here:

What I'm not sure about right now is how the on_draw / on_update events work with views. As far as I remember both the window and view methods can be called in a frame.
That in turn can case games to clear the window twice

What would it help with?

Since on_draw() is likely to be overriden anyway, this gives a resonable default in which it doesn't appear like methods like arcade.set_background_color() (which require a screen to be cleared to have noticeable effect) do anything.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions