From 52eea58d42e4831296794b198329bcd08d3a22a6 Mon Sep 17 00:00:00 2001 From: TerminalHash Date: Thu, 25 Apr 2024 15:07:16 +0300 Subject: [PATCH] add team mats in scoreboard --- Rules/CommonScripts/ScoreboardRender.as | 33 +++++++++++++++++-------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/Rules/CommonScripts/ScoreboardRender.as b/Rules/CommonScripts/ScoreboardRender.as index 40e50a6a..a187e45d 100644 --- a/Rules/CommonScripts/ScoreboardRender.as +++ b/Rules/CommonScripts/ScoreboardRender.as @@ -664,16 +664,6 @@ float drawScoreboard(CPlayer@ localPlayer, CPlayer@[] players, Vec2f tl, CTeam@ GUI::DrawText("" + assists, Vec2f(br.x - 120, tl.y), kdr_color); GUI::DrawText("" + formatFloat(kills / Maths::Max(f32(deaths), 1.0f), "", 0, 2), Vec2f(br.x - 50, tl.y), kdr_color); - - // matetials section - //GUI::DrawText(getRules().get_s32("personalwood_" + username) + " ", Vec2f(br.x - 536, tl.y), SColor(0xffffffff)); - //GUI::DrawText("" " | ", Vec2f(br.x - 568, tl.y), SColor(0xffffffff)); - //GUI::DrawText(getRules().get_s32("personalstone_" + username) + " ", Vec2f(br.x - 600, tl.y), SColor(0xffffffff)); - - // icons for mats - //GUI::DrawIcon("Materials.png", 25, Vec2f(16, 16), Vec2f(br.x - 555, tl.y), 0.50f, 0); // wood - //GUI::DrawIcon("Materials.png", 24, Vec2f(16, 16), Vec2f(br.x - 618, tl.y), 0.50f, 0); // stone - int teamIndexSpectators = 200; int teamIndexBlue = 0; int teamIndexRed = 1; @@ -925,6 +915,29 @@ void onRenderScoreboard(CRules@ this) Vec2f mousePos = controls.getMouseScreenPos(); bool left_side = mousePos.x