X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmapvoting.qc;h=40fcfda11cda44efbbf29b787f599be41c069489;hb=e0c1470ac5fcae5caeea336e35909475880357df;hp=17036a9eb80d2588eec38d5b07ee2a4931629c52;hpb=0e7ed909bffb4ff21f0c68d163edfc17487e380a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 17036a9eb..40fcfda11 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -51,28 +51,28 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin string label; float text_size; - isize -= sbar_fontsize_y; // respect the text when calculating the image size + isize -= hud_fontsize_y; // respect the text when calculating the image size rgb = MapVote_RGB(id); img_size_y = isize; img_size_x = isize / 0.75; // 4:3 x can be stretched easily, height is defined in isize - drawfont = sbar_font; + drawfont = hud_font; pos_y = pos_y + img_size_y; - label = MapVote_FormatMapItem(id, map, count, tsize, sbar_fontsize); + label = MapVote_FormatMapItem(id, map, count, tsize, hud_fontsize); - text_size = stringwidth(label, false, sbar_fontsize); + text_size = stringwidth(label, false, hud_fontsize); pos_x -= text_size*0.5; - drawstring(pos, label, sbar_fontsize, rgb, 1, DRAWFLAG_NORMAL); + drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL); pos_x = pos_x + text_size*0.5 - img_size_x*0.5; pos_y = pos_y - img_size_y; - pos += sbar_border_thickness * '1 1 0'; - img_size -= (sbar_border_thickness * 2) * '1 1 0'; + pos += autocvar_scoreboard_border_thickness * '1 1 0'; + img_size -= (autocvar_scoreboard_border_thickness * 2) * '1 1 0'; if(pic == "") { drawfill(pos, img_size, '.5 .5 .5', .7, DRAWFLAG_NORMAL); @@ -81,19 +81,14 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin { drawpic(pos, pic, img_size, '1 1 1', 1, DRAWFLAG_NORMAL); } - - drawpic(pos + '1 0 0', strcat("gfx/hud/num_", ftos(id+1)), (img_size_y / 5) * '1 1 0', '1 1 1', 0.6, DRAWFLAG_NORMAL); - if(id == mv_ownvote || pic == "") - { - drawborderlines(sbar_border_thickness, pos, img_size, rgb, 1, DRAWFLAG_NORMAL); - drawpic(pos + '1 0 0', strcat("gfx/hud/num_", ftos(id+1)), (img_size_y / 5) * '1 1 0', rgb, 0.6, DRAWFLAG_NORMAL); - } + if(id == mv_ownvote) + drawborderlines(autocvar_scoreboard_border_thickness, pos, img_size, rgb, 1, DRAWFLAG_NORMAL); else - { - drawborderlines(sbar_border_thickness, pos, img_size, '0 0 0', 1, DRAWFLAG_NORMAL); - drawpic(pos + '1 0 0', strcat("gfx/hud/num_", ftos(id+1)), (img_size_y / 5) * '1 1 0', '1 1 1', 0.6, DRAWFLAG_NORMAL); - } + drawborderlines(autocvar_scoreboard_border_thickness, pos, img_size, '0 0 0', 1, DRAWFLAG_NORMAL); + + if(id == mv_selection) + drawfill(pos, img_size, '1 1 1', 0.1, DRAWFLAG_NORMAL); } void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, float id) @@ -104,15 +99,15 @@ void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, floa rgb = MapVote_RGB(id); - drawfont = sbar_font; - pos_y = pos_y + sbar_fontsize_y; + drawfont = hud_font; + pos_y = pos_y + hud_fontsize_y; - label = MapVote_FormatMapItem(id, "Don't care", count, tsize, sbar_fontsize); + label = MapVote_FormatMapItem(id, "Don't care", count, tsize, hud_fontsize); - text_size = stringwidth(label, false, sbar_fontsize); + text_size = stringwidth(label, false, hud_fontsize); pos_x -= text_size*0.5; - drawstring(pos, label, sbar_fontsize, rgb, 1, DRAWFLAG_NORMAL); + drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL); } vector MapVote_GridVec(vector gridspec, float i, float m) @@ -183,8 +178,8 @@ void MapVote_Draw() if(i >= 0 || ymax < (vid_conheight*0.5)) ymax = vid_conheight - ymin; - drawfont = sbar_bigfont; - sbar_fontsize = Sbar_GetFontsize("sbar_fontsize"); + drawfont = hud_bigfont; + hud_fontsize = HUD_GetFontsize("hud_fontsize"); pos_y = ymin; pos_z = 0; @@ -201,7 +196,7 @@ void MapVote_Draw() pos_y += 22; pos_x = xmin; - drawfont = sbar_font; + drawfont = hud_font; // base for multi-column stuff... ymin = pos_y; @@ -244,12 +239,12 @@ void MapVote_Draw() if(mv_abstain && i < mv_num_maps) { tmp = mv_votes[i]; - pos_y = ymax + isize - sbar_fontsize_y; + pos_y = ymax + isize - hud_fontsize_y; pos_x = (xmax+xmin)*0.5; MapVote_DrawAbstain(pos, isize, xmax - xmin, tmp, i); } - drawpic(mv_mousepos, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor.tga"), '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + drawpic(mv_mousepos, strcat("gfx/menu/", cvar_string("menu_skin"), "/cursor.tga"), '32 32 0', '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL); } void Cmd_MapVote_MapDownload(float argc) @@ -331,9 +326,6 @@ void MapVote_Init() precache_sound ("misc/invshot.wav"); - registercmd("+showscores"); - registercmd("-showscores"); - mv_active = 1; mv_mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;