27 lines
697 B
C++
27 lines
697 B
C++
#pragma once
|
|
#include <array>
|
|
#include "ui/UIConstants.h"
|
|
#include <SDL3/SDL.h>
|
|
|
|
namespace ui {
|
|
|
|
struct MenuLayoutParams {
|
|
int logicalW;
|
|
int logicalH;
|
|
int winW;
|
|
int winH;
|
|
float logicalScale;
|
|
};
|
|
|
|
// Compute menu button rects in logical coordinates (content-local)
|
|
std::array<SDL_FRect, MENU_BTN_COUNT> computeMenuButtonRects(const MenuLayoutParams& p);
|
|
|
|
// Hit test a point given in logical content-local coordinates against menu buttons
|
|
// Returns index 0..4 or -1 if none
|
|
int hitTestMenuButtons(const MenuLayoutParams& p, float localX, float localY);
|
|
|
|
// Return settings button rect (logical coords)
|
|
SDL_FRect settingsButtonRect(const MenuLayoutParams& p);
|
|
|
|
} // namespace ui
|