From a941fcbdbbe11ff930357276304987a71e617f11 Mon Sep 17 00:00:00 2001 From: "ALLEN-PC\\acj30" Date: Thu, 29 May 2025 18:08:17 -0500 Subject: [PATCH] Add game_menu support --- .../resource/ClientScheme.res | 7 ++ .../scripts/hudlayout.res | 93 ++++++++++++++++++- .../resource/ClientScheme.res | 7 ++ .../scripts/hudanimations.txt | 87 +++++++++++++++++ .../resource/clientscheme.res | 7 ++ 5 files changed, 199 insertions(+), 2 deletions(-) diff --git a/VPKs/episodic_mapbase_content/resource/ClientScheme.res b/VPKs/episodic_mapbase_content/resource/ClientScheme.res index b986b2e..d71455c 100644 --- a/VPKs/episodic_mapbase_content/resource/ClientScheme.res +++ b/VPKs/episodic_mapbase_content/resource/ClientScheme.res @@ -68,6 +68,13 @@ Scheme // Blank space to leave beneath the menu on the main screen "Main.BottomBorder" "32" + + // ============================================================ + // Mapbase adds these to integrate the TF2-style number menu + // ============================================================ + "MenuColor" "255 220 0 100" + "MenuItemColor" "255 220 0 100" + "MenuBoxColor" "255 220 0 100" } //////////////////////// BITMAP FONT FILES ///////////////////////////// diff --git a/VPKs/episodic_mapbase_content/scripts/hudlayout.res b/VPKs/episodic_mapbase_content/scripts/hudlayout.res index af7625e..065a490 100644 --- a/VPKs/episodic_mapbase_content/scripts/hudlayout.res +++ b/VPKs/episodic_mapbase_content/scripts/hudlayout.res @@ -334,8 +334,20 @@ "fieldName" "HudDeathNotice" "visible" "1" "enabled" "1" - "wide" "640" - "tall" "480" + //"wide" "640" + //"tall" "480" + + // Below is ported from HL2:DM + "xpos" "r640" + "ypos" "12" + "wide" "628" + "tall" "468" + + "MaxDeathNotices" "4" + "LineHeight" "22" + "RightJustify" "1" // If 1, draw notices from the right + + "TextFont" "Default" } HudVehicle @@ -390,6 +402,14 @@ "enabled" "1" "wide" "640" "tall" "480" + "zpos" "1" + + "TextFont" "HudHintTextLarge" + "ItemFont" "HudHintTextSmall" + "ItemFontPulsing" "HudHintTextSmall" + "MenuColor" "FgColor" + "MenuItemColor" "FgColor" + "MenuBoxColor" "BgColor" } HudCloseCaption @@ -719,4 +739,73 @@ "wide" "f60" [$X360] "tall" "100" } + + //============================== + // + // Below is ported from HL2:DM + // + //============================== + TargetID + { + "fieldName" "TargetID" + "visible" "1" + "enabled" "1" + "wide" "640" + "tall" "480" + } + + TeamDisplay + { + "fieldName" "TeamDisplay" + "visible" "0" + "enabled" "1" + "xpos" "16" + "ypos" "415" + "wide" "200" + "tall" "60" + "text_xpos" "8" + "text_ypos" "4" + } + + HudVoiceSelfStatus + { + "fieldName" "HudVoiceSelfStatus" + "visible" "1" + "enabled" "1" + "xpos" "r43" + "ypos" "355" + "wide" "24" + "tall" "24" + } + + HudVoiceStatus + { + "fieldName" "HudVoiceStatus" + "visible" "1" + "enabled" "1" + "xpos" "r145" + "ypos" "0" + "wide" "145" + "tall" "400" + + "item_wide" "135" + + "show_avatar" "0" + + "show_dead_icon" "1" + "dead_xpos" "1" + "dead_ypos" "0" + "dead_wide" "16" + "dead_tall" "16" + + "show_voice_icon" "1" + "icon_ypos" "0" + "icon_xpos" "15" + "icon_tall" "16" + "icon_wide" "16" + + "text_xpos" "33" + } + //============================== + //============================== } \ No newline at end of file diff --git a/VPKs/hl2_mapbase_content/resource/ClientScheme.res b/VPKs/hl2_mapbase_content/resource/ClientScheme.res index 8de7918..8282972 100644 --- a/VPKs/hl2_mapbase_content/resource/ClientScheme.res +++ b/VPKs/hl2_mapbase_content/resource/ClientScheme.res @@ -69,6 +69,13 @@ Scheme // Blank space to leave beneath the menu on the main screen "Main.BottomBorder" "32" + + // ============================================================ + // Mapbase adds these to integrate the TF2-style number menu + // ============================================================ + "MenuColor" "255 220 0 100" + "MenuItemColor" "255 220 0 100" + "MenuBoxColor" "255 220 0 100" } //////////////////////// BITMAP FONT FILES ///////////////////////////// diff --git a/VPKs/hl2_mapbase_content/scripts/hudanimations.txt b/VPKs/hl2_mapbase_content/scripts/hudanimations.txt index 0ae1625..fbd5598 100644 --- a/VPKs/hl2_mapbase_content/scripts/hudanimations.txt +++ b/VPKs/hl2_mapbase_content/scripts/hudanimations.txt @@ -878,3 +878,90 @@ event HideVoteBackgrounds Animate LabelOption5 Alpha 255 Linear 0.0 0.001 } +//====================================================== +// +// Below is ported from or based on TF2 and HL2:DM +// +//====================================================== + +// Number menu +event MenuOpen +{ + StopEvent MenuClose 0.0 + + // fade in + Animate HudMenu Alpha "255" Linear 0.0 0.1 + Animate HudMenu SelectionAlpha "255" Linear 0.0 0.1 + Animate HudMenu FgColor "FgColor" Linear 0.0 0.1 + Animate HudMenu MenuColor "MenuColor" Linear 0.0 0.1 + Animate HudMenu MenuItemColor "MenuItemColor" Linear 0.0 0.1 + Animate HudMenu TextScan "1" Linear 0.0 0.1 + + // Undo any blur + Animate HudMenu Blur "1" Linear 0.0 0.01 +} + +// Alternate event to draw attention to menu, similar to HUD hint +event MenuOpenFlash +{ + StopEvent MenuClose 0.0 + + // fade in + Animate HudMenu Alpha "255" Linear 0.0 0.3 + Animate HudMenu SelectionAlpha "255" Linear 0.0 0.3 + Animate HudMenu FgColor "FgColor" Linear 0.0 0.3 + Animate HudMenu MenuColor "MenuColor" Linear 0.0 0.3 + Animate HudMenu MenuItemColor "MenuItemColor" Linear 0.0 0.3 + Animate HudMenu TextScan "1" Linear 0.0 0.3 + + // flash text + Animate HudMenu MenuItemColor "255 220 0 255" Linear 1.0 0.2 + Animate HudMenu MenuItemColor "MenuItemColor" Linear 1.2 0.2 + Animate HudMenu MenuItemColor "255 220 0 255" Linear 2.0 0.2 + Animate HudMenu MenuItemColor "MenuItemColor" Linear 2.2 0.2 + Animate HudMenu MenuColor "255 220 0 255" Linear 1.0 0.2 + Animate HudMenu MenuColor "MenuColor" Linear 1.2 0.2 + Animate HudMenu MenuColor "255 220 0 255" Linear 2.0 0.2 + Animate HudMenu MenuColor "MenuColor" Linear 2.2 0.2 + + // Undo any blur + Animate HudMenu Blur "1" Linear 0.0 0.01 +} + +event MenuClose +{ + // Hide it + Animate HudMenu Alpha "0" Linear 0.0 1 + Animate HudMenu SelectionAlpha "0" Linear 0.0 1 + Animate HudMenu FgColor "0 0 0 0" Linear 0.0 1 + Animate HudMenu MenuColor "0 0 0 0" Linear 0.0 1 + Animate HudMenu MenuItemColor "0 0 0 0" Linear 0.0 1 +} + +event MenuPulse +{ + Animate HudMenu Blur "7" Linear 0.0 0.1 + Animate HudMenu Blur "2" Deaccel 0.1 0.1 + Animate HudMenu Blur "7" Linear 0.2 0.1 + Animate HudMenu Blur "2" Deaccel 0.3 0.1 + Animate HudMenu Blur "7" Linear 0.4 0.1 + Animate HudMenu Blur "2" Deaccel 0.5 0.1 + Animate HudMenu Blur "1" Deaccel 0.6 0.4 +} + +// HL2:DM team +event FadeOutTeamLine +{ + // make the display visible + Animate TeamDisplay Alpha "0" Linear 0.0 0.25 +} + +event FadeInTeamLine +{ + // make the display visible + Animate TeamDisplay Alpha "255" Linear 0.0 0.5 +} + +//====================================================== +//====================================================== + diff --git a/VPKs/hl2mp_mapbase_content/resource/clientscheme.res b/VPKs/hl2mp_mapbase_content/resource/clientscheme.res index 04e01a0..f154eac 100644 --- a/VPKs/hl2mp_mapbase_content/resource/clientscheme.res +++ b/VPKs/hl2mp_mapbase_content/resource/clientscheme.res @@ -270,6 +270,13 @@ Scheme // Blank space to leave beneath the menu on the main screen "Main.BottomBorder" "32" + + // ============================================================ + // Mapbase adds these to integrate the TF2-style number menu + // ============================================================ + "MenuColor" "255 220 0 100" + "MenuItemColor" "255 220 0 100" + "MenuBoxColor" "255 220 0 100" } //////////////////////// FONTS /////////////////////////////