X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fdraw.qc;h=df93daa6e0bcd3cacaf8fbf57d3ffdbdb0d5ba35;hp=7fe4aea3bdc38e57c99eb976b90326f8658198ca;hb=fcf7fbf067d9cd2e8d5094c34e56a087af6d97d5;hpb=c5d2e002cfd511eaf1b1267ab49cd90161f08052 diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index 7fe4aea3b..df93daa6e 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -16,11 +16,21 @@ void draw_drawMousePointer(vector where) void draw_reset(float cw, float ch, float ox, float oy) { - drawfont = FONT_USER+0; draw_shift = '1 0 0' * ox + '0 1 0' * oy; draw_scale = '1 0 0' * cw + '0 1 0' * ch; draw_alpha = 1; draw_fontscale = '1 1 0'; + draw_endBoldFont(); +} + +void draw_beginBoldFont() +{ + drawfont = FONT_USER+3; +} + +void draw_endBoldFont() +{ + drawfont = FONT_USER+0; } vector globalToBox(vector v, vector theOrigin, vector theScale) @@ -59,6 +69,12 @@ string draw_PreloadPicture(string pic) return precache_pic(pic); } +string draw_PreloadPictureWithFlags(string pic, float f) +{ + pic = draw_UseSkinFor(pic); + return precache_pic(pic, f); +} + void draw_Picture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha) { if(theSize_x == 0 || theSize_y <= 0) // no default sizing please @@ -260,8 +276,10 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the } void draw_Text(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz) { - if(theSize_x <= 0 || theSize_y <= 0) - error("Drawing zero size text?\n"); + if(theSize_x <= 0 || theSize_y <= 0) { + dprint("Drawing zero size text?\n"); + return; + } //float wi; //wi = draw_TextWidth(theText, ICanHasKallerz, theSize);