From 94f446eff9dfa0dcd3b4c6c2b78fb22507725674 Mon Sep 17 00:00:00 2001 From: CriticalFlaw Date: Wed, 30 Mar 2022 22:56:20 -0400 Subject: [PATCH] Fixed #40 - Updated the health display on the tournament spectator and killer freeze panel to use the new health style. --- resource/ui/freezepanel_basic.res | 468 +++++++++++++++++++ resource/ui/freezepanelkillerhealth.res | 1 + resource/ui/spectatortournament.res | 16 +- resource/ui/spectatortournamentguihealth.res | 57 +-- 4 files changed, 508 insertions(+), 34 deletions(-) create mode 100644 resource/ui/freezepanel_basic.res create mode 100644 resource/ui/freezepanelkillerhealth.res diff --git a/resource/ui/freezepanel_basic.res b/resource/ui/freezepanel_basic.res new file mode 100644 index 00000000..566c8d13 --- /dev/null +++ b/resource/ui/freezepanel_basic.res @@ -0,0 +1,468 @@ +"Resource/UI/FreezePanel_Basic.res" +{ + "FreezePanel" + { + "ControlName" "CTFFreezePanel" + "fieldName" "FreezePanel" + + "screenshot_move_panel_to_corner" "1" + } + + "FreezePanelBase" [$X360] + { + "ControlName" "EditablePanel" + "fieldName" "FreezePanelBase" + "xpos" "0" + "ypos" "0" + "wide" "640" + "tall" "480" + "visible" "1" + + "NemesisSubPanel" + { + "ControlName" "EditablePanel" + "fieldName" "NemesisSubPanel" + "xpos" "c46" + "xpos_hidef" "c109" + "ypos" "223" + "ypos_hidef" "223" + "ypos_lodef" "193" + "zpos" "4" + "wide" "166" + "tall" "38" + "visible" "1" + + "NemesisPanelBG" + { + "ControlName" "ImagePanel" + "fieldName" "NemesisPanelBG" + "xpos" "0" + "ypos" "0" + "zpos" "5" + "wide" "166" + "tall" "38" + "visible" "1" + "enabled" "1" + "image" "../hud/freezecam_black_bg" + "scaleImage" "1" + } + "NemesisIcon" + { + "ControlName" "ImagePanel" + "fieldName" "NemesisIcon" + "xpos" "5" + "ypos" "-1" + "zpos" "6" + "wide" "36" + "tall" "36" + "visible" "1" + "enabled" "1" + "image" "../hud/leaderboard_nemesis_freezecam" + "scaleImage" "1" + } + "NemesisLabel" + { + "ControlName" "Label" + "fieldName" "NemesisLabel" + "font" "HudFontMediumSmall" + "xpos" "44" + "ypos" "10" + "ypos_hidef" "11" + "ypos_lodef" "13" + "zpos" "6" + "wide" "112" + "tall" "18" + "tall_hidef" "24" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "%nemesisname%" + "textAlignment" "west" + } + } + "FreezePanelBG" + { + "ControlName" "CTFImagePanel" + "fieldName" "FreezePanelBG" + "xpos" "c-38" + "xpos_hidef" "c25" + "ypos" "245" + "ypos_hidef" "245" + "ypos_lodef" "215" + "zpos" "0" + "wide" "266" + "tall" "48" + "visible" "1" + "enabled" "1" + "image" "../hud/color_panel_blu" + "scaleImage" "1" + } + + "FreezeLabel" + { + "ControlName" "Label" + "fieldName" "FreezeLabel" + "font" "DefaultSmall" + "xpos" "c2" + "xpos_hidef" "c65" + "ypos" "255" + "ypos_hidef" "256" + "ypos_lodef" "225" + "zpos" "1" + "wide" "252" + "tall" "9" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#FreezePanel_Killer" + "textAlignment" "Left" + "dulltext" "0" + "brighttext" "0" + } + + "FreezeLabelKiller" + { + "ControlName" "Label" + "fieldName" "FreezeLabelKiller" + "font" "HudFontSmall" + "xpos" "c6" // No avatar image on X360 + "xpos_hidef" "c69" + "ypos" "266" + "ypos_hidef" "266" + "ypos_lodef" "236" + "zpos" "1" + "wide" "252" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "%killername%" + "textAlignment" "Left" + } + + "FreezePanelHealth" + { + "ControlName" "EditablePanel" + "fieldName" "FreezePanelHealth" + "xpos" "c-30" + "xpos_hidef" "c35" + "ypos" "253" + "ypos_hidef" "253" + "ypos_lodef" "223" + "zpos" "1" + "wide" "45" + "tall" "31" + "visible" "1" + "enabled" "1" + "HealthBonusPosAdj" "9" + "HealthDeathWarning" "0.49" + "TFFont" "HudFontSmall" + "HealthDeathWarningColor" "HUDDeathWarning" + "TextColor" "HudOffWhite" + } + } + + "itempanel" + { + "ControlName" "CItemModelPanel" + "fieldName" "itempanel" + "xpos" "r200" + "ypos" "0" + "zpos" "10" + "wide" "190" + "tall" "100" + "visible" "0" + "bgcolor_override" "255 255 255 0" + "PaintBackgroundType" "0" + + "model_ypos" "10" + "model_center_x" "1" + "model_wide" "90" + "model_tall" "60" + + "text_xpos" "10" + "text_ypos" "10" + "text_wide" "170" + "text_center" "1" + + "max_text_height" "100" + "padding_height" "10" + "resize_to_text" "1" + "text_forcesize" "2" + + "itemmodelpanel" + { + "fieldName" "itemmodelpanel" + "use_item_rendertarget" "0" + "useparentbg" "1" + } + + "ItemLabel" + { + "ControlName" "Label" + "fieldName" "ItemLabel" + "font" "DefaultSmall" + "xpos" "10" + "ypos" "3" + "zpos" "1" + "wide" "270" + "tall" "9" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#FreezePanel_Item" + "textAlignment" "Left" + "dulltext" "0" + "brighttext" "0" + } + } + + "FreezePanelBase" [$WIN32] + { + "ControlName" "EditablePanel" + "fieldName" "FreezePanelBase" + "xpos" "r270" + "ypos" "93" + "wide" "267" + "tall" "200" + "visible" "1" + + "FreezePanelBG" + { + "ControlName" "CTFImagePanel" + "fieldName" "FreezePanelBG" + "xpos" "8" + "ypos" "160" + "zpos" "0" + "wide" "256" + "tall" "33" + "visible" "1" + "enabled" "1" + "image" "../hud/color_panel_blu" + "scaleImage" "1" + + "src_corner_height" "23" // pixels inside the image + "src_corner_width" "23" + + "draw_corner_width" "5" // screen size of the corners ( and sides ), proportional + "draw_corner_height" "5" + } + + "FreezeLabel" + { + "ControlName" "Label" + "fieldName" "FreezeLabel" + "font" "DefaultSmall" + "xpos" "50" + "ypos" "165" + "zpos" "1" + "wide" "240" + "tall" "12" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "#FreezePanel_Killer" + "textAlignment" "North-West" + "dulltext" "0" + "brighttext" "0" + } + + "FreezePanelHealth" [$WIN32] + { + "ControlName" "CTFFreezePanelHealth" + "fieldName" "FreezePanelHealth" + "xpos" "8" + "ypos" "160" + "zpos" "1" + "wide" "45" + "tall" "31" + "visible" "1" + "enabled" "1" + "HealthBonusPosAdj" "9" + "HealthDeathWarning" "0.49" + "TFFont" "HudFontSmall" + "HealthDeathWarningColor" "HUDDeathWarning" + "TextColor" "HudOffWhite" + } + + "FreezeLabelKiller" + { + "ControlName" "Label" + "fieldName" "FreezeLabelKiller" + "font" "HudFontSmall" + "xpos" "61" + "ypos" "173" + "zpos" "5" + "wide" "252" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "%killername%" + "textAlignment" "Left" + } + + "AvatarImage" + { + "ControlName" "CAvatarImagePanel" + "fieldName" "AvatarImage" + "xpos" "49" + "ypos" "174" + "zpos" "0" + "wide" "14" + "tall" "14" + "visible" "1" + "enabled" "1" + "image" "" + "scaleImage" "1" + "color_outline" "52 48 45 255" + } + + "NemesisSubPanel" + { + "ControlName" "EditablePanel" + "fieldName" "NemesisSubPanel" + "xpos" "0" // FIXME + "ypos" "130" + "zpos" "4" + "wide" "306" + "tall" "38" + "visible" "1" + + "NemesisPanelBG" + { + "ControlName" "ScalableImagePanel" + "fieldName" "NemesisPanelBG" + "xpos" "95" + "ypos" "4" + "zpos" "5" + "wide" "161" + "tall" "30" + "visible" "1" + "enabled" "1" + "image" "../hud/color_panel_brown" + "scaleImage" "1" + + "src_corner_height" "23" // pixels inside the image + "src_corner_width" "23" + + "draw_corner_width" "6" // screen size of the corners ( and sides ), proportional + "draw_corner_height" "6" + } + "NemesisIcon" + { + "ControlName" "ImagePanel" + "fieldName" "NemesisIcon" + "xpos" "95" + "ypos" "-1" + "zpos" "6" + "wide" "36" + "tall" "36" + "visible" "1" + "enabled" "1" + "image" "../hud/leaderboard_nemesis_freezecam" + "scaleImage" "1" + } + "NemesisLabel" + { + "ControlName" "Label" + "fieldName" "NemesisLabel" + "font" "HudFontMediumSmall" + "xpos" "134" + "ypos" "10" + "zpos" "6" + "wide" "112" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "%nemesisname%" + "textAlignment" "west" + } + "NemesisLabel2" + { + "ControlName" "Label" + "fieldName" "NemesisLabel2" + "font" "DefaultSmall" + "xpos" "134" + "ypos" "10" + "zpos" "6" + "wide" "112" + "tall" "18" + "autoResize" "0" + "pinCorner" "0" + "visible" "0" + "enabled" "1" + "labelText" "%nemesisadvice%" + "textAlignment" "west" + } + } + } + + "ScreenshotPanel" + { + "ControlName" "EditablePanel" + "fieldName" "ScreenshotPanel" + "xpos" "c-83" + "ypos" "50" + "zpos" "2" + "wide" "166" + "tall" "40" + "visible" "0" + + "ScreenshotPanelBG" + { + "ControlName" "ImagePanel" + "fieldName" "ScreenshotPanelBG" + "xpos" "0" + "ypos" "8" + "zpos" "0" + "wide" "166" + "tall" "38" + "visible" "1" + "enabled" "1" + "image" "../hud/freezecam_black_bg" + "scaleImage" "1" + } + "ScreenshotIcon" + { + "ControlName" "ImagePanel" + "fieldName" "ScreenshotIcon" + "xpos" "3" + "ypos" "0" + "zpos" "1" + "wide" "36" + "tall" "36" + "visible" "1" + "enabled" "1" + "image" "../hud/ico_camera" + "scaleImage" "1" + } + "ScreenshotLabel" + { + "ControlName" "Label" + "fieldName" "ScreenshotLabel" + "font" "SpectatorKeyHints" + "xpos" "40" + "ypos" "25" + "zpos" "2" + "wide" "133" + "tall" "12" + "autoResize" "0" + "pinCorner" "0" + "visible" "1" + "enabled" "1" + "labelText" "%text%" + "textAlignment" "west" + "dulltext" "0" + "brighttext" "0" + } + } +} \ No newline at end of file diff --git a/resource/ui/freezepanelkillerhealth.res b/resource/ui/freezepanelkillerhealth.res new file mode 100644 index 00000000..a6606dea --- /dev/null +++ b/resource/ui/freezepanelkillerhealth.res @@ -0,0 +1 @@ +#base "SpectatorTournamentGUIHealth.res" \ No newline at end of file diff --git a/resource/ui/spectatortournament.res b/resource/ui/spectatortournament.res index 4cfa4078..86ba9109 100644 --- a/resource/ui/spectatortournament.res +++ b/resource/ui/spectatortournament.res @@ -14,7 +14,7 @@ "team1_player_base_y" "35" "team1_player_delta_x" "0" "team1_player_delta_y" "33" - "team2_player_base_offset_x" "-378" + "team2_player_base_offset_x" "-368" "team2_player_base_y" "35" "team2_player_delta_x" "0" "team2_player_delta_y" "33" @@ -22,7 +22,7 @@ "playerpanels_kv" { "visible" "0" - "wide" "50" + "wide" "60" "tall" "33" "zpos" "1" @@ -37,7 +37,7 @@ "xpos" "5" "ypos" "24" "zpos" "5" - "wide" "40" + "wide" "35" "tall" "8" "autoResize" "0" "pinCorner" "0" @@ -60,7 +60,7 @@ { "ControlName" "CTFClassImage" "fieldName" "classimage" - "xpos" "2" + "xpos" "3" "ypos" "2" "zpos" "2" "wide" "22" @@ -107,7 +107,7 @@ "xpos" "20" "ypos" "-3" "zpos" "3" - "wide" "32" + "wide" "42" "tall" "32" "visible" "1" "enabled" "1" @@ -195,8 +195,8 @@ "ControlName" "CExLabel" "fieldName" "chargeamount" "font" "DefaultSmall" - "xpos" "25" - "ypos" "17" + "xpos" "33" + "ypos" "20" "zpos" "6" "wide" "25" "tall" "15" @@ -204,7 +204,7 @@ "pinCorner" "0" "visible" "1" "labelText" "%chargeamount%" - "textAlignment" "north" + "textAlignment" "east" "fgcolor" "0 255 0 255" } diff --git a/resource/ui/spectatortournamentguihealth.res b/resource/ui/spectatortournamentguihealth.res index f0f57781..6899733a 100644 --- a/resource/ui/spectatortournamentguihealth.res +++ b/resource/ui/spectatortournamentguihealth.res @@ -9,23 +9,17 @@ "zpos" "4" "wide" "20" "tall" "20" - "visible" "1" - "enabled" "1" + "visible" "0" + "enabled" "0" "scaleImage" "1" } "PlayerStatusHealthImageBG" { "ControlName" "ImagePanel" "fieldName" "PlayerStatusHealthImageBG" - "xpos" "4" - "ypos" "4" - "zpos" "3" - "wide" "24" - "tall" "24" - "visible" "1" - "enabled" "1" - "image" "../hud/health_bg" - "scaleImage" "1" + "xpos" "9999" + "wide" "0" + "tall" "0" } "BuildingStatusHealthImageBG" { @@ -45,30 +39,41 @@ { "ControlName" "ImagePanel" "fieldName" "PlayerStatusHealthBonusImage" - "xpos" "4" - "ypos" "4" - "zpos" "3" - "wide" "24" - "tall" "24" - "visible" "0" - "enabled" "1" - "image" "../hud/health_over_bg" - "scaleImage" "1" + "xpos" "9999" + "wide" "0" + "tall" "0" } "PlayerStatusHealthValue" { "ControlName" "CExLabel" "fieldName" "PlayerStatusHealthValue" - "xpos" "6" - "ypos" "11" + "xpos" "5" + "ypos" "0" + "zpos" "6" + "wide" "32" + "tall" "32" + "visible" "1" + "enabled" "1" + "labelText" "%Health%" + "textAlignment" "center" + "font" "HudFontMediumSmallBold" + "fgcolor" "TanLight" + } + "PlayerStatusHealthValueShadow" + { + "ControlName" "CExLabel" + "fieldName" "PlayerStatusHealthValueShadow" + "xpos" "-2" + "ypos" "-2" "zpos" "5" - "wide" "20" - "tall" "10" + "wide" "32" + "tall" "32" "visible" "1" "enabled" "1" "labelText" "%Health%" "textAlignment" "center" - "font" "SpectatorVerySmall" - "fgcolor" "TanDark" + "font" "HudFontMediumSmallBold" + "fgcolor" "Black" + "pin_to_sibling" "PlayerStatusHealthValue" } } \ No newline at end of file