diff --git a/assets/Json/selectLobby.json b/assets/Json/selectLobby.json index 0fa3c7e8..66b8c4d5 100644 --- a/assets/Json/selectLobby.json +++ b/assets/Json/selectLobby.json @@ -1,29 +1,49 @@ { - "menu": { + "lobbyMenu": { + "bigBox": { + "type": "box", + "spritePath": "assets/Menu/bix-box.png", + "width": 5000, + "height": 5000, + "position": { + "x": 2000, + "y": 1000 + }, + "rect": { + "x": 0.0, + "y": 0.0, + "width": 2312.0, + "height": 1518.0 + } + }, "name": { "name": "name", "type": "input", "font": "assets/Fonts/soliden/SolidenTrial-Black.otf", - "spritePath": "assets/R-TypeSheet/r-typesheet1.gif", + "spritePath": "assets/Menu/input-box.png", "text": "ServerOfSaverio", "color": "red", - "textSize": 3, + "textSize": 2, "maxChar": 30, - "width": 500, - "height": 500, + "width": 6000, + "height": 800, + "textPosition": { + "x": 3050, + "y": 2250 + }, "position" : { "x": 2000, "y": 2000 }, "rect": { - "x": 101.0, + "x": 0.0, "y": 0.0, - "width": 32.0, - "height": 19.0 + "width": 1670.0, + "height": 278.0 }, "collisionRect": { - "width": 2000, - "height": 500 + "width": 4500, + "height": 800 }, "animRect": [ { @@ -32,10 +52,10 @@ "noIncr": true, "list": [ { - "x" : 233.0, - "y": 2.0, - "width": 32.0, - "height": 14.0 + "x" : 1670.0, + "y": 0.0, + "width": 1670.0, + "height": 278.0 } ] } @@ -45,26 +65,30 @@ "name": "maxNb", "type": "input", "font": "assets/Fonts/soliden/SolidenTrial-Black.otf", - "spritePath": "assets/R-TypeSheet/r-typesheet1.gif", + "spritePath": "assets/Menu/input-box.png", "text": "2", "color": "red", "textSize": 3, "maxChar": 2, - "width": 500, - "height": 500, + "width": 6000, + "height": 800, + "textPosition": { + "x": 3050, + "y": 3180 + }, "position" : { "x": 2000, "y": 3000 }, "rect": { - "x": 101.0, + "x": 0.0, "y": 0.0, - "width": 32.0, - "height": 19.0 + "width": 1670.0, + "height": 278.0 }, "collisionRect": { - "width": 2000, - "height": 500 + "width": 4500, + "height": 800 }, "animRect": [ { @@ -73,10 +97,10 @@ "noIncr": true, "list": [ { - "x" : 233.0, - "y": 2.0, - "width": 32.0, - "height": 14.0 + "x" : 1670.0, + "y": 0.0, + "width": 1670.0, + "height": 278.0 } ] } @@ -84,14 +108,14 @@ }, "gametype_normal": { "type": "button", - "spritePath": "assets/R-TypeSheet/r-typesheet2.gif", + "spritePath": "assets/Menu/button.png", "width": 500, "height": 500, "rect": { - "x": 101.0, + "x": 0.0, "y": 0.0, - "width": 32.0, - "height": 19.0 + "width": 1366.0, + "height": 406.0 }, "position": { "x": 2000, diff --git a/src/Client/Systems/Menus/SelectLobby/SelectLobbySystems.cpp b/src/Client/Systems/Menus/SelectLobby/SelectLobbySystems.cpp index 5c7e4676..5aaff74d 100644 --- a/src/Client/Systems/Menus/SelectLobby/SelectLobbySystems.cpp +++ b/src/Client/Systems/Menus/SelectLobby/SelectLobbySystems.cpp @@ -67,15 +67,17 @@ namespace Systems::SelectLobbySystems { return; } try { + nlohmann::json bigBox = Json::getInstance().getDataByVector({"lobbyMenu", "bigBox"}, JsonType::SELECT_LOBBY); nlohmann::json createLobbyNormalButton = - Json::getInstance().getDataByVector({"menu", "gametype_normal"}, JsonType::SELECT_LOBBY); + Json::getInstance().getDataByVector({"lobbyMenu", "gametype_normal"}, JsonType::SELECT_LOBBY); nlohmann::json lobbyName = - Json::getInstance().getDataByVector({"menu", "name"}, JsonType::SELECT_LOBBY); + Json::getInstance().getDataByVector({"lobbyMenu", "name"}, JsonType::SELECT_LOBBY); nlohmann::json maxNbPlayer = - Json::getInstance().getDataByVector({"menu", "maxNb"}, JsonType::SELECT_LOBBY); + Json::getInstance().getDataByVector({"lobbyMenu", "maxNb"}, JsonType::SELECT_LOBBY); Menu::MenuBuilder::getInstance().initMenuEntity( createLobbyNormalButton, onButtonCreateLobbyNormalClicked); + Menu::MenuBuilder::getInstance().initMenuEntity(bigBox); Menu::MenuBuilder::getInstance().initMenuEntity(lobbyName); Menu::MenuBuilder::getInstance().initMenuEntity(maxNbPlayer); } catch (const std::exception &err) { diff --git a/src/ServerArgsHandling.hpp b/src/ServerArgsHandling.hpp index 147bb16b..e5394f8b 100644 --- a/src/ServerArgsHandling.hpp +++ b/src/ServerArgsHandling.hpp @@ -26,8 +26,8 @@ namespace Args { constexpr int LOBBY_SERVER = 1; static constexpr auto LOBBY_SERVER_ARG = "1"; static constexpr int MAX_LOBBY_ARGS = 6; - static constexpr int MAX_LOBBY_NAME_SIZE = 20; - static constexpr int MAX_LOBBY_IP_SIZE = 15; + static constexpr int MAX_LOBBY_NAME_SIZE = 32; + static constexpr int MAX_LOBBY_IP_SIZE = 16; class ServerArgsHandling { public: