From 4dfeda0957ad659d001427af92bc626b34476c18 Mon Sep 17 00:00:00 2001 From: zulianc Date: Sat, 24 May 2025 14:05:37 +0200 Subject: [PATCH] update info menu --- README.md | 3 +- src/GraphicalUI/AppMenus/InfoAppMenu.cpp | 38 +++++++++++++++--------- src/GraphicalUI/AppMenus/InfoAppMenu.h | 6 ++-- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0d59caa..71d20b3 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ If you want to know more details about the generation of polyominoes, [check the ## Features -- Every polyominoes from size 1 to 15, selectable as you wish, with customizable propotionnality for each size! +- Every polyominoes up to pentedecaminoes! +- 7bag with proportionnality for each polyomino size! - Customizable keybinds! - 0° rotations! - AutoRS as the Rotation System! diff --git a/src/GraphicalUI/AppMenus/InfoAppMenu.cpp b/src/GraphicalUI/AppMenus/InfoAppMenu.cpp index 97592c6..8de12fe 100644 --- a/src/GraphicalUI/AppMenus/InfoAppMenu.cpp +++ b/src/GraphicalUI/AppMenus/InfoAppMenu.cpp @@ -10,12 +10,13 @@ InfoAppMenu::InfoAppMenu(std::shared_ptr menuStack, std::shared_ptr settings, std::shared_ptr renderWindow) : AppMenu(menuStack, settings, renderWindow), - playerCursor({4}), + playerCursor({INFO_SECTIONS_COUNT}), sectionsName( "< ABOUT >", + "< PIECES TYPES >", + "< 0 DEGREES ROTATIONS >", "< ROTATION SYSTEM >", - "< SCORING >", - "< 0 DEGREES ROTATIONS >" + "< SCORING >" ), sectionsContent( "This game is written in C++,\n" @@ -27,6 +28,25 @@ InfoAppMenu::InfoAppMenu(std::shared_ptr menuStack, std::shared_ptr menuStack, std::shared_ptr #include +static const int INFO_SECTIONS_COUNT = 5; + class InfoAppMenu : public AppMenu { private: PlayerCursor playerCursor; - sf::String sectionsName[4]; - sf::String sectionsContent[4]; + sf::String sectionsName[INFO_SECTIONS_COUNT]; + sf::String sectionsContent[INFO_SECTIONS_COUNT]; public: InfoAppMenu(std::shared_ptr menuStack, std::shared_ptr settings, std::shared_ptr renderWindow);