#pragma once

#include <lvgl.h>
#include <cstdint>

namespace GameKit {

struct Tick {
    uint32_t dtMs = 0;
    uint32_t nowMs = 0;
};

enum class InputKind : uint8_t {
    Up,
    Down,
    Left,
    Right,
    Confirm,
    Cancel,
    Menu,
    Touch,
    Swipe,
    Unknown,
};

struct InputEvent {
    InputKind kind = InputKind::Unknown;
    lv_point_t point {0, 0};
};

class Scene {
public:
    virtual ~Scene() = default;
    virtual void onEnter(lv_obj_t* root) = 0;
    virtual void onExit() = 0;
    virtual void onInput(const InputEvent& input) = 0;
    virtual void onTick(const Tick& tick) = 0;
    virtual void render() = 0;
};

} // namespace GameKit
