From 2b6c05d71c4746d2e2581293832aed5ae80f04d4 Mon Sep 17 00:00:00 2001 From: Molgrum Date: Sun, 25 May 2008 20:48:31 +0000 Subject: [PATCH] Send blackness to the back when created. The code works but the number 12 should perhaps be an enumeration or something else? git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2973 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/hud/ui_sbar.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/hud/ui_sbar.c b/plugins/hud/ui_sbar.c index c99084c27..5a3b8eb5d 100644 --- a/plugins/hud/ui_sbar.c +++ b/plugins/hud/ui_sbar.c @@ -1866,6 +1866,18 @@ void UI_KeyPress(int key, int mx, int my) currentitem = numelements; numelements++; + if (typetoinsert == 12) + { + int j; + + // Blackness should be sent to the back + for (j = numelements; j > 0; j--) + { + element[j] = element[j-1]; + } + + currentitem = 0; + } element[currentitem].type = typetoinsert; element[currentitem].alpha = 1; element[currentitem].scalex = 1;