#ifndef UI_H
#define UI_H

#include <SDL2/SDL.h>

namespace UI {

inline bool hit(const SDL_Rect& r, int mx, int my) {
    return mx >= r.x && mx <= r.x + r.w && my >= r.y && my <= r.y + r.h;
}

// 菜单按钮
constexpr SDL_Rect BTN_START  = {50, 250, 150, 50};
constexpr SDL_Rect BTN_LEVEL  = {50, 330, 150, 50};
constexpr SDL_Rect BTN_QUIT   = {50, 410, 150, 50};

// 难度按钮
constexpr SDL_Rect BTN_EASY   = {275, 150, 150, 100};
constexpr SDL_Rect BTN_MEDIUM = {275, 300, 150, 100};
constexpr SDL_Rect BTN_HARD   = {275, 450, 150, 100};

// 返回按钮
constexpr SDL_Rect BTN_BACK   = {30, 550, 150, 50};

// HP 条
constexpr int HP_BAR_X = 100;
constexpr int HP_BAR_Y = 10;

}

#endif
