summaryrefslogtreecommitdiff
path: root/game/client/replay/vgui/replaybrowserbasepanel.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/replay/vgui/replaybrowserbasepanel.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/replay/vgui/replaybrowserbasepanel.cpp')
-rw-r--r--game/client/replay/vgui/replaybrowserbasepanel.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/game/client/replay/vgui/replaybrowserbasepanel.cpp b/game/client/replay/vgui/replaybrowserbasepanel.cpp
new file mode 100644
index 0000000..8358a24
--- /dev/null
+++ b/game/client/replay/vgui/replaybrowserbasepanel.cpp
@@ -0,0 +1,39 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+//=======================================================================================//
+
+#include "cbase.h"
+
+#if defined( REPLAY_ENABLED )
+
+#include "replaybrowserbasepanel.h"
+
+//-----------------------------------------------------------------------------
+
+using namespace vgui;
+
+//-----------------------------------------------------------------------------
+
+CReplayBasePanel::CReplayBasePanel( Panel *pParent, const char *pName )
+: BaseClass( pParent, pName )
+{
+}
+
+void CReplayBasePanel::GetPosRelativeToAncestor( Panel *pAncestor, int &nXOut, int &nYOut )
+{
+ nXOut = nYOut = 0;
+
+ Panel *pCurrent = this;
+ while ( pCurrent && pCurrent != pAncestor )
+ {
+ int x,y;
+ pCurrent->GetPos( x, y );
+ nXOut += x;
+ nYOut += y;
+ pCurrent = pCurrent->GetParent();
+ }
+
+ Assert( pAncestor == pCurrent );
+}
+
+#endif \ No newline at end of file