-
Notifications
You must be signed in to change notification settings - Fork 964
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract PlayerInformationThroughWalls panels style parameters as cons…
…tants
- Loading branch information
1 parent
0529f3e
commit 8d4d80a
Showing
10 changed files
with
350 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...ures/Visuals/PlayerInformationThroughWalls/ActiveWeaponAmmo/ActiveWeaponAmmoPanelParams.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Panorama.h> | ||
#include <CS2/Constants/ColorConstants.h> | ||
#include <FeatureHelpers/PanelShadowParams.h> | ||
|
||
namespace active_weapon_ammo_panel_params::container_panel_params | ||
{ | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentCenter; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentTop; | ||
static constexpr auto kMarginLeft = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginTop = cs2::CUILength::pixels(3); | ||
static constexpr auto kMarginRight = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginBottom = cs2::CUILength::pixels(0); | ||
static constexpr auto kChildrenFlow = cs2::k_EFlowRight; | ||
} | ||
|
||
namespace active_weapon_ammo_panel_params::ammo_text_panel_params | ||
{ | ||
static constexpr auto kFontFamily = "Stratum2, 'Arial Unicode MS'"; | ||
static constexpr auto kFontSize = 24.0f; | ||
static constexpr auto kFontWeight = cs2::k_EFontWeightBlack; | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentUnset; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentCenter; | ||
static constexpr auto kShadowParams = PanelShadowParams{ | ||
.horizontalOffset{cs2::CUILength::pixels(0)}, | ||
.verticalOffset{cs2::CUILength::pixels(0)}, | ||
.blurRadius{cs2::CUILength::pixels(3)}, | ||
.strength = 3, | ||
.color{cs2::kColorBlack} | ||
}; | ||
static constexpr auto kColor = cs2::kColorWhite; | ||
} | ||
|
||
namespace active_weapon_ammo_panel_params::ammo_icon_panel_params | ||
{ | ||
static constexpr auto kImageUrl = "s2r://panorama/images/hud/bullet_single.vsvg"; | ||
static constexpr auto kTextureHeight = 20; | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentUnset; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentCenter; | ||
static constexpr auto kMarginLeft = cs2::CUILength::pixels(5); | ||
static constexpr auto kMarginTop = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginRight = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginBottom = cs2::CUILength::pixels(0); | ||
static constexpr auto kShadowParams = PanelShadowParams{ | ||
.horizontalOffset{cs2::CUILength::pixels(0)}, | ||
.verticalOffset{cs2::CUILength::pixels(0)}, | ||
.blurRadius{cs2::CUILength::pixels(3)}, | ||
.strength = 3, | ||
.color{cs2::kColorBlack} | ||
}; | ||
} |
21 changes: 21 additions & 0 deletions
21
...ures/Visuals/PlayerInformationThroughWalls/ActiveWeaponIcon/ActiveWeaponIconPanelParams.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Panorama.h> | ||
#include <FeatureHelpers/PanelShadowParams.h> | ||
|
||
namespace active_weapon_icon_panel_params | ||
{ | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentCenter; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentTop; | ||
static constexpr auto kMarginLeft = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginTop = cs2::CUILength::pixels(3); | ||
static constexpr auto kMarginRight = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginBottom = cs2::CUILength::pixels(0); | ||
static constexpr auto kShadowParams = PanelShadowParams{ | ||
.horizontalOffset{cs2::CUILength::pixels(0)}, | ||
.verticalOffset{cs2::CUILength::pixels(0)}, | ||
.blurRadius{cs2::CUILength::pixels(3)}, | ||
.strength = 3, | ||
.color{cs2::kColorBlack} | ||
}; | ||
} |
50 changes: 50 additions & 0 deletions
50
Source/Features/Visuals/PlayerInformationThroughWalls/PlayerHealth/PlayerHealthPanelParams.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Panorama.h> | ||
#include <FeatureHelpers/PanelShadowParams.h> | ||
|
||
namespace player_health_panel_params::container_panel_params | ||
{ | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentCenter; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentTop; | ||
static constexpr auto kMarginLeft = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginTop = cs2::CUILength::pixels(1); | ||
static constexpr auto kMarginRight = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginBottom = cs2::CUILength::pixels(0); | ||
static constexpr auto kChildrenFlow = cs2::k_EFlowRight; | ||
} | ||
|
||
namespace player_health_panel_params::health_icon_panel_params | ||
{ | ||
static constexpr auto kImageUrl = "s2r://panorama/images/hud/health_cross.vsvg"; | ||
static constexpr auto kTextureHeight = 24; | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentUnset; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentCenter; | ||
static constexpr auto kMarginLeft = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginTop = cs2::CUILength::pixels(0); | ||
static constexpr auto kMarginRight = cs2::CUILength::pixels(5); | ||
static constexpr auto kMarginBottom = cs2::CUILength::pixels(0); | ||
static constexpr auto kShadowParams = PanelShadowParams{ | ||
.horizontalOffset{cs2::CUILength::pixels(0)}, | ||
.verticalOffset{cs2::CUILength::pixels(0)}, | ||
.blurRadius{cs2::CUILength::pixels(3)}, | ||
.strength = 3, | ||
.color{cs2::kColorBlack} | ||
}; | ||
} | ||
|
||
namespace player_health_panel_params::health_text_panel_params | ||
{ | ||
static constexpr auto kFontFamily = "Stratum2, 'Arial Unicode MS'"; | ||
static constexpr auto kFontSize = 24.0f; | ||
static constexpr auto kFontWeight = cs2::k_EFontWeightBlack; | ||
static constexpr auto kHorizontalAlignment = cs2::k_EHorizontalAlignmentUnset; | ||
static constexpr auto kVerticalAlignment = cs2::k_EVerticalAlignmentCenter; | ||
static constexpr auto kShadowParams = PanelShadowParams{ | ||
.horizontalOffset{cs2::CUILength::pixels(0)}, | ||
.verticalOffset{cs2::CUILength::pixels(0)}, | ||
.blurRadius{cs2::CUILength::pixels(3)}, | ||
.strength = 3, | ||
.color{cs2::kColorBlack} | ||
}; | ||
} |
14 changes: 14 additions & 0 deletions
14
Source/Features/Visuals/PlayerInformationThroughWalls/PlayerInfoContainerPanelParams.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <CS2/Classes/Panorama.h> | ||
|
||
namespace player_info_container_panel_params | ||
{ | ||
static constexpr auto kWidth = cs2::CUILength::pixels(256); | ||
static constexpr auto kHeight = cs2::CUILength::pixels(256); | ||
static constexpr auto kPositionX = cs2::CUILength::pixels(-kWidth.m_flValue * 0.5f); | ||
static constexpr auto kPositionY = cs2::CUILength::pixels(0.0f); | ||
static constexpr auto kTransformOriginX = cs2::CUILength::percent(50); | ||
static constexpr auto kTransformOriginY = cs2::CUILength::percent(0); | ||
static constexpr auto kChildrenFlow = cs2::k_EFlowDown; | ||
} |
Oops, something went wrong.