Skip to content

Commit

Permalink
add team mats in scoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
TerminalHash committed Apr 25, 2024
1 parent 345d0ed commit 52eea58
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions Rules/CommonScripts/ScoreboardRender.as
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -925,6 +915,29 @@ void onRenderScoreboard(CRules@ this)
Vec2f mousePos = controls.getMouseScreenPos();
bool left_side = mousePos.x<getScreenWidth()/2;

///////////////////////////////////////////////
// matetials section

// BLUE TEAM
GUI::DrawText(getRules().get_s32("teamwood" + 0) + " ", Vec2f(bluz_pane_br.x - 1032, bluz_pane_tl.y + 22), SColor(0xffffffff));
GUI::DrawText("" " | ", Vec2f(bluz_pane_br.x - 1065, bluz_pane_tl.y + 20), SColor(0xffffffff));
GUI::DrawText(getRules().get_s32("teamstone" + 0) + " ", Vec2f(bluz_pane_br.x - 1100, bluz_pane_tl.y + 22), SColor(0xffffffff));

// icons for mats
GUI::DrawIcon("Materials.png", 25, Vec2f(16, 16), Vec2f(bluz_pane_br.x - 1050, bluz_pane_tl.y + 20), 0.50f, 0); // wood
GUI::DrawIcon("Materials.png", 24, Vec2f(16, 16), Vec2f(bluz_pane_br.x - 1118, bluz_pane_tl.y + 20), 0.50f, 0); // stone

// RED TEAM
GUI::DrawText(getRules().get_s32("teamwood" + 1) + " ", Vec2f(redz_pane_br.x - 1032, redz_pane_tl.y + 22), SColor(0xffffffff));
GUI::DrawText("" " | ", Vec2f(redz_pane_br.x - 1065, redz_pane_tl.y + 20), SColor(0xffffffff));
GUI::DrawText(getRules().get_s32("teamstone" + 1) + " ", Vec2f(redz_pane_br.x - 1100, redz_pane_tl.y + 22), SColor(0xffffffff));

// icons for mats
GUI::DrawIcon("Materials.png", 25, Vec2f(16, 16), Vec2f(redz_pane_br.x - 1050, redz_pane_tl.y + 20), 0.50f, 0); // wood
GUI::DrawIcon("Materials.png", 24, Vec2f(16, 16), Vec2f(redz_pane_br.x - 1118, redz_pane_tl.y + 20), 0.50f, 0); // stone
///////////////////////////////////////////////


///////////////////////////////////////////////
// Player card section
///////////////////////////////////////////////
Expand Down

0 comments on commit 52eea58

Please sign in to comment.