Centralize Hunter interface strings and verify mobile HUD

This commit is contained in:
Leshyi committed 2026-11-30 01:35:03 +05:00
1 parent 16a359d4af
commit c88c3501b3
21 files changed
+752 -336

No files matched your search

+11 -9
View File
@@ -1,4 +1,6 @@
--!strict
local Text = require(game:GetService("ReplicatedStorage"):WaitForChild("Hunter"):WaitForChild("Strings") :: ModuleScript).interface.MatchVoteHud
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
@@ -38,7 +40,7 @@ local function leftLabel(parent: Instance, name: string, text: string, x: number
item.TextXAlignment = Enum.TextXAlignment.Left
return item
end
local title = leftLabel(panel, "Title", "СЛЕДУЮЩИЙ РЕЖИМ", 25, 16, 625, 43, 33, UI.Ink)
local title = leftLabel(panel, "Title", Text.sleduyuschiyRezhim, 25, 16, 625, 43, 33, UI.Ink)
title.FontFace = UI.Display
local arenaText = leftLabel(panel, "Arena", "", 26, 57, 620, 21, 14, UI.Muted)
local clock = UI.label(panel, "Countdown", "", UDim2.fromOffset(775, 19), UDim2.fromOffset(139, 44), 30, UI.Blue)
@@ -76,9 +78,9 @@ end
local function refreshDetail()
local rule = Rules.find(if locked then selectedRule else hoveredRule or selectedRule)
if locked then
detail.Text = if rule then "Ваш голос · " .. rule.title else ""
detail.Text = if rule then Text.vashGolos .. rule.title else ""
else
detail.Text = if rule then rule.detail else "Наведите на режим, чтобы увидеть его правила."
detail.Text = if rule then rule.detail else Text.navediteNaRezhimChtoby
end
end
@@ -133,8 +135,8 @@ local function startBallot(id: string, endsAt: number, timeLeft: number)
locked, revealEndsAt = false, nil
local match = Modes.state(state, id)
duration = (match:GetAttribute("PhaseDuration") :: number?) or timeLeft
title.Text = "СЛЕДУЮЩИЙ РЕЖИМ"
arenaText.Text = "ДИНАМИЧЕСКАЯ АРЕНА"
title.Text = Text.sleduyuschiyRezhim
arenaText.Text = Text.dinamicheskayaArena
clock.Visible, line.Visible = true, true
clock.TextColor3, fill.BackgroundColor3 = UI.Blue, UI.Blue
caption.TextXAlignment, detail.TextXAlignment = Enum.TextXAlignment.Left, Enum.TextXAlignment.Left
@@ -157,7 +159,7 @@ local function lockBallot()
hoveredRule = nil
clock.TextColor3 = Color3.fromRGB(212, 212, 212)
fill.BackgroundColor3 = Color3.fromRGB(145, 145, 145)
caption.Text = "ГОЛОСОВАНИЕ ЗАКРЫТО"
caption.Text = Text.golosovanieZakryto
refreshDetail()
for _, slot in cards do
assert(slot.card.button).Interactable = false
@@ -171,10 +173,10 @@ local function reveal(outcome: Outcome, now: number)
if revealEndsAt or not winner then return end
lockBallot()
revealEndsAt = math.max(outcome.endsAt, now + 1.35)
title.Text = "РЕЖИМ ВЫБРАН"
title.Text = Text.rezhimVybran
clock.Visible, line.Visible = false, false
caption.TextXAlignment, detail.TextXAlignment = Enum.TextXAlignment.Center, Enum.TextXAlignment.Center
caption.Text = if selectedRule then "СЛЕДУЮЩИЙ РАУНД" else "ВЫ ВОЗВРАЩАЕТЕСЬ В ЛОББИ"
caption.Text = if selectedRule then Text.sleduyuschiyRaund else Text.vyVozvraschaetesVLobbi
detail.Text = Rules.get(outcome.winner).detail
local center = Vector2.new(panelWidth / 2, panelHeight / 2)
for _, slot in cards do
@@ -219,7 +221,7 @@ local received = vote.OnClientEvent:Connect(function(id: string, endsAt: number,
refreshDetail()
if not locked then
local own = Rules.find(selection)
caption.Text = if own then "Ваш голос · " .. own.title .. " / Всего " .. total else "Выберите режим · Всего голосов " .. total
caption.Text = if own then Text.vashGolos .. own.title .. Text.vsego .. total else Text.vyberiteRezhimVsegoGolosov .. total
end
end)