From: terencehill Date: Wed, 4 Aug 2010 18:58:35 +0000 (+0200) Subject: Workaround to not draw a big closebutton when HEIGHT_DIALOGBORDER is 0 X-Git-Tag: xonotic-v0.1.0preview~341^2~10 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0ea67677132d4f558b711d75d06640bfb87f8f81;hp=-c Workaround to not draw a big closebutton when HEIGHT_DIALOGBORDER is 0 --- 0ea67677132d4f558b711d75d06640bfb87f8f81 diff --git a/qcsrc/menu/item/borderimage.c b/qcsrc/menu/item/borderimage.c index 236b235222..1fdec60ef7 100644 --- a/qcsrc/menu/item/borderimage.c +++ b/qcsrc/menu/item/borderimage.c @@ -42,7 +42,7 @@ void BorderImage_resizeNotify(entity me, vector relOrigin, vector relSize, vecto { // move the close button to the right place me.closeButton.Container_origin = '1 0 0' * (1 - me.borderVec_x); - me.closeButton.Container_size = me.borderVec; + me.closeButton.Container_size = (me.borderHeight > 0) ? me.borderVec : 0.0001 * '1 1 0'; //workaround to not draw a big closebutton if borderHeight is 0 me.closeButton.color = me.color; me.closeButton.colorC = me.color; me.closeButton.colorF = me.color;