aboutsummaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
authorAlexander Pickering <Alexander.Pickering@anondomain.site90.net>2016-01-01 19:08:31 -0500
committerAlexander Pickering <Alexander.Pickering@anondomain.site90.net>2016-01-01 19:08:31 -0500
commit8d3137a7eed8663bf4e013bb5a81b1f361cc50d0 (patch)
treec867390d33e87209e5cab4b421f87bbc240342b2 /gamemode
parent8caa285a6a8940ceeefdea55de2fa0f35d221650 (diff)
downloadwintersurvival2-8d3137a7eed8663bf4e013bb5a81b1f361cc50d0.tar.gz
wintersurvival2-8d3137a7eed8663bf4e013bb5a81b1f361cc50d0.tar.bz2
wintersurvival2-8d3137a7eed8663bf4e013bb5a81b1f361cc50d0.zip
Fixes for scoreboard menu
Diffstat (limited to 'gamemode')
-rw-r--r--gamemode/hud/draw_scoreboard.lua25
1 files changed, 16 insertions, 9 deletions
diff --git a/gamemode/hud/draw_scoreboard.lua b/gamemode/hud/draw_scoreboard.lua
index 3cb5825..6941e59 100644
--- a/gamemode/hud/draw_scoreboard.lua
+++ b/gamemode/hud/draw_scoreboard.lua
@@ -25,6 +25,7 @@ function GM:ScoreboardShow()
local playerlabel = vgui.Create("MBLabel")
playerlabel:SetParent(scoreboard)
playerlabel:SetPos(2, ypos)
+ playerlabel:SetSize(SCOREBOARD_WIDTH/4,20)
local ptext = v:Nick()
if(v:IsPigeon()) then
ptext = ptext .. " (Dead)"
@@ -44,18 +45,24 @@ function GM:ScoreboardShow()
mutebutton:SetParent(scoreboard)
mutebutton:SetPos(SCOREBOARD_X,ypos)
if(v:IsMuted()) then
- mutebutton.Text = "Mute"
- mutebutton.OnClick = function()
- self.Text = "Unmute"
- print("Muteing " .. v:Nick())
+ print("This player is muted!")
+ mutebutton.Text = "Unmute"
+ mutebutton.DoClick = function()
+ mutebutton.Text = "Unmute"
+ print("Unmuteing " .. v:Nick())
v:SetMuted(true)
+ scoreboard:Remove()
+ self:ScoreboardShow()
end
else
- mutebutton.Text = "Unmute"
- mutebutton.OnClick = function()
- self.Text = "Mute"
- print("Unmuteing " .. v:Nick())
+ print("This player is not muted!")
+ mutebutton.Text = "Mute"
+ mutebutton.DoClick = function()
+ mutebutton.Text = "Mute"
+ print("Muteing " .. v:Nick())
v:SetMuted(false)
+ scoreboard:Remove()
+ self:ScoreboardShow()
end
end
@@ -67,7 +74,7 @@ end
function GM:ScoreboardHide()
if(scoreboard) then
- scoreboard:SetVisible(false)
+ scoreboard:Remove()
end
--self.ShowSB = false
end