From 972697a5aea49ae1f07f1d05ab399a8f92da594e Mon Sep 17 00:00:00 2001 From: Baeck Dong Jae <161856415+VectorSophie@users.noreply.github.com> Date: Tue, 14 Oct 2025 03:37:17 +0900 Subject: [PATCH] Slider UI change (#2148) ## Description: 1. adds feature so when making single player server, bots amount can be determined by slider and manual 1-1. [video](https://github.com/user-attachments/assets/23186592-2330-478b-8f73-313ca073803b) ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: jack_45183 --------- Co-authored-by: evanpelle --- resources/lang/en.json | 4 + resources/lang/ko.json | 4 + src/client/HostLobbyModal.ts | 31 +++--- src/client/SinglePlayerModal.ts | 35 +++---- src/client/components/FluentSlider.ts | 137 ++++++++++++++++++++++++++ 5 files changed, 170 insertions(+), 41 deletions(-) create mode 100644 src/client/components/FluentSlider.ts diff --git a/resources/lang/en.json b/resources/lang/en.json index c31101bc9..4b98565f6 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -132,6 +132,10 @@ "info_enemy_panel": "Enemy info panel", "exit_confirmation": "Are you sure you want to exit the game?" }, + "slider": { + "label": "Bots:", + "disabled": "Disabled" + }, "single_modal": { "title": "Single Player", "allow_alliances": "Allow alliances", diff --git a/resources/lang/ko.json b/resources/lang/ko.json index 0534d27f5..ca096fe03 100644 --- a/resources/lang/ko.json +++ b/resources/lang/ko.json @@ -132,6 +132,10 @@ "enables_title": "설정 활성화", "start": "게임 시작하기" }, + "slider": { + "label": "봇:", + "disabled": "사용 안 함" + }, "map": { "map": "지도", "world": "세계", diff --git a/src/client/HostLobbyModal.ts b/src/client/HostLobbyModal.ts index 37f954476..4642d5e3e 100644 --- a/src/client/HostLobbyModal.ts +++ b/src/client/HostLobbyModal.ts @@ -311,26 +311,17 @@ export class HostLobbyModal extends LitElement { ${translateText("host_modal.options_title")}
- - +