Skip to content

Commit

Permalink
added botname to search
Browse files Browse the repository at this point in the history
  • Loading branch information
TimGoll committed Oct 8, 2023
1 parent 5b5b072 commit e5b33fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gamemodes/terrortown/gamemode/client/cl_search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function SEARCHSCRN:Show(data)
if IsValid(frame) then
frame:ClearFrame(nil, nil, "search_title")
else
frame = vguihandler.GenerateFrame(self.sizes.width, self.sizes.height, "search_title", true)
frame = vguihandler.GenerateFrame(self.sizes.width, self.sizes.height, {body = "search_title", params = {player = data.nick}}, true)
end

frame:SetPadding(self.sizes.padding, self.sizes.padding, self.sizes.padding, self.sizes.padding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@ function SKIN:PaintFrameTTT2(panel, w, h)
drawBox(0, 0, w, sizes.header, colors.accent)
drawBox(0, sizes.header, w, sizes.border, colors.accentDark)

drawShadowedText(TryT(panel:GetTitle()), panel:GetTitleFont(), 0.5 * w, 0.5 * sizes.header, colors.titleText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1)
local title = panel:GetTitle()

if istable(title) then
drawShadowedText(ParT(title.body, title.params), panel:GetTitleFont(), 0.5 * w, 0.5 * sizes.header, colors.titleText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1)
else
drawShadowedText(TryT(title), panel:GetTitleFont(), 0.5 * w, 0.5 * sizes.header, colors.titleText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1)
end
end

---
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@ L.slot_weapon_extra = "Extra Slot"
L.slot_weapon_class = "Class Slot"

-- 2023-10-07
L.search_title = "Body Search Results"
L.search_title = "Body Search Results - {player}"
L.search_info = "Information"
L.search_confirm = "Confirm Death"
L.search_confirm_credits = "Confirm (+{credits} Credits)"
Expand Down

0 comments on commit e5b33fc

Please sign in to comment.