From 868e729d68b5913716bfe5ddb512f4099851e9a2 Mon Sep 17 00:00:00 2001 From: Apickx Date: Mon, 28 Dec 2015 19:18:30 -0500 Subject: Initial commit --- gamemode/cl_hud/draw_battery.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gamemode/cl_hud/draw_battery.lua (limited to 'gamemode/cl_hud/draw_battery.lua') diff --git a/gamemode/cl_hud/draw_battery.lua b/gamemode/cl_hud/draw_battery.lua new file mode 100644 index 0000000..b2ba854 --- /dev/null +++ b/gamemode/cl_hud/draw_battery.lua @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.3-70-g09d2