From: terencehill Date: Sun, 10 May 2015 22:57:24 +0000 (+0200) Subject: Don't spawn dialog borders (including title) for each tab contained in a dialog X-Git-Tag: xonotic-v0.8.1~54^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=444593e3a39d68e7c1357aeaaee85d7aec70ca70;p=xonotic%2Fxonotic-data.pk3dir.git Don't spawn dialog borders (including title) for each tab contained in a dialog --- diff --git a/qcsrc/menu/item/dialog.qc b/qcsrc/menu/item/dialog.qc index 1723f27cb..2f64c4e91 100644 --- a/qcsrc/menu/item/dialog.qc +++ b/qcsrc/menu/item/dialog.qc @@ -128,12 +128,15 @@ void Dialog_configureDialog(entity me) { float absWidth, absHeight; - me.frame = spawnBorderImage(); - me.frame.configureBorderImage(me.frame, me.title, me.titleFontSize, me.color, me.backgroundImage, me.borderLines * me.titleHeight); - me.frame.zoomedOutTitleBarPosition = me.zoomedOutTitleBarPosition; - me.frame.zoomedOutTitleBar = me.zoomedOutTitleBar; - me.frame.alpha = me.alpha; - me.addItem(me, me.frame, '0 0 0', '1 1 0', 1); + if(me.isTabRoot) + { + me.frame = spawnBorderImage(); + me.frame.configureBorderImage(me.frame, me.title, me.titleFontSize, me.color, me.backgroundImage, me.borderLines * me.titleHeight); + me.frame.zoomedOutTitleBarPosition = me.zoomedOutTitleBarPosition; + me.frame.zoomedOutTitleBar = me.zoomedOutTitleBar; + me.frame.alpha = me.alpha; + me.addItem(me, me.frame, '0 0 0', '1 1 0', 1); + } if (!me.titleFontSize) me.titleHeight = 0; // no title bar @@ -153,7 +156,7 @@ void Dialog_configureDialog(entity me) me.fill(me); - if(me.closable && me.borderLines > 0) + if(me.isTabRoot && me.closable && me.borderLines > 0) { entity closebutton; closebutton = me.closeButton = me.frame.closeButton = spawnButton();