From ebe965ef40c21adb9516787c884f7a4bbf534c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D1=80=D0=BA=D0=BD=D0=B5=D1=81=D1=81=233729?= <79508138+Darkness6030@users.noreply.github.com> Date: Mon, 5 Jun 2023 03:50:48 +0300 Subject: [PATCH] Better votekick reason input (#8673) * Update bundle.properties * Update PlayerListFragment.java * Update bundle.properties * Update bundle.properties --- core/assets/bundles/bundle.properties | 3 ++- core/src/mindustry/ui/fragments/PlayerListFragment.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 29bf8f2521..b8f998ab54 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -277,10 +277,11 @@ server.version = [gray]v{0} {1} server.custombuild = [accent]Custom Build confirmban = Are you sure you want to ban "{0}[white]"? confirmkick = Are you sure you want to kick "{0}[white]"? -confirmvotekick = Are you sure you want to vote-kick "{0}[white]"? confirmunban = Are you sure you want to unban this player? confirmadmin = Are you sure you want to make "{0}[white]" an admin? confirmunadmin = Are you sure you want to remove admin status from "{0}[white]"? +votekick.reason = Vote-Kick Reason +votekick.reason.message = Are you sure you want to vote-kick "{0}[white]"?\nIf yes, please enter the reason: joingame.title = Join Game joingame.ip = Address: disconnect = Disconnected. diff --git a/core/src/mindustry/ui/fragments/PlayerListFragment.java b/core/src/mindustry/ui/fragments/PlayerListFragment.java index c1359c5d80..30becd5d34 100644 --- a/core/src/mindustry/ui/fragments/PlayerListFragment.java +++ b/core/src/mindustry/ui/fragments/PlayerListFragment.java @@ -199,8 +199,8 @@ public class PlayerListFragment{ button.add().growY(); button.button(Icon.hammer, ustyle, - () -> ui.showConfirm("@confirm", Core.bundle.format("confirmvotekick", user.name()), - () -> Call.sendChatMessage("/votekick #" + user.id + " No reason is provided"))) + () -> ui.showTextInput("@votekick.reason", Core.bundle.format("votekick.reason.message", user.name()), "", + reason -> Call.sendChatMessage("/votekick #" + user.id + " " + reason))) .size(h); }