Skip to content

[CORE] Implement LayerStack and Layer base class #13

Description

@mrgreenapple24

Goal

A stack of layers and overlays that receive updates and events in order.

Tasks

  • Layer base class: OnAttach(), OnDetach(), OnUpdate(Timestep), OnEvent(Event&), OnImGuiRender()
  • LayerStack: internal std::vector<Layer*>, layers inserted before overlays
  • PushLayer(Layer*), PushOverlay(Layer*), PopLayer(), PopOverlay()
  • Iterate front-to-back for OnUpdate, back-to-front for rendering
  • Event::Handled flag stops propagation down the stack

Acceptance Criteria

Pushing two layers and one overlay results in correct update/event ordering verified by log output.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions