aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/hud_controlpointicons.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-07-17 18:26:59 -0700
committerJoe Ludwig <[email protected]>2013-07-17 18:26:59 -0700
commite16ea21dc8a710237ade8413207f58d403c616a3 (patch)
tree85dcfbda9881e4e022dedafefbc2727e2fd2aa59 /mp/src/game/client/hud_controlpointicons.cpp
parentMerge pull request #36 from AnAkIn1/fogplayerparams_fix (diff)
downloadsource-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.tar.xz
source-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.zip
* Added support for building shaders in your mod
* Added nav mesh support * fixed many warnings and misc bugs * Fixed the create*projects scripts in mp * Added a bunch of stuff to .gitignore
Diffstat (limited to 'mp/src/game/client/hud_controlpointicons.cpp')
-rw-r--r--mp/src/game/client/hud_controlpointicons.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/mp/src/game/client/hud_controlpointicons.cpp b/mp/src/game/client/hud_controlpointicons.cpp
index 20d6150b..a8c390ae 100644
--- a/mp/src/game/client/hud_controlpointicons.cpp
+++ b/mp/src/game/client/hud_controlpointicons.cpp
@@ -1107,7 +1107,23 @@ void CHudControlPointIcons::PerformLayout( void )
}
// Setup the main panel
- SetBounds( (ScreenWidth() - iWidest) * 0.5, ScreenHeight() - iTall - m_nHeightOffset, iWidest, iTall );
+ float flPositionX = (ScreenWidth() - iWidest) * 0.5;
+ float flPositionY = ScreenHeight() - iTall - m_nHeightOffset;
+ if ( ObjectiveResource() )
+ {
+ float flCustomPositionX = -1.f;
+ float flCustomPositionY = -1.f;
+ ObjectiveResource()->GetCapLayoutCustomPosition( flCustomPositionX, flCustomPositionY );
+ if ( flCustomPositionX != -1.f )
+ {
+ flPositionX = flCustomPositionX * ScreenWidth();
+ }
+ if ( flCustomPositionY != -1.f )
+ {
+ flPositionY = flCustomPositionY * ScreenHeight();
+ }
+ }
+ SetBounds( flPositionX, flPositionY, iWidest, iTall );
// Now that we know how wide we are, and how many icons are in each line,
// we can lay the icons out, centered in the lines.