feat(service-menu): pobla VIDEO amb zoom, fullscreen, vsync, AA i postfx
This commit is contained in:
@@ -55,3 +55,12 @@ service_menu:
|
|||||||
controls: "CONTROLS"
|
controls: "CONTROLS"
|
||||||
back: "ENRERE"
|
back: "ENRERE"
|
||||||
exit: "EIXIR DEL JOC"
|
exit: "EIXIR DEL JOC"
|
||||||
|
# Items del submenu VIDEO
|
||||||
|
video_zoom: "ZOOM"
|
||||||
|
video_fullscreen: "PANTALLA COMPLETA"
|
||||||
|
video_vsync: "VSYNC"
|
||||||
|
video_aa: "ANTIALIAS"
|
||||||
|
video_postfx: "POSTPROCESSAT"
|
||||||
|
# Valors comuns
|
||||||
|
value_on: "ACTIU"
|
||||||
|
value_off: "INACTIU"
|
||||||
|
|||||||
@@ -54,3 +54,12 @@ service_menu:
|
|||||||
controls: "CONTROLS"
|
controls: "CONTROLS"
|
||||||
back: "BACK"
|
back: "BACK"
|
||||||
exit: "EXIT GAME"
|
exit: "EXIT GAME"
|
||||||
|
# Items of VIDEO submenu
|
||||||
|
video_zoom: "ZOOM"
|
||||||
|
video_fullscreen: "FULLSCREEN"
|
||||||
|
video_vsync: "VSYNC"
|
||||||
|
video_aa: "ANTIALIAS"
|
||||||
|
video_postfx: "POSTPROCESS"
|
||||||
|
# Common values
|
||||||
|
value_on: "ON"
|
||||||
|
value_off: "OFF"
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ namespace Defaults::ServiceMenu {
|
|||||||
constexpr int HIGHLIGHT_THICKNESS = 1;
|
constexpr int HIGHLIGHT_THICKNESS = 1;
|
||||||
constexpr int HIGHLIGHT_PAD_X = 18; // padding lateral del rect respecte al text
|
constexpr int HIGHLIGHT_PAD_X = 18; // padding lateral del rect respecte al text
|
||||||
constexpr int HIGHLIGHT_PAD_Y = 4; // padding vertical
|
constexpr int HIGHLIGHT_PAD_Y = 4; // padding vertical
|
||||||
|
constexpr int TEXT_INSET_X = 16; // marge intern del text dins del highlight (label esq / valor dre)
|
||||||
|
|
||||||
// ---- Colors RGBA ----
|
// ---- Colors RGBA ----
|
||||||
constexpr SDL_Color BG_COLOR{.r = 0, .g = 12, .b = 24, .a = 215};
|
constexpr SDL_Color BG_COLOR{.r = 0, .g = 12, .b = 24, .a = 215};
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ class SDLManager {
|
|||||||
// Getters
|
// Getters
|
||||||
auto getRenderer() -> Rendering::Renderer* { return &gpu_renderer_; }
|
auto getRenderer() -> Rendering::Renderer* { return &gpu_renderer_; }
|
||||||
[[nodiscard]] auto getScaleFactor() const -> float { return zoom_factor_; }
|
[[nodiscard]] auto getScaleFactor() const -> float { return zoom_factor_; }
|
||||||
|
[[nodiscard]] auto isFullscreen() const -> bool { return is_fullscreen_; }
|
||||||
|
[[nodiscard]] auto isPostFxEnabled() const -> bool { return gpu_renderer_.isPostFxEnabled(); }
|
||||||
|
|
||||||
// [NUEVO] Actualitzar context de renderizado (factor de scale global)
|
// [NUEVO] Actualitzar context de renderizado (factor de scale global)
|
||||||
void updateRenderingContext() const;
|
void updateRenderingContext() const;
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ Director::Director(int argc, char* argv[])
|
|||||||
cfg_->rendering);
|
cfg_->rendering);
|
||||||
|
|
||||||
System::Notifier::init(sdl_->getRenderer());
|
System::Notifier::init(sdl_->getRenderer());
|
||||||
System::ServiceMenu::init(sdl_->getRenderer());
|
System::ServiceMenu::init(sdl_->getRenderer(), sdl_.get());
|
||||||
|
|
||||||
last_ticks_ms_ = SDL_GetTicks();
|
last_ticks_ms_ = SDL_GetTicks();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,16 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <format>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include "core/audio/audio.hpp"
|
#include "core/audio/audio.hpp"
|
||||||
|
#include "core/config/engine_config.hpp"
|
||||||
#include "core/defaults/service_menu.hpp"
|
#include "core/defaults/service_menu.hpp"
|
||||||
#include "core/locale/locale.hpp"
|
#include "core/locale/locale.hpp"
|
||||||
|
#include "core/rendering/sdl_manager.hpp"
|
||||||
#include "core/types.hpp"
|
#include "core/types.hpp"
|
||||||
|
#include "game/config_yaml.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -50,8 +54,8 @@ namespace System {
|
|||||||
|
|
||||||
std::unique_ptr<ServiceMenu> ServiceMenu::instance;
|
std::unique_ptr<ServiceMenu> ServiceMenu::instance;
|
||||||
|
|
||||||
void ServiceMenu::init(Rendering::Renderer* renderer) {
|
void ServiceMenu::init(Rendering::Renderer* renderer, SDLManager* sdl) {
|
||||||
instance.reset(new ServiceMenu(renderer));
|
instance.reset(new ServiceMenu(renderer, sdl));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServiceMenu::destroy() {
|
void ServiceMenu::destroy() {
|
||||||
@@ -62,8 +66,9 @@ namespace System {
|
|||||||
return instance.get();
|
return instance.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceMenu::ServiceMenu(Rendering::Renderer* renderer)
|
ServiceMenu::ServiceMenu(Rendering::Renderer* renderer, SDLManager* sdl)
|
||||||
: renderer_(renderer),
|
: renderer_(renderer),
|
||||||
|
sdl_(sdl),
|
||||||
text_(renderer) {}
|
text_(renderer) {}
|
||||||
|
|
||||||
auto ServiceMenu::isOpen() const -> bool {
|
auto ServiceMenu::isOpen() const -> bool {
|
||||||
@@ -87,26 +92,33 @@ namespace System {
|
|||||||
playAcceptSound();
|
playAcceptSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
// Helper local: construeix un item de tipus SUBMENU amb el callback
|
||||||
|
// d'entrada. Es manté local a aquesta TU per a poder construir la
|
||||||
|
// pagina arrel a buildRootPage sense designed-initializers parcials
|
||||||
|
// (clang-tidy es queixa quan en falten).
|
||||||
|
auto makeSubmenu(const std::string& label_key, std::function<void()> on_activate) -> ServiceMenu::Item {
|
||||||
|
return ServiceMenu::Item{
|
||||||
|
.kind = ServiceMenu::Kind::SUBMENU,
|
||||||
|
.label_key = label_key,
|
||||||
|
.selectable = true,
|
||||||
|
.on_activate = std::move(on_activate),
|
||||||
|
.get_value_text = {},
|
||||||
|
.on_change = {},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
void ServiceMenu::buildRootPage() {
|
void ServiceMenu::buildRootPage() {
|
||||||
Page root;
|
Page root;
|
||||||
root.title_key = "service_menu.title";
|
root.title_key = "service_menu.title";
|
||||||
root.items = {
|
root.items = {
|
||||||
Item{.kind = Kind::SUBMENU,
|
makeSubmenu("service_menu.video", [this] { pushPage(buildVideoPage()); }),
|
||||||
.label_key = "service_menu.video",
|
makeSubmenu("service_menu.audio", [this] { pushSubmenuPlaceholder("service_menu.audio"); }),
|
||||||
.selectable = true,
|
makeSubmenu("service_menu.options", [this] { pushSubmenuPlaceholder("service_menu.options"); }),
|
||||||
.on_activate = [this] { pushSubmenuPlaceholder("service_menu.video"); }},
|
makeSubmenu("service_menu.system", [this] { pushSubmenuPlaceholder("service_menu.system"); }),
|
||||||
Item{.kind = Kind::SUBMENU,
|
|
||||||
.label_key = "service_menu.audio",
|
|
||||||
.selectable = true,
|
|
||||||
.on_activate = [this] { pushSubmenuPlaceholder("service_menu.audio"); }},
|
|
||||||
Item{.kind = Kind::SUBMENU,
|
|
||||||
.label_key = "service_menu.options",
|
|
||||||
.selectable = true,
|
|
||||||
.on_activate = [this] { pushSubmenuPlaceholder("service_menu.options"); }},
|
|
||||||
Item{.kind = Kind::SUBMENU,
|
|
||||||
.label_key = "service_menu.system",
|
|
||||||
.selectable = true,
|
|
||||||
.on_activate = [this] { pushSubmenuPlaceholder("service_menu.system"); }},
|
|
||||||
};
|
};
|
||||||
stack_.clear();
|
stack_.clear();
|
||||||
stack_.push_back(std::move(root));
|
stack_.push_back(std::move(root));
|
||||||
@@ -120,6 +132,71 @@ namespace System {
|
|||||||
pushPage(std::move(page));
|
pushPage(std::move(page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto ServiceMenu::buildVideoPage() const -> Page {
|
||||||
|
// Helper: localitza ON/OFF per a TOGGLE items.
|
||||||
|
auto on_off_text = [](bool v) -> std::string {
|
||||||
|
return Locale::get().text(v ? "service_menu.value_on" : "service_menu.value_off");
|
||||||
|
};
|
||||||
|
|
||||||
|
SDLManager* sdl = sdl_;
|
||||||
|
|
||||||
|
Page page;
|
||||||
|
page.title_key = "service_menu.video";
|
||||||
|
page.items = {
|
||||||
|
// ZOOM (INT_RANGE-style: ± delega a sdl.increase/decreaseWindowSize).
|
||||||
|
Item{
|
||||||
|
.kind = Kind::INT_RANGE,
|
||||||
|
.label_key = "service_menu.video_zoom",
|
||||||
|
.selectable = true,
|
||||||
|
.on_activate = {},
|
||||||
|
.get_value_text = [sdl] { return std::format("{:.1f}X", sdl->getScaleFactor()); },
|
||||||
|
.on_change = [sdl](int dir) {
|
||||||
|
if (dir > 0) {
|
||||||
|
sdl->increaseWindowSize();
|
||||||
|
} else {
|
||||||
|
sdl->decreaseWindowSize();
|
||||||
|
} },
|
||||||
|
},
|
||||||
|
// FULLSCREEN
|
||||||
|
Item{
|
||||||
|
.kind = Kind::TOGGLE,
|
||||||
|
.label_key = "service_menu.video_fullscreen",
|
||||||
|
.selectable = true,
|
||||||
|
.on_activate = {},
|
||||||
|
.get_value_text = [sdl, on_off_text] { return on_off_text(sdl->isFullscreen()); },
|
||||||
|
.on_change = [sdl](int) { sdl->toggleFullscreen(); },
|
||||||
|
},
|
||||||
|
// VSYNC
|
||||||
|
Item{
|
||||||
|
.kind = Kind::TOGGLE,
|
||||||
|
.label_key = "service_menu.video_vsync",
|
||||||
|
.selectable = true,
|
||||||
|
.on_activate = {},
|
||||||
|
.get_value_text = [on_off_text] { return on_off_text(ConfigYaml::engine_config.rendering.vsync != 0); },
|
||||||
|
.on_change = [sdl](int) { sdl->toggleVSync(); },
|
||||||
|
},
|
||||||
|
// ANTIALIAS
|
||||||
|
Item{
|
||||||
|
.kind = Kind::TOGGLE,
|
||||||
|
.label_key = "service_menu.video_aa",
|
||||||
|
.selectable = true,
|
||||||
|
.on_activate = {},
|
||||||
|
.get_value_text = [on_off_text] { return on_off_text(ConfigYaml::engine_config.rendering.antialias != 0); },
|
||||||
|
.on_change = [sdl](int) { sdl->toggleAntialias(); },
|
||||||
|
},
|
||||||
|
// POSTPROCESSAT
|
||||||
|
Item{
|
||||||
|
.kind = Kind::TOGGLE,
|
||||||
|
.label_key = "service_menu.video_postfx",
|
||||||
|
.selectable = true,
|
||||||
|
.on_activate = {},
|
||||||
|
.get_value_text = [sdl, on_off_text] { return on_off_text(sdl->isPostFxEnabled()); },
|
||||||
|
.on_change = [sdl](int) { sdl->togglePostFx(); },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
void ServiceMenu::pushPage(Page page) {
|
void ServiceMenu::pushPage(Page page) {
|
||||||
stack_.push_back(std::move(page));
|
stack_.push_back(std::move(page));
|
||||||
// El cursor salta a una pagina nova: enganxem el highlight per a
|
// El cursor salta a una pagina nova: enganxem el highlight per a
|
||||||
@@ -163,6 +240,12 @@ namespace System {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ServiceMenu::activateCurrent() {
|
void ServiceMenu::activateCurrent() {
|
||||||
|
// ENTER = canvi de valor cap endavant (equivalent a RIGHT). Per a
|
||||||
|
// SUBMENU/ACTION entra/activa; per a TOGGLE/CYCLE/INT_RANGE incrementa.
|
||||||
|
changeValue(+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ServiceMenu::changeValue(int direction) {
|
||||||
if (stack_.empty()) {
|
if (stack_.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -174,11 +257,25 @@ namespace System {
|
|||||||
if (!item.selectable) {
|
if (!item.selectable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item.on_activate) {
|
switch (item.kind) {
|
||||||
item.on_activate();
|
case Kind::TOGGLE:
|
||||||
// SUBMENU/ACTION reprodueixen accept; els toggles futurs ho
|
case Kind::CYCLE:
|
||||||
// gestionaran als seus propis callbacks si volen un altre so.
|
case Kind::INT_RANGE:
|
||||||
playAcceptSound();
|
if (item.on_change) {
|
||||||
|
item.on_change(direction);
|
||||||
|
playAcceptSound();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Kind::SUBMENU:
|
||||||
|
case Kind::ACTION:
|
||||||
|
// Nomes +1 entra/activa: LEFT no fa res (BACKSPACE per a sortir).
|
||||||
|
if (direction > 0 && item.on_activate) {
|
||||||
|
item.on_activate();
|
||||||
|
playAcceptSound();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Kind::LABEL:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,11 +292,15 @@ namespace System {
|
|||||||
return true;
|
return true;
|
||||||
case SDL_SCANCODE_RETURN:
|
case SDL_SCANCODE_RETURN:
|
||||||
case SDL_SCANCODE_KP_ENTER:
|
case SDL_SCANCODE_KP_ENTER:
|
||||||
case SDL_SCANCODE_RIGHT:
|
|
||||||
activateCurrent();
|
activateCurrent();
|
||||||
return true;
|
return true;
|
||||||
case SDL_SCANCODE_BACKSPACE:
|
case SDL_SCANCODE_RIGHT:
|
||||||
|
changeValue(+1);
|
||||||
|
return true;
|
||||||
case SDL_SCANCODE_LEFT:
|
case SDL_SCANCODE_LEFT:
|
||||||
|
changeValue(-1);
|
||||||
|
return true;
|
||||||
|
case SDL_SCANCODE_BACKSPACE:
|
||||||
popPage();
|
popPage();
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
@@ -400,19 +501,45 @@ namespace System {
|
|||||||
drawHighlightRect(renderer_, HL_X, highlight_y_, HL_W, highlight_h_);
|
drawHighlightRect(renderer_, HL_X, highlight_y_, HL_W, highlight_h_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Llista d'items: centrats horitzontalment, color groc per al seleccionat.
|
// Llista d'items.
|
||||||
|
// - Items amb valor (TOGGLE/CYCLE/INT_RANGE): label esquerra + valor dreta dins del highlight.
|
||||||
|
// - Items sense valor (SUBMENU/ACTION/LABEL): label centrat.
|
||||||
|
const float HL_LEFT = BOX_X + static_cast<float>(HIGHLIGHT_PAD_X);
|
||||||
|
const float HL_RIGHT = BOX_X + BOX_W - static_cast<float>(HIGHLIGHT_PAD_X);
|
||||||
|
const float TEXT_TOP_OFFSET = Graphics::VectorText::getTextHeight(ITEM_SCALE) * 0.5F;
|
||||||
for (std::size_t i = 0; i < page.items.size(); ++i) {
|
for (std::size_t i = 0; i < page.items.size(); ++i) {
|
||||||
const Item& item = page.items[i];
|
const Item& item = page.items[i];
|
||||||
const SDL_Color COL = (i == page.cursor) ? CURSOR_COLOR : LABEL_COLOR;
|
const SDL_Color COL = (i == page.cursor) ? CURSOR_COLOR : LABEL_COLOR;
|
||||||
const std::string TEXT = Locale::get().text(item.label_key);
|
const std::string LABEL = Locale::get().text(item.label_key);
|
||||||
const float ITEM_TOP = computeItemTopY(BOX_Y, i);
|
const float ITEM_TOP = computeItemTopY(BOX_Y, i);
|
||||||
const float ITEM_CY = ITEM_TOP + (static_cast<float>(ITEM_HEIGHT) * 0.5F);
|
const float ITEM_CY = ITEM_TOP + (static_cast<float>(ITEM_HEIGHT) * 0.5F);
|
||||||
text_.renderCentered(TEXT,
|
|
||||||
Vec2{.x = CENTER_X, .y = ITEM_CY},
|
if (item.get_value_text) {
|
||||||
ITEM_SCALE,
|
// Layout dues columnes: label esquerra, valor dreta.
|
||||||
TEXT_SPACING,
|
const std::string VALUE = item.get_value_text();
|
||||||
1.0F,
|
const float TEXT_TOP_Y = ITEM_CY - TEXT_TOP_OFFSET;
|
||||||
COL);
|
const float VALUE_W = Graphics::VectorText::getTextWidth(VALUE, ITEM_SCALE, TEXT_SPACING);
|
||||||
|
text_.render(LABEL,
|
||||||
|
Vec2{.x = HL_LEFT + static_cast<float>(TEXT_INSET_X), .y = TEXT_TOP_Y},
|
||||||
|
ITEM_SCALE,
|
||||||
|
TEXT_SPACING,
|
||||||
|
1.0F,
|
||||||
|
COL);
|
||||||
|
text_.render(VALUE,
|
||||||
|
Vec2{.x = HL_RIGHT - static_cast<float>(TEXT_INSET_X) - VALUE_W, .y = TEXT_TOP_Y},
|
||||||
|
ITEM_SCALE,
|
||||||
|
TEXT_SPACING,
|
||||||
|
1.0F,
|
||||||
|
COL);
|
||||||
|
} else {
|
||||||
|
// Layout simple: label centrat.
|
||||||
|
text_.renderCentered(LABEL,
|
||||||
|
Vec2{.x = CENTER_X, .y = ITEM_CY},
|
||||||
|
ITEM_SCALE,
|
||||||
|
TEXT_SPACING,
|
||||||
|
1.0F,
|
||||||
|
COL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer_->popClip();
|
renderer_->popClip();
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
#include "core/graphics/vector_text.hpp"
|
#include "core/graphics/vector_text.hpp"
|
||||||
#include "core/rendering/render_context.hpp"
|
#include "core/rendering/render_context.hpp"
|
||||||
|
|
||||||
|
class SDLManager;
|
||||||
|
|
||||||
namespace System {
|
namespace System {
|
||||||
|
|
||||||
class ServiceMenu {
|
class ServiceMenu {
|
||||||
@@ -48,7 +50,12 @@ namespace System {
|
|||||||
Kind kind = Kind::LABEL;
|
Kind kind = Kind::LABEL;
|
||||||
std::string label_key; // Clau de locale
|
std::string label_key; // Clau de locale
|
||||||
bool selectable = true;
|
bool selectable = true;
|
||||||
|
// SUBMENU / ACTION: callback en ENTER / RIGHT.
|
||||||
std::function<void()> on_activate;
|
std::function<void()> on_activate;
|
||||||
|
// TOGGLE / CYCLE / INT_RANGE: text del valor actual (renderitzat a la dreta).
|
||||||
|
std::function<std::string()> get_value_text;
|
||||||
|
// TOGGLE / CYCLE / INT_RANGE: callback amb +1 (RIGHT/ENTER) o -1 (LEFT).
|
||||||
|
std::function<void(int)> on_change;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Page {
|
struct Page {
|
||||||
@@ -57,9 +64,10 @@ namespace System {
|
|||||||
std::size_t cursor = 0;
|
std::size_t cursor = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Inicialitza el singleton amb el renderer global (propietat del
|
// Inicialitza el singleton amb el renderer global i l'SDLManager (per
|
||||||
// Director via SDLManager). Posterior get() retorna instancia valida.
|
// a operar amb video toggles: fullscreen, vsync, AA, postfx, zoom).
|
||||||
static void init(Rendering::Renderer* renderer);
|
// Tots dos son propietat del Director i sobreviuen al menu.
|
||||||
|
static void init(Rendering::Renderer* renderer, SDLManager* sdl);
|
||||||
static void destroy();
|
static void destroy();
|
||||||
[[nodiscard]] static auto get() -> ServiceMenu*;
|
[[nodiscard]] static auto get() -> ServiceMenu*;
|
||||||
|
|
||||||
@@ -75,14 +83,18 @@ namespace System {
|
|||||||
auto handleEvent(const SDL_Event& event) -> bool;
|
auto handleEvent(const SDL_Event& event) -> bool;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit ServiceMenu(Rendering::Renderer* renderer);
|
ServiceMenu(Rendering::Renderer* renderer, SDLManager* sdl);
|
||||||
|
|
||||||
void buildRootPage();
|
void buildRootPage();
|
||||||
void pushSubmenuPlaceholder(const std::string& title_key);
|
void pushSubmenuPlaceholder(const std::string& title_key);
|
||||||
|
[[nodiscard]] auto buildVideoPage() const -> Page;
|
||||||
void pushPage(Page page);
|
void pushPage(Page page);
|
||||||
void popPage();
|
void popPage();
|
||||||
void moveCursor(int direction);
|
void moveCursor(int direction);
|
||||||
void activateCurrent();
|
void activateCurrent();
|
||||||
|
// RIGHT (direction=+1) / LEFT (direction=-1). Per a TOGGLE/CYCLE/INT_RANGE
|
||||||
|
// crida on_change. Per a SUBMENU/ACTION nomes +1 (entra/activa).
|
||||||
|
void changeValue(int direction);
|
||||||
|
|
||||||
// Alçada objectiu de la caixa per a la pagina superior (sense animacio).
|
// Alçada objectiu de la caixa per a la pagina superior (sense animacio).
|
||||||
[[nodiscard]] auto computeTargetHeight() const -> float;
|
[[nodiscard]] auto computeTargetHeight() const -> float;
|
||||||
@@ -91,6 +103,7 @@ namespace System {
|
|||||||
[[nodiscard]] static auto computeItemTopY(float box_y, std::size_t index) -> float;
|
[[nodiscard]] static auto computeItemTopY(float box_y, std::size_t index) -> float;
|
||||||
|
|
||||||
Rendering::Renderer* renderer_;
|
Rendering::Renderer* renderer_;
|
||||||
|
SDLManager* sdl_;
|
||||||
Graphics::VectorText text_;
|
Graphics::VectorText text_;
|
||||||
|
|
||||||
std::vector<Page> stack_;
|
std::vector<Page> stack_;
|
||||||
|
|||||||
Reference in New Issue
Block a user