]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'samual/weapons' into Mario/weapons
authorMario <zacjardine@y7mail.com>
Thu, 6 Nov 2014 06:55:52 +0000 (17:55 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 6 Nov 2014 06:55:52 +0000 (17:55 +1100)
41 files changed:
.gitignore
_hud_descriptions.cfg
gfx/menu/luminos/color.tga [deleted file]
gfx/menu/luminos/colorbutton_c.tga
gfx/menu/luminos/colorbutton_f.tga
gfx/menu/luminos/colorbutton_n.tga [changed mode: 0755->0644]
gfx/menu/luminos/skinvalues.txt
gfx/menu/wickedx/color.tga [deleted file]
gfx/menu/wickedx/colorbutton_c.tga
gfx/menu/wickedx/colorbutton_f.tga
gfx/menu/wickedx/colorbutton_n.tga [changed mode: 0755->0644]
gfx/menu/wickedx/skinvalues.txt
gfx/menu/xaw/color.tga [deleted file]
gfx/menu/xaw/colorbutton_c.tga
gfx/menu/xaw/colorbutton_f.tga
gfx/menu/xaw/colorbutton_n.tga
gfx/menu/xaw/skinvalues.txt
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/scoreboard.qc
qcsrc/menu/item/label.c
qcsrc/menu/menu.qc
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/colorbutton.c
qcsrc/menu/xonotic/demolist.c
qcsrc/menu/xonotic/gametypelist.c
qcsrc/menu/xonotic/languagelist.c
qcsrc/menu/xonotic/playerlist.c
qcsrc/menu/xonotic/playermodel.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/weaponslist.c
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh

index 111ff910955c548eff9626df6d03e7f9892890e7..a305108b3a2a7b85823098b7c60d5cf480f50003 100644 (file)
@@ -6,4 +6,5 @@ qcsrc/menu/fteqcc.log
 qcsrc/server/fteqcc.log
 weapons.qc.tmp
 *.lno
-qcsrc/qccversion.*
+qcsrc/qccversion*
+qcsrc/server/precache-for-csqc.inc
index 5f21867d353600ab2aa32dbad1c137f6d3a8ccae..c9a0861556893d5aa382bfe98ec2e4626db42a9f 100644 (file)
@@ -128,6 +128,7 @@ seta hud_panel_notify_flip "" "order the list top to bottom instead of bottom to
 seta hud_panel_notify_fontsize "" "multiplier for the font size used for player names in the panel"
 seta hud_panel_notify_fadetime "" "fade out time"
 seta hud_panel_notify_time "" "time that a new entry stays until it fades out"
+seta hud_panel_notify_icon_aspect "" "aspect ratio of total drawing area per icon"
 
 seta hud_panel_timer "" "enable/disable this panel"
 seta hud_panel_timer_pos "" "position of this base of the panel"
diff --git a/gfx/menu/luminos/color.tga b/gfx/menu/luminos/color.tga
deleted file mode 100644 (file)
index 3ce25a5..0000000
Binary files a/gfx/menu/luminos/color.tga and /dev/null differ
index 586f9b47ef07ed2f7d4660df0fa22edd15521b7d..5f1fc2bcd79eeb072bd996daa9104290e65fd9d6 100644 (file)
Binary files a/gfx/menu/luminos/colorbutton_c.tga and b/gfx/menu/luminos/colorbutton_c.tga differ
index 57d7d933cc38bb28c6fe88521c8dce43723feb01..0ca0d9b6b8a26e0d440611fbdd965835febfc2a4 100644 (file)
Binary files a/gfx/menu/luminos/colorbutton_f.tga and b/gfx/menu/luminos/colorbutton_f.tga differ
old mode 100755 (executable)
new mode 100644 (file)
index 110faa1..26e6da5
Binary files a/gfx/menu/luminos/colorbutton_n.tga and b/gfx/menu/luminos/colorbutton_n.tga differ
index 5e311c9090adaef842639e5a1d0dc5165e559423..025475ab746ad5962d9c004f1ac84e6373fe4841 100755 (executable)
@@ -46,6 +46,7 @@ ALPHA_BACKGROUND_INGAME         1
 ALPHA_DISABLED                  0.2
 ALPHA_BEHIND                    0.5
 ALPHA_TEXT                      0.7
+COLOR_TEXT                      '1 1 1'
 
 // mouse
 //   uses "cursor" images
@@ -67,6 +68,7 @@ MARGIN_TOOLTIP                  '8 8 0'
 BORDER_TOOLTIP                  '16 16 0'
 FONTSIZE_TOOLTIP                12
 ALPHA_TOOLTIP                   0.7
+COLOR_TOOLTIP                   '1 1 1'
 WIDTH_TOOLTIP                   0.3
 AVOID_TOOLTIP                   '8 8 0'
 
@@ -133,6 +135,8 @@ COLOR_SERVERLIST_HIGHPING       '1 0 0'
 ALPHA_SERVERLIST_HIGHPING       0.4
 ALPHA_SERVERLIST_FAVORITE       0.8
 COLOR_SERVERLIST_FAVORITE       '1 1 1'
+ALPHA_SERVERLIST_CATEGORY       0.7
+COLOR_SERVERLIST_CATEGORY       '1 1 1'
 
 // item: skin list
 COLOR_SKINLIST_TITLE            '1 1 1'
@@ -204,7 +208,6 @@ ALPHA_KEYGRABBER_KEYS           0.7
 
 // item: player color button
 //   uses "colorbutton" images
-//   uses "color" images
 
 // item: player name editor
 //   uses "charmap" images
diff --git a/gfx/menu/wickedx/color.tga b/gfx/menu/wickedx/color.tga
deleted file mode 100755 (executable)
index 5189ab4..0000000
Binary files a/gfx/menu/wickedx/color.tga and /dev/null differ
index 1c294f77f51a50a5a8085373e9e03d1144277f33..5f1fc2bcd79eeb072bd996daa9104290e65fd9d6 100644 (file)
Binary files a/gfx/menu/wickedx/colorbutton_c.tga and b/gfx/menu/wickedx/colorbutton_c.tga differ
index 0031c35e35c2c1f6a544c9bbca69ee53a685fba9..0ca0d9b6b8a26e0d440611fbdd965835febfc2a4 100644 (file)
Binary files a/gfx/menu/wickedx/colorbutton_f.tga and b/gfx/menu/wickedx/colorbutton_f.tga differ
old mode 100755 (executable)
new mode 100644 (file)
index 7fec859..26e6da5
Binary files a/gfx/menu/wickedx/colorbutton_n.tga and b/gfx/menu/wickedx/colorbutton_n.tga differ
index 15605128588e79c4e3c73c4f647a3e518837ea50..c5062d91a17be5c381a151a25d3deb861100d02c 100755 (executable)
@@ -46,6 +46,7 @@ ALPHA_BACKGROUND_INGAME         1
 ALPHA_DISABLED                  0.2
 ALPHA_BEHIND                    0.5
 ALPHA_TEXT                      0.7
+COLOR_TEXT                      '1 1 1'
 
 // mouse
 //   uses "cursor" images
@@ -67,6 +68,7 @@ MARGIN_TOOLTIP                  '8 8 0'
 BORDER_TOOLTIP                  '16 16 0'
 FONTSIZE_TOOLTIP                12
 ALPHA_TOOLTIP                   0.7
+COLOR_TOOLTIP                   '1 1 1'
 WIDTH_TOOLTIP                   0.3
 AVOID_TOOLTIP                   '8 8 0'
 
@@ -133,6 +135,8 @@ COLOR_SERVERLIST_HIGHPING       '1 0 0'
 ALPHA_SERVERLIST_HIGHPING       0.4
 ALPHA_SERVERLIST_FAVORITE       0.8
 COLOR_SERVERLIST_FAVORITE       '1 1 1'
+ALPHA_SERVERLIST_CATEGORY       0.7
+COLOR_SERVERLIST_CATEGORY       '1 1 1'
 
 // item: skin list
 COLOR_SKINLIST_TITLE            '1 1 1'
@@ -204,7 +208,6 @@ ALPHA_KEYGRABBER_KEYS           0.7
 
 // item: player color button
 //   uses "colorbutton" images
-//   uses "color" images
 
 // item: player name editor
 //   uses "charmap" images
diff --git a/gfx/menu/xaw/color.tga b/gfx/menu/xaw/color.tga
deleted file mode 100644 (file)
index c7d2fbd..0000000
Binary files a/gfx/menu/xaw/color.tga and /dev/null differ
index e3b92d15fe263e45b95914cc5e0fde4e74e5f3d0..c12daf484aef4ba62aa4ada30741788a257ddcb2 100644 (file)
Binary files a/gfx/menu/xaw/colorbutton_c.tga and b/gfx/menu/xaw/colorbutton_c.tga differ
index 31912d79536c50d53d4fa64fb7d08db2b4b72b80..1c737dc9d785535dfdd4ebfe6ac11a60b00eb19e 100644 (file)
Binary files a/gfx/menu/xaw/colorbutton_f.tga and b/gfx/menu/xaw/colorbutton_f.tga differ
index 5d678a6cd88fba822c3a0967ca3ae7e093ff1a8e..537f0254e17adb0065458b0384c5f7c1d87e33b2 100644 (file)
Binary files a/gfx/menu/xaw/colorbutton_n.tga and b/gfx/menu/xaw/colorbutton_n.tga differ
index 3bd555f031ed32255e35cec19596893bfc5597dc..2dc86f698f19f531bfcf7aa99798fcc8d051f8b5 100644 (file)
@@ -14,6 +14,7 @@ MARGIN_TOOLTIP                  '5 5 0'
 BORDER_TOOLTIP                  '1 1 0'
 FONTSIZE_TOOLTIP                12
 ALPHA_TOOLTIP                   0.7
+COLOR_TOOLTIP                   '1 1 1'
 WIDTH_TOOLTIP                   0.3
 AVOID_TOOLTIP                   '8 8 0'
 
@@ -61,6 +62,7 @@ ALPHA_BACKGROUND_INGAME         0
 ALPHA_DISABLED                  0.2
 ALPHA_BEHIND                    1
 ALPHA_TEXT                      0.7
+COLOR_TEXT                      '1 1 1'
 
 // item: button
 //   uses "button" images
@@ -163,7 +165,6 @@ ALPHAS_MAINMENU                 '1 1 1'
 
 // item: player color button
 //   uses "colorbutton" images
-//   uses "color" images
 
 // item: player model
 COLOR_MODELTITLE                '1 1 1'
@@ -197,6 +198,8 @@ COLOR_SERVERLIST_HIGHPING       '1 0 0'
 ALPHA_SERVERLIST_HIGHPING       0.2
 ALPHA_SERVERLIST_FAVORITE       0.8
 COLOR_SERVERLIST_FAVORITE       '1 1 1'
+ALPHA_SERVERLIST_CATEGORY       0.7
+COLOR_SERVERLIST_CATEGORY       '1 1 1'
 
 // item: server info
 COLOR_SERVERINFO_NAME           '1 1 1'
index f2b4fa4bd8504dca76aae7b705b2d948614518c0..2736524c6485bfda302d67eb69869da4110d02b4 100644 (file)
@@ -126,6 +126,7 @@ seta hud_panel_notify_flip "0"
 seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
+seta hud_panel_notify_icon_aspect "2"
 
 seta hud_panel_timer 1
 seta hud_panel_timer_pos "0.800000 0.040000"
index c401132ac3d2fe00f44ca3d1c3da806f85ea6a5b..fdb57a37ee521cb3cd75bd29e51e5909435f65e6 100644 (file)
@@ -126,6 +126,7 @@ seta hud_panel_notify_flip "1"
 seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
+seta hud_panel_notify_icon_aspect "2"
 
 seta hud_panel_timer 1
 seta hud_panel_timer_pos "0.435000 0"
index 518492ed4a7998973481221c835453a6f4d71bab..e0345f822ee25da1e154aee0d54109ebb0f8b495 100644 (file)
@@ -126,6 +126,7 @@ seta hud_panel_notify_flip "1"
 seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
+seta hud_panel_notify_icon_aspect "2"
 
 seta hud_panel_timer 1
 seta hud_panel_timer_pos "0.435000 0"
index 0a5f05955ef8d1a24b1fd5dbcbc95db0e8de84bf..6a94d2b3ee0dc01cbe185fde9bda4adbe6877585 100644 (file)
@@ -126,6 +126,7 @@ seta hud_panel_notify_flip "0"
 seta hud_panel_notify_fontsize "0.8"
 seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
+seta hud_panel_notify_icon_aspect "2"
 
 seta hud_panel_timer 1
 seta hud_panel_timer_pos "0.870000 0"
index acf3ad921e84dd874a96f9b8bd6ca8d4253679ee..5d8ee1fb967f25fab964ecd29fb099a84894f86e 100644 (file)
@@ -126,6 +126,7 @@ seta hud_panel_notify_flip "0"
 seta hud_panel_notify_fontsize "1"
 seta hud_panel_notify_time "10"
 seta hud_panel_notify_fadetime "3"
+seta hud_panel_notify_icon_aspect "2"
 
 seta hud_panel_timer 1
 seta hud_panel_timer_pos "0.850000 0"
index 67a6f522a2496c8095e33829886d79e0fd7787db..053499a985606fd7c2d411107953e29b3a08350e 100644 (file)
@@ -269,6 +269,7 @@ float autocvar_hud_panel_notify_fadetime;
 float autocvar_hud_panel_notify_flip;
 float autocvar_hud_panel_notify_fontsize;
 float autocvar_hud_panel_notify_time;
+float autocvar_hud_panel_notify_icon_aspect;
 float autocvar_hud_panel_physics;
 float autocvar_hud_panel_physics_acceleration_progressbar_mode;
 float autocvar_hud_panel_physics_acceleration_progressbar_scale;
index e52591b0b223ccc22f01dc56cad6b612c10dec06..acd22fef82d35f29e28a75dbc3067f14479602d9 100644 (file)
@@ -1562,148 +1562,154 @@ void HUD_HealthArmor(void)
 
 void HUD_Notify_Push(string icon, string attacker, string victim)
 {
-       if(icon != "")
-       {
-               --kn_index;
-               if (kn_index == -1) { kn_index = KN_MAX_ENTRIES-1; }
-               notify_times[kn_index] = time;
+       if (icon == "")
+               return;
+
+       ++notify_count;
+       --notify_index;
 
-               // icon
-               if(notify_icon[kn_index]) { strunzone(notify_icon[kn_index]); }
-               notify_icon[kn_index] = strzone(icon);
+       if (notify_index == -1)
+               notify_index = NOTIFY_MAX_ENTRIES-1;
 
-               // attacker
-               if(notify_attackers[kn_index]) { strunzone(notify_attackers[kn_index]); }
-               notify_attackers[kn_index] = strzone(attacker);
+       // Free old strings
+       if (notify_attackers[notify_index])
+               strunzone(notify_attackers[notify_index]);
 
-               // victim
-               if(notify_victims[kn_index]) { strunzone(notify_victims[kn_index]); }
-               notify_victims[kn_index] = strzone(victim);
+       if (notify_victims[notify_index])
+               strunzone(notify_victims[notify_index]);
+
+       if (notify_icons[notify_index])
+               strunzone(notify_icons[notify_index]);
+
+       // Allocate new strings
+       if (victim != "")
+       {
+               notify_attackers[notify_index] = strzone(attacker);
+               notify_victims[notify_index] = strzone(victim);
        }
+       else
+       {
+               // In case of a notification without a victim, the attacker
+               // is displayed on the victim's side. Instead of special
+               // treatment later on, we can simply switch them here.
+               notify_attackers[notify_index] = string_null;
+               notify_victims[notify_index] = strzone(attacker);
+       }
+
+       notify_icons[notify_index] = strzone(icon);
+       notify_times[notify_index] = time;
 }
 
 void HUD_Notify(void)
 {
-       if(!autocvar__hud_configure)
-       {
-               if(!autocvar_hud_panel_notify) return;
-       }
+       if (!autocvar__hud_configure)
+               if (!autocvar_hud_panel_notify)
+                       return;
 
        HUD_Panel_UpdateCvars();
-       vector pos, mySize;
-       pos = panel_pos;
-       mySize = panel_size;
-
        HUD_Panel_DrawBg(1);
-       if(panel_bg_padding)
+
+       if (!autocvar__hud_configure)
+               if (notify_count == 0)
+                       return;
+
+       vector pos, size;
+       pos  = panel_pos;
+       size = panel_size;
+
+       if (panel_bg_padding)
        {
-               pos += '1 1 0' * panel_bg_padding;
-               mySize -= '2 2 0' * panel_bg_padding;
+               pos  += '1 1 0' * panel_bg_padding;
+               size -= '2 2 0' * panel_bg_padding;
        }
 
-       float entries, height;
-       entries = bound(1, floor(KN_MAX_ENTRIES * mySize_y/mySize_x), KN_MAX_ENTRIES);
-       height = mySize_y/entries;
+       float fade_start = max(0, autocvar_hud_panel_notify_time);
+       float fade_time = max(0, autocvar_hud_panel_notify_fadetime);
+       float icon_aspect = max(1, autocvar_hud_panel_notify_icon_aspect);
 
-       vector fontsize;
-       float fontheight = height * autocvar_hud_panel_notify_fontsize;
-       fontsize = '0.5 0.5 0' * fontheight;
+       float entry_count = bound(1, floor(NOTIFY_MAX_ENTRIES * size_y / size_x), NOTIFY_MAX_ENTRIES);
+       float entry_height = size_y / entry_count;
 
-       float a;
-       float when;
-       when = autocvar_hud_panel_notify_time;
-       float fadetime;
-       fadetime = autocvar_hud_panel_notify_fadetime;
+       float panel_width_half = size_x * 0.5;
+       float icon_width_half = entry_height * icon_aspect / 2;
+       float name_maxwidth = panel_width_half - icon_width_half - size_x * NOTIFY_ICON_MARGIN;
+
+       vector font_size = '0.5 0.5 0' * entry_height * autocvar_hud_panel_notify_fontsize;
+       vector icon_size = (eX * icon_aspect + eY) * entry_height;
+       vector icon_left = eX * (panel_width_half - icon_width_half);
+       vector attacker_right = eX * name_maxwidth;
+       vector victim_left = eX * (size_x - name_maxwidth);
 
-       vector pos_attacker, pos_victim, pos_icon;
-       float width_attacker;
+       vector attacker_pos, victim_pos, icon_pos;
        string attacker, victim, icon;
+       float i, j, count, step, limit, alpha;
 
-       float i, j, step, limit;
-       if(autocvar_hud_panel_notify_flip) //order items from the top down
+       if (autocvar_hud_panel_notify_flip)
        {
+               // Order items from the top down
                i = 0;
                step = +1;
-               limit = entries;
+               limit = entry_count;
        }
-       else //order items from the bottom up
+       else
        {
-               i = entries - 1;
+               // Order items from the bottom up
+               i = entry_count - 1;
                step = -1;
                limit = -1;
        }
 
-       for(j = kn_index;  i != limit;  i += step, ++j)
+       for (j = notify_index, count = 0; i != limit; i += step, ++j, ++count)
        {
                if(autocvar__hud_configure)
                {
-                       if (step == +1)
-                               a = i;
-                       else // inverse order
-                               a = entries - 1 - i;
-                       attacker = textShortenToWidth(sprintf(_("Player %d"), a+1), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       victim = textShortenToWidth(sprintf(_("Player %d"), a+2), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       icon = get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).model2;
-                       a = bound(0, (when - a) / 4, 1);
-                       goto hud_config_notifyprint;
+                       attacker = sprintf(_("Player %d"), count + 1);
+                       victim = sprintf(_("Player %d"), count + 2);
+                       icon = get_weaponinfo(min(WEP_FIRST + count * 2, WEP_LAST)).model2;
+                       alpha = bound(0, 1.2 - count / entry_count, 1);
                }
                else
                {
-                       if (j == KN_MAX_ENTRIES)
+                       if (j == NOTIFY_MAX_ENTRIES)
                                j = 0;
 
-                       if(notify_times[j] + when > time)
-                               a = 1;
-                       else if(fadetime)
+                       if (notify_times[j] + fade_start > time)
+                               alpha = 1;
+                       else if (fade_time != 0)
                        {
-                               a = bound(0, (notify_times[j] + when + fadetime - time) / fadetime, 1);
-                               if(!a)
-                               {
+                               alpha = bound(0, (notify_times[j] + fade_start + fade_time - time) / fade_time, 1);
+                               if (alpha == 0)
                                        break;
-                               }
                        }
                        else
-                       {
                                break;
-                       }
 
                        attacker = notify_attackers[j];
                        victim = notify_victims[j];
-                       icon = notify_icon[j];
+                       icon = notify_icons[j];
                }
 
-               //type = notify_deathtype[j];
-               //w = DEATH_WEAPONOF(type);
-
-               if(icon != "")
+               if (icon != "" && victim != "")
                {
-                       if((attacker != "") && (victim == ""))
-                       {
-                               // Y [used by] X
-                               attacker = textShortenToWidth(attacker, 0.73 * mySize_x - height, fontsize, stringwidth_colors);
-                               pos_attacker = pos + eX * (0.27 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
-                               pos_icon = pos + eX * 0.25 * mySize_x - eX * height + eY * i * height;
+                       vector name_top = eY * (i * entry_height + 0.5 * (entry_height - font_size_y));
 
-                               drawpic_aspect_skin(pos_icon, icon, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                               drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                       }
-                       else if((attacker != "") && (victim != ""))
+                       icon_pos = pos + icon_left + eY * i * entry_height;
+                       drawpic_aspect_skin(icon_pos, icon, icon_size, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+
+                       victim = textShortenToWidth(victim, name_maxwidth, font_size, stringwidth_colors);
+                       victim_pos = pos + victim_left + name_top;
+                       drawcolorcodedstring(victim_pos, victim, font_size, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+
+                       if (attacker != "")
                        {
-                               // X [did action to] Y
-                               attacker = textShortenToWidth(attacker, 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                               victim = textShortenToWidth(victim, 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-:hud_config_notifyprint
-                               width_attacker = stringwidth(attacker, TRUE, fontsize);
-                               pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
-                               pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight)));
-                               pos_icon = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
-                               drawpic_aspect_skin(pos_icon, icon, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                               drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
-                               drawcolorcodedstring(pos_victim, victim, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                               attacker = textShortenToWidth(attacker, name_maxwidth, font_size, stringwidth_colors);
+                               attacker_pos = pos + attacker_right - eX * stringwidth(attacker, TRUE, font_size) + name_top;
+                               drawcolorcodedstring(attacker_pos, attacker, font_size, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
                        }
                }
        }
+
+       notify_count = count;
 }
 
 // Timer (#5)
index 5c062c5facb3400224105766e1628651f83c8c50..dcaa81a87153d4a71efdd66514a3ef4fa42b3b0f 100644 (file)
@@ -337,14 +337,16 @@ panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_bo
 HUD_Panel_GetBorder() \
 } ENDS_WITH_CURLY_BRACE
 
+#define NOTIFY_MAX_ENTRIES 10
+#define NOTIFY_ICON_MARGIN 0.02
 
-#define KN_MAX_ENTRIES 10
+float notify_index;
+float notify_count;
+float notify_times[NOTIFY_MAX_ENTRIES];
+string notify_attackers[NOTIFY_MAX_ENTRIES];
+string notify_victims[NOTIFY_MAX_ENTRIES];
+string notify_icons[NOTIFY_MAX_ENTRIES];
 
-float kn_index;
-float notify_times[KN_MAX_ENTRIES];
-string notify_icon[KN_MAX_ENTRIES];
-string notify_attackers[KN_MAX_ENTRIES];
-string notify_victims[KN_MAX_ENTRIES];
 void HUD_Notify_Push(string icon, string attacker, string victim);
 
 var void HUD_ModIcons_GameType(vector pos, vector size);
index 98dbdefd1872ee2637a7d04ef383f4b244d48e70..8ecc326b1e788441547b2fd7ec2081ffbd7bbd60 100644 (file)
@@ -119,6 +119,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_fontsize");
                                        HUD_Write_PanelCvar_q("_time");
                                        HUD_Write_PanelCvar_q("_fadetime");
+                                       HUD_Write_PanelCvar_q("_icon_aspect");
                                        break;
                                case HUD_PANEL_TIMER:
                                        HUD_Write_PanelCvar_q("_increment");
index 8b674e7826c2ccd6529e46a703d55ee00a21a2ae..fbdbc45f3a3c25a0c5f4f650c7cba9cfe2349b53 100644 (file)
@@ -589,20 +589,6 @@ float getplayeralpha(float pl)
        return 1;
 }
 
-vector getcsqcplayercolor(float pl)
-{
-       entity e;
-
-       e = CSQCModel_server2csqc(pl);
-       if(e)
-       {
-               if(e.colormap > 0)
-                       return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, TRUE);
-       }
-
-       return '1 1 1';
-}
-
 float getplayerisdead(float pl)
 {
        entity e;
index b206e2a7f1eda55b7629b94826431d854cc315be..06e29680f2d3a9499241ffb8c96d27bd7e8ed2e3 100644 (file)
@@ -376,7 +376,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_field[hud_num_fields] = SP_PL;
                } else if(str == "kd" || str == "kdr" || str == "kdratio" || str == "k/d") {
                        hud_field[hud_num_fields] = SP_KDRATIO;
-               } else if(str == "sum" || str == "diff" || str == "f-d") {
+               } else if(str == "sum" || str == "diff" || str == "k-d") {
                        hud_field[hud_num_fields] = SP_SUM;
                } else if(str == "name" || str == "nick") {
                        hud_field[hud_num_fields] = SP_NAME;
index 8406af01f6be3e68f3ab80260641d7d1145cf93c..0f6f96647198e5a4e5605cf13cd1c7608aa9737f 100644 (file)
@@ -20,7 +20,7 @@ CLASS(Label) EXTENDS(Item)
        ATTRIB(Label, realFontSize, vector, '0 0 0')
        ATTRIB(Label, realOrigin, vector, '0 0 0')
        ATTRIB(Label, alpha, float, 0.7)
-       ATTRIB(Label, colorL, vector, '1 1 1')
+       ATTRIB(Label, colorL, vector, SKINCOLOR_TEXT)
        ATTRIB(Label, disabled, float, 0)
        ATTRIB(Label, disabledAlpha, float, 0.3)
        ATTRIB(Label, textEntity, entity, NULL)
index 382a19d2ded3074b4fae4dabc92c9e73e13b819f..d7fd581a32f9a3f15125d8ed246bcc90cbffc05a 100644 (file)
@@ -666,7 +666,7 @@ void m_tooltip(vector pos)
                        while(getWrappedLine_remaining)
                        {
                                s = getWrappedLine(SKINWIDTH_TOOLTIP, fontsize, draw_TextWidth_WithoutColors);
-                               draw_Text(p, s, fontsize, '1 1 1', SKINALPHA_TOOLTIP * menuTooltipAlpha, FALSE);
+                               draw_Text(p, s, fontsize, SKINCOLOR_TOOLTIP, SKINALPHA_TOOLTIP * menuTooltipAlpha, FALSE);
                                p_y += fontsize_y;
                        }
                }
index 6b5cac042ca970af7df0cc83c1c4e9f5e5e14585..6583898bc7ff8dfc5c50f4e0fa59291a91bcbd6b 100644 (file)
@@ -45,10 +45,11 @@ SKINBEGIN
        SKINSTRING(GFX_TOOLTIP, "tooltip");
        SKINVECTOR(MARGIN_TOOLTIP, '5 5 0');
        SKINVECTOR(BORDER_TOOLTIP, '1 1 0');
+       SKINVECTOR(AVOID_TOOLTIP, '8 8 0');
+       SKINFLOAT(WIDTH_TOOLTIP, 0.3);
        SKINFLOAT(FONTSIZE_TOOLTIP, 12);
        SKINFLOAT(ALPHA_TOOLTIP, 0.7);
-       SKINFLOAT(WIDTH_TOOLTIP, 0.3);
-       SKINVECTOR(AVOID_TOOLTIP, '8 8 0');
+       SKINVECTOR(COLOR_TOOLTIP, '1 1 1');
 
        // the individual dialog background colors
        SKINVECTOR(COLOR_DIALOG_FIRSTRUN, '0.7 0.7 1');
@@ -97,7 +98,8 @@ SKINBEGIN
        SKINFLOAT(ALPHA_DISABLED, 0.2);
        SKINFLOAT(ALPHA_BEHIND, 0.5);
        SKINFLOAT(ALPHA_TEXT, 0.7);
-
+       SKINVECTOR(COLOR_TEXT, '1 1 1');
+       
        // item: button
        SKINSTRING(GFX_BUTTON, "button");
        SKINSTRING(GFX_BUTTON_GRAY, "buttongray");
@@ -201,7 +203,6 @@ SKINBEGIN
 
        // item: player color button
        SKINSTRING(GFX_COLORBUTTON, "colorbutton");
-       SKINSTRING(GFX_COLORBUTTON_COLOR, "color");
 
        // item: player model
        SKINVECTOR(COLOR_MODELTITLE, '1 1 1');
@@ -227,6 +228,8 @@ SKINBEGIN
        SKINFLOAT(WIDTH_SCROLLBAR, 16);
 
        // item: server list
+       SKINFLOAT(ALPHA_SERVERLIST_CATEGORY, 0.7);
+       SKINVECTOR(COLOR_SERVERLIST_CATEGORY, '1 1 1');
        SKINFLOAT(ALPHA_SERVERLIST_FULL, 0.4);
        SKINFLOAT(ALPHA_SERVERLIST_EMPTY, 0.7);
        SKINVECTOR(COLOR_SERVERLIST_LOWPING, '0 1 0');
index 772c9e452cdfb72e6e74fd1a7f2b52ff86624acb..bcbdfee8db9d3585a4aa4e51567492207cd392bc 100644 (file)
@@ -3,9 +3,8 @@ CLASS(XonoticColorButton) EXTENDS(RadioButton)
        METHOD(XonoticColorButton, configureXonoticColorButton, void(entity, float, float, float))
        METHOD(XonoticColorButton, setChecked, void(entity, float))
        METHOD(XonoticColorButton, draw, void(entity))
-       ATTRIB(XonoticColorButton, fontSize, float, SKINFONTSIZE_NORMAL)
+       ATTRIB(XonoticColorButton, fontSize, float, 0)
        ATTRIB(XonoticColorButton, image, string, SKINGFX_COLORBUTTON)
-       ATTRIB(XonoticColorButton, image2, string, SKINGFX_COLORBUTTON_COLOR)
 
        ATTRIB(XonoticColorButton, useDownAsChecked, float, 1)
 
@@ -54,8 +53,6 @@ void XonoticColorButton_configureXonoticColorButton(entity me, float theGroup, f
        me.cvarPart = theColor;
        me.loadCvars(me);
        me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
-       me.srcMulti = 1;
-       me.src2 = me.image2;
 }
 void XonoticColorButton_setChecked(entity me, float val)
 {
@@ -94,7 +91,10 @@ void XonoticColorButton_saveCvars(entity me)
 }
 void XonoticColorButton_draw(entity me)
 {
-       me.color2 = colormapPaletteColor(me.cvarValueFloat, me.cvarPart);
+       me.color  = colormapPaletteColor(me.cvarValueFloat, me.cvarPart);
+       me.colorC = me.color;
+       me.colorF = me.color;
+       me.colorD = me.color;
        SUPER(XonoticColorButton).draw(me);
 }
 #endif
index ee8cf6a4f613c3e3db2ac8df019cfdcf3b5ac22e..cf0e987c0a475dc34fbe920dfc9fa5cd9b6c3686 100644 (file)
@@ -104,7 +104,7 @@ void XonoticDemoList_drawListBoxItem(entity me, float i, vector absSize, float i
 
        s = me.demoName(me,i);
        s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+       draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0);
 }
 
 void XonoticDemoList_showNotify(entity me)
index 56c25314da697317fdebfa66dceec917577dfc54..02f17dddb70b2fd459c8556d4e478b4a1cd2b0e9 100644 (file)
@@ -83,9 +83,9 @@ void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, flo
 
        draw_Picture(me.columnIconOrigin * eX, GameType_GetIcon(i), me.columnIconSize * eX + eY, '1 1 1', SKINALPHA_LISTBOX_SELECTED);
        s = GameType_GetName(i);
-       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.5 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+       draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 0.5 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0);
        //s = GameType_GetTeams(i);
-       //draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+       //draw_Text(me.realUpperMargin1 * eY + (me.columnNameOrigin + 1.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0);
 }
 void XonoticGametypeList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
 {
index b91610a30ed01e452ccf1eb607f07e53c14596f3..56d074115a4c6a788ba49d83e558739c86244cb3 100644 (file)
@@ -65,13 +65,13 @@ void XonoticLanguageList_drawListBoxItem(entity me, float i, vector absSize, flo
 
        s = me.languageParameter(me, i, LANGPARM_NAME_LOCALIZED);
        s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+       draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0);
 
        p = me.languageParameter(me, i, LANGPARM_PERCENTAGE);
        if(p != "")
        {
                p = draw_TextShortenToWidth(p, me.columnPercentageSize, 0, me.realFontSize);
-               draw_Text(me.realUpperMargin * eY + (me.columnPercentageOrigin + (me.columnPercentageSize - draw_TextWidth(p, 0, me.realFontSize))) * eX, p, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+               draw_Text(me.realUpperMargin * eY + (me.columnPercentageOrigin + (me.columnPercentageSize - draw_TextWidth(p, 0, me.realFontSize))) * eX, p, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0);
        }
 }
 
index a0f64ca39e424c97a05a83e1064b205fa4a3a65d..315a68caa731b4c15657ca4e0d20c13b60814c60 100644 (file)
@@ -108,7 +108,7 @@ void XonoticPlayerList_drawListBoxItem(entity me, float i, vector absSize, float
        else if(t == 4)
                rgb = colormapPaletteColor(9, 0);
        else
-               rgb = '1 1 1';
+               rgb = SKINCOLOR_TEXT;
 
        s = me.getPlayerList(me, i, PLAYERPARM_NAME);
        score = me.getPlayerList(me, i, PLAYERPARM_SCORE);
index f37aaeb0750d8568dea1d8cf79b9a6f738bb71ff..e4195617f9d8542f966e7a196b84a57ba3f6b208 100644 (file)
@@ -174,7 +174,7 @@ void XonoticPlayerModelSelector_draw(entity me)
 
        if (me.numModels <= 0)
        {
-               draw_CenterText('0.5 0.5 0', _("<no model found>"), me.realFontSize, '1 1 1', 0.6, FALSE);
+               draw_CenterText('0.5 0.5 0', _("<no model found>"), me.realFontSize, SKINCOLOR_TEXT, 0.6, FALSE);
                return;
        }
 
@@ -190,7 +190,7 @@ void XonoticPlayerModelSelector_draw(entity me)
        o = '0.5 1 0' - eY * me.realFontSize_y * ((n = tokenizebyseparator(me.currentModelDescription, "\n")) + 0.5);
        for(i = 0; i < n; ++i)
        {
-               draw_CenterText(o, argv(i), me.realFontSize, '1 1 1', 1, FALSE);
+               draw_CenterText(o, argv(i), me.realFontSize, SKINCOLOR_TEXT, 1, FALSE);
                o += eY * me.realFontSize_y;
        }
 }
index 0c7fe148be6ea7b0eed1c01ec353c6d59ffbd282..7537027512bfee66d7f5ad43c7bca65f9864aaca 100644 (file)
@@ -1013,8 +1013,8 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                                strcat(catent.cat_string, ":"),
 #endif
                                me.realFontSize,
-                               '1 1 1',
-                               SKINALPHA_TEXT,
+                               SKINCOLOR_SERVERLIST_CATEGORY,
+                               SKINALPHA_SERVERLIST_CATEGORY,
                                0
                        );
                        SET_YRANGE(me.categoriesHeight / (me.categoriesHeight + 1), 1);
index ad4071060f99ec53c97359ed2f04ebd6bb23556e..b6c536a90441cf7bf1cedc471bcc12280f786b84 100644 (file)
@@ -100,7 +100,7 @@ void XonoticWeaponsList_drawListBoxItem(entity me, float i, vector absSize, floa
        string msg = e.message;
        if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
                msg = sprintf(_("%s (mutator weapon)"), msg);
-       draw_Text(me.realUpperMargin * eY, msg, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
+       draw_Text(me.realUpperMargin * eY, msg, me.realFontSize, SKINCOLOR_TEXT, SKINALPHA_TEXT, 0);
 }
 
 float XonoticWeaponsList_keyDown(entity me, float scan, float ascii, float shift)
index b89a81f688478dc79f675dd6968612f210ba78d3..0e0209892d447fec334eecfe976d8a368cdd2f92 100644 (file)
@@ -137,14 +137,14 @@ void ItemRead(float _IsNew)
 
 
 
-            if(fexists(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix)))
-                self.mdl = strzone(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix));
-            else if(fexists(sprintf("%s%s.dpm", _fn2, autocvr_cl_simpleitems_postfix)))
-                self.mdl = strzone(sprintf("%s%s.dpm", _fn2, autocvr_cl_simpleitems_postfix));
-            else if(fexists(sprintf("%s%s.iqm", _fn2, autocvr_cl_simpleitems_postfix)))
-                self.mdl = strzone(sprintf("%s%s.iqm", _fn2, autocvr_cl_simpleitems_postfix));
-            else if(fexists(sprintf("%s%s.obj", _fn2, autocvr_cl_simpleitems_postfix)))
-                self.mdl = strzone(sprintf("%s%s.obj", _fn2, autocvr_cl_simpleitems_postfix));
+            if(fexists(sprintf("%s%s.md3", _fn2, autocvar_cl_simpleitems_postfix)))
+                self.mdl = strzone(sprintf("%s%s.md3", _fn2, autocvar_cl_simpleitems_postfix));
+            else if(fexists(sprintf("%s%s.dpm", _fn2, autocvar_cl_simpleitems_postfix)))
+                self.mdl = strzone(sprintf("%s%s.dpm", _fn2, autocvar_cl_simpleitems_postfix));
+            else if(fexists(sprintf("%s%s.iqm", _fn2, autocvar_cl_simpleitems_postfix)))
+                self.mdl = strzone(sprintf("%s%s.iqm", _fn2, autocvar_cl_simpleitems_postfix));
+            else if(fexists(sprintf("%s%s.obj", _fn2, autocvar_cl_simpleitems_postfix)))
+                self.mdl = strzone(sprintf("%s%s.obj", _fn2, autocvar_cl_simpleitems_postfix));
             else
             {
                 self.draw = ItemDraw;
index edd3df23a5399095d6f439ce6a4fe02e565bb530..13cc3796fe1a0539a3bd779e0efec7971f21cdfb 100644 (file)
@@ -70,7 +70,7 @@ var float  autocvar_cl_fullbright_items = 0;
 var vector autocvar_cl_weapon_stay_color = '2 0.5 0.5';
 var float  autocvar_cl_weapon_stay_alpha = 0.75;
 var float  autocvar_cl_simple_items = 0;
-var string autocvr_cl_simpleitems_postfix = "_simple";
+var string autocvar_cl_simpleitems_postfix = "_simple";
 .float  spawntime;
 .float  gravity;
 .vector colormod;