post = _(" (1 vote)");
else if(count >= 0)
post = sprintf(_(" (%d votes)"), count);
+ else
+ post = "";
}
else
post = "";
void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float count, float id)
{
- vector img_size;
+ vector img_size = '0 0 0';
vector rgb;
string label;
float text_size;
}
else
{
- drawpic(pos, pic, img_size, '1 1 1', theAlpha, DRAWFLAG_NORMAL);
+ if(drawgetimagesize(pic) == '0 0 0')
+ drawpic(pos, draw_UseSkinFor("nopreview_map"), img_size, '1 1 1', theAlpha, DRAWFLAG_NORMAL);
+ else
+ drawpic(pos, pic, img_size, '1 1 1', theAlpha, DRAWFLAG_NORMAL);
}
if(id == mv_ownvote)
float center;
float columns, rows;
float tsize;
- vector dist;
+ vector dist = '0 0 0';
if(!mv_active)
return;
- mv_mousepos = mv_mousepos + getmousepos();
-
- mv_mousepos_x = bound(0, mv_mousepos_x, vid_conwidth);
- mv_mousepos_y = bound(0, mv_mousepos_y, vid_conheight);
+ if not(autocvar_hud_cursormode)
+ {
+ mv_mousepos = mv_mousepos + getmousepos();
+
+ mv_mousepos_x = bound(0, mv_mousepos_x, vid_conwidth);
+ mv_mousepos_y = bound(0, mv_mousepos_y, vid_conheight);
+ }
center = (vid_conwidth - 1)/2;
xmin = vid_conwidth*0.05; // 5% border must suffice
pos_y = ymin;
pos_z = 0;
+ draw_beginBoldFont();
map = _("Vote for a map");
pos_x = center - stringwidth(map, false, '12 0 0');
drawstring(pos, map, '24 24 0', '1 1 1', 1, DRAWFLAG_NORMAL);
drawstring(pos, map, '16 16 0', '0 1 0', 1, DRAWFLAG_NORMAL);
pos_y += 22;
pos_x = xmin;
+ draw_endBoldFont();
// base for multi-column stuff...
ymin = pos_y;
return;
} else {
print(_("Requesting preview...\n"));
- localcmd(strcat("\ncmd mv_getpic ", ftos(id), "\n"));
+ localcmd(strcat("\ncmd mv_getpicture ", ftos(id), "\n"));
}
}
precache_sound ("misc/invshot.wav");
mv_active = 1;
-
- mv_mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
+ if(autocvar_hud_cursormode) { setcursormode(1); }
+ else { mv_mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight; }
mv_selection = -1;
for(n_ssdirs = 0; ; ++n_ssdirs)
if (!mv_active)
return false;
+ if(bInputType == 3)
+ {
+ mv_mousepos_x = nPrimary;
+ mv_mousepos_y = nSecondary;
+ return true;
+ }
+
if (bInputType != 0)
return false;