summaryrefslogtreecommitdiff
path: root/gamemode/cl_hud/draw_battery.lua
blob: b2ba854d50b13a8fac41a4d8fcae470d56f34662 (plain)
1
2
3
4
5
6
7
8
9
10
local X = ScrW()-104

function DrawBatteryLife()
	local W = system.BatteryPower()
	if (W > 100) then return end
	
	DrawRect(X,4,100,12,MAIN_BLACKCOLOR)
	DrawRect(X,4,math.Clamp(W,0,100),12,MAIN_GREENCOLOR)
	DrawText("Battery: "..W.."%","Trebuchet18",X-5,2,MAIN_TEXTCOLOR,2)
end