]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Workaround to not draw a big closebutton when HEIGHT_DIALOGBORDER is 0
authorterencehill <piuntn@gmail.com>
Wed, 4 Aug 2010 18:58:35 +0000 (20:58 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 4 Aug 2010 18:58:35 +0000 (20:58 +0200)
qcsrc/menu/item/borderimage.c

index 236b2352221259a98b0e5604b4e3e2b06180b5c9..1fdec60ef7f8ca9b100d0cd75a4a988e03530abe 100644 (file)
@@ -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;