From: terencehill Date: Mon, 11 Apr 2011 15:28:32 +0000 (+0200) Subject: Do not spawn the close button on menu dialogs if HEIGHT_DIALOGBORDER is 0 (skin file... X-Git-Tag: xonotic-v0.5.0~263^2~1^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a508800c7746487ea72692956139f1061364acf;p=xonotic%2Fxonotic-data.pk3dir.git Do not spawn the close button on menu dialogs if HEIGHT_DIALOGBORDER is 0 (skin file attribute). Button was shown bigger than normal rather than invisible because drawpic displays an image with its real dimension when given input size is '0 0' It's still possible to close a dialog by pressing the ESC key. --- diff --git a/qcsrc/menu/item/dialog.c b/qcsrc/menu/item/dialog.c index 800a12681..da6a4013c 100644 --- a/qcsrc/menu/item/dialog.c +++ b/qcsrc/menu/item/dialog.c @@ -152,7 +152,7 @@ void Dialog_configureDialog(entity me) me.fill(me); - if(me.closable) + if(me.closable && me.borderLines > 0) { closebutton = me.closeButton = spawnButton(); closebutton.configureButton(closebutton, "", 0, me.closeButtonImage);