From: terencehill Date: Wed, 4 Aug 2010 18:55:12 +0000 (+0200) Subject: Allow to draw BorderPicture without borders in menu too X-Git-Tag: xonotic-v0.1.0preview~341^2~11 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=28bba9be8429f542df5595c12859a68221873eee Allow to draw BorderPicture without borders in menu too This actually fix menu dialogs with exaggerated dimensions using HEIGHT_DIALOGBORDER 0 --- diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index cec73d6c0a..1bda59583b 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -167,6 +167,12 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the vector dX, dY; vector width, height; vector bW, bH; + if (theBorderSize_x <= 0 && theBorderSize_y <= 0) // no border + { + // draw only the central part + drawsubpic(theOrigin, theSize, pic, '0.25 0.25 0', '0.5 0.5 0', theColor, theAlpha, 0); + return; + } pic = draw_UseSkinFor(pic); theOrigin = boxToGlobal(theOrigin, draw_shift, draw_scale); theSize = boxToGlobalSize(theSize, draw_scale);