Commit 14ff3d5a authored by BuddyFriendGuy's avatar BuddyFriendGuy

rid of Game Info background

parent 8903f6e5
Pipeline #56937283 passed with stage
in 13 minutes and 6 seconds
......@@ -1594,38 +1594,17 @@ void Scoreboard_Draw()
vector sb_gameinfo_type_fontsize, sb_gameinfo_detail_fontsize;
int show_gameinfo_subpanel_background = 0; // TODO keep/remove it depending on discussion
vector sb_gameinfo_type_pos, sb_gameinfo_detail_pos;
vector sb_gameinfo_subpanel_size = panel_size; // will be adjusted later
// Game Info subpanel
// Begin of Game Info Section
sb_gameinfo_type_fontsize = hud_fontsize * 2.5;
sb_gameinfo_detail_fontsize = hud_fontsize * 1.3;
// pre-calculate the size of this subpanel
sb_gameinfo_type_pos = pos;
sb_gameinfo_detail_pos = sb_gameinfo_type_pos + '0 1 0' * sb_gameinfo_type_fontsize.y;
sb_gameinfo_subpanel_size.y = sb_gameinfo_detail_pos.y + sb_gameinfo_detail_fontsize.y + hud_fontsize.y * 0.3 - sb_gameinfo_type_pos.y;
if(panel.current_panel_bg != "0")
sb_gameinfo_subpanel_size.y += panel_bg_border;
// draw a background for the info panel
if (show_gameinfo_subpanel_background)
draw_BorderPicture( \
HUD_Shift(panel_pos - '1 1 0' * panel_bg_border), \
panel.current_panel_bg, \
HUD_Scale(sb_gameinfo_subpanel_size + '1 1 0' * 2 * panel_bg_border), \
panel_bg_color, panel_bg_alpha*.3, \
HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) \
); \
// Game Type
// Game Info: Game Type
str = MapInfo_Type_ToText(gametype);
draw_beginBoldFont();
drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_type_fontsize)), str, sb_gameinfo_type_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
draw_endBoldFont();
// Game Detail
// Game Info: Game Detail
float tl, fl, ll;
str = ""; // optionally "^7Limits: "
tl = STAT(TIMELIMIT);
......@@ -1685,11 +1664,9 @@ void Scoreboard_Draw()
// map name
str = sprintf(_("^7Map: ^2%s"), shortmapname);
drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left
// end of Game Info subpanel
// End of Game Info Section
pos.y += sb_gameinfo_detail_fontsize.y + hud_fontsize.y * 0.3;
if (show_gameinfo_subpanel_background)
pos.y += hud_fontsize.y * 0.7; // add more space between backgrounds
pos.y += sb_gameinfo_detail_fontsize.y + hud_fontsize.y * 0.3; // space between Game Info Section and score table
if(panel.current_panel_bg != "0")
pos.y += panel_bg_border;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment