]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mapvoting.qc
Merge remote-tracking branch 'origin/master' into terencehill/cursormode
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mapvoting.qc
index 4cb8dad05fff509e7a905ffc6627a850df8459fb..0961096a4dc53a28abadabc9c2f2ee2bbad894a6 100644 (file)
@@ -174,11 +174,6 @@ void MapVote_Draw()
        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);
-
        center = (vid_conwidth - 1)/2;
        xmin = vid_conwidth*0.05; // 5% border must suffice
        xmax = vid_conwidth - xmin;
@@ -194,6 +189,7 @@ void MapVote_Draw()
        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);
@@ -205,6 +201,7 @@ void MapVote_Draw()
        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;
@@ -333,8 +330,7 @@ void MapVote_Init()
        precache_sound ("misc/invshot.wav");
 
        mv_active = 1;
-
-       mv_mousepos = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
+       setcursormode(1);
        mv_selection = -1;
 
        for(n_ssdirs = 0; ; ++n_ssdirs)
@@ -404,6 +400,13 @@ float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary)
        if (!mv_active)
                return false;
 
+       if(bInputType == 3)
+       {
+               mv_mousepos_x = nPrimary;
+               mv_mousepos_y = nSecondary;
+               return true;
+       }
+
        if (bInputType != 0)
                return false;