From 28bba9be8429f542df5595c12859a68221873eee Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 4 Aug 2010 20:55:12 +0200 Subject: [PATCH] Allow to draw BorderPicture without borders in menu too This actually fix menu dialogs with exaggerated dimensions using HEIGHT_DIALOGBORDER 0 --- qcsrc/menu/draw.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index cec73d6c0..1bda59583 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); -- 2.39.2