From 5fe98bc035089c03870f9ac54e3b779c3f4a60af Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 21 Jan 2019 18:45:46 +0100 Subject: [PATCH] Pressed keys panel: separate a little bit crouch and jump keys from arrow keys --- hud_luma.cfg | 2 +- hud_luminos.cfg | 2 +- hud_luminos_minimal.cfg | 2 +- hud_luminos_minimal_xhair.cfg | 2 +- hud_luminos_old.cfg | 2 +- hud_nexuiz.cfg | 2 +- qcsrc/client/hud/panel/pressedkeys.qc | 16 ++++++++-------- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hud_luma.cfg b/hud_luma.cfg index 9dcfe0629..813ecbaef 100644 --- a/hud_luma.cfg +++ b/hud_luma.cfg @@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team "" seta hud_panel_pressedkeys_bg_alpha "" seta hud_panel_pressedkeys_bg_border "" seta hud_panel_pressedkeys_bg_padding "1" -seta hud_panel_pressedkeys_aspect "1.6" +seta hud_panel_pressedkeys_aspect "1.8" seta hud_panel_pressedkeys_attack "0" seta hud_panel_chat_pos "0.010000 0.700000" diff --git a/hud_luminos.cfg b/hud_luminos.cfg index 3f4fe39fa..c5cfe4ac5 100644 --- a/hud_luminos.cfg +++ b/hud_luminos.cfg @@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team "" seta hud_panel_pressedkeys_bg_alpha "" seta hud_panel_pressedkeys_bg_border "" seta hud_panel_pressedkeys_bg_padding "" -seta hud_panel_pressedkeys_aspect "1.6" +seta hud_panel_pressedkeys_aspect "1.8" seta hud_panel_pressedkeys_attack "0" seta hud_panel_chat_pos "0.010000 0.700000" diff --git a/hud_luminos_minimal.cfg b/hud_luminos_minimal.cfg index 609ab766d..b72825846 100644 --- a/hud_luminos_minimal.cfg +++ b/hud_luminos_minimal.cfg @@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team "" seta hud_panel_pressedkeys_bg_alpha "" seta hud_panel_pressedkeys_bg_border "" seta hud_panel_pressedkeys_bg_padding "" -seta hud_panel_pressedkeys_aspect "1.6" +seta hud_panel_pressedkeys_aspect "1.8" seta hud_panel_pressedkeys_attack "0" seta hud_panel_chat_pos "0 0.775000" diff --git a/hud_luminos_minimal_xhair.cfg b/hud_luminos_minimal_xhair.cfg index b7a7d20ab..3bfd694b1 100644 --- a/hud_luminos_minimal_xhair.cfg +++ b/hud_luminos_minimal_xhair.cfg @@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team "" seta hud_panel_pressedkeys_bg_alpha "" seta hud_panel_pressedkeys_bg_border "" seta hud_panel_pressedkeys_bg_padding "" -seta hud_panel_pressedkeys_aspect "1.6" +seta hud_panel_pressedkeys_aspect "1.8" seta hud_panel_pressedkeys_attack "0" seta hud_panel_chat_pos "0 0.775000" diff --git a/hud_luminos_old.cfg b/hud_luminos_old.cfg index ce8186811..c808f62fb 100644 --- a/hud_luminos_old.cfg +++ b/hud_luminos_old.cfg @@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team "" seta hud_panel_pressedkeys_bg_alpha "" seta hud_panel_pressedkeys_bg_border "" seta hud_panel_pressedkeys_bg_padding "" -seta hud_panel_pressedkeys_aspect "1.6" +seta hud_panel_pressedkeys_aspect "1.8" seta hud_panel_pressedkeys_attack "0" seta hud_panel_chat_pos "0.020000 0.780000" diff --git a/hud_nexuiz.cfg b/hud_nexuiz.cfg index 4159b01c7..b0b02d080 100644 --- a/hud_nexuiz.cfg +++ b/hud_nexuiz.cfg @@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team "" seta hud_panel_pressedkeys_bg_alpha "" seta hud_panel_pressedkeys_bg_border "" seta hud_panel_pressedkeys_bg_padding "" -seta hud_panel_pressedkeys_aspect "1.6" +seta hud_panel_pressedkeys_aspect "1.8" seta hud_panel_pressedkeys_attack "0" seta hud_panel_chat_pos "0 0.760000" diff --git a/qcsrc/client/hud/panel/pressedkeys.qc b/qcsrc/client/hud/panel/pressedkeys.qc index e9d651a64..0bf9b8dd0 100644 --- a/qcsrc/client/hud/panel/pressedkeys.qc +++ b/qcsrc/client/hud/panel/pressedkeys.qc @@ -52,21 +52,21 @@ void HUD_PressedKeys() mySize = newSize; } - vector keysize = vec2(mySize.x / 3, mySize.y / (3 - !autocvar_hud_panel_pressedkeys_attack)); + vector keysize = vec2(mySize.x / (14/4), mySize.y / (3 - !autocvar_hud_panel_pressedkeys_attack)); int pressedkeys = STAT(PRESSED_KEYS); if(autocvar_hud_panel_pressedkeys_attack) { - drawpic_aspect_skin(pos + eX * keysize.x * 0.5, ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawpic_aspect_skin(pos + eX * keysize.x * 1.5, ((pressedkeys & KEY_ATCK2) ? "key_atck2_inv.tga" : "key_atck2.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (3/4 * keysize.x), ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (7/4 * keysize.x), ((pressedkeys & KEY_ATCK2) ? "key_atck2_inv.tga" : "key_atck2.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); pos.y += keysize.y; } drawpic_aspect_skin(pos, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawpic_aspect_skin(pos + eX * keysize.x, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawpic_aspect_skin(pos + eX * keysize.x * 2, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (10/4 * keysize.x), ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); pos.y += keysize.y; - drawpic_aspect_skin(pos, ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawpic_aspect_skin(pos + eX * keysize.x, ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawpic_aspect_skin(pos + eX * keysize.x * 2, ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (1/4 * keysize.x), ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * (9/4 * keysize.x), ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); } -- 2.39.2