fixed progress bar
This commit is contained in:
26
src/ui/MenuLayout.h
Normal file
26
src/ui/MenuLayout.h
Normal file
@ -0,0 +1,26 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user