summaryrefslogtreecommitdiff
path: root/utils/hlfaceposer/mxexpressiontab.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 /utils/hlfaceposer/mxexpressiontab.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/hlfaceposer/mxexpressiontab.cpp')
-rw-r--r--utils/hlfaceposer/mxexpressiontab.cpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/utils/hlfaceposer/mxexpressiontab.cpp b/utils/hlfaceposer/mxexpressiontab.cpp
new file mode 100644
index 0000000..21efec0
--- /dev/null
+++ b/utils/hlfaceposer/mxexpressiontab.cpp
@@ -0,0 +1,62 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#include "hlfaceposer.h"
+#include "mxExpressionTab.h"
+#include "mdlviewer.h"
+#include "expressions.h"
+
+mxExpressionTab *g_pExpressionClass = 0;
+
+//-----------------------------------------------------------------------------
+// Purpose: Right click context menu
+// Input : mx -
+// my -
+//-----------------------------------------------------------------------------
+void mxExpressionTab::ShowRightClickMenu( int mx, int my )
+{
+ if ( !g_MDLViewer )
+ return;
+
+ mxPopupMenu *pop = new mxPopupMenu();
+ Assert( pop );
+
+ pop->add( "New...", IDC_EXPRESSIONS_NEW );
+ pop->addSeparator ();
+ pop->add( "Load...", IDC_EXPRESSIONS_LOAD );
+ pop->add( "Save", IDC_EXPRESSIONS_SAVE );
+ pop->addSeparator ();
+ pop->add( "Export to VFE", IDC_EXPRESSIONS_EXPORT );
+ pop->addSeparator ();
+ if ( m_nSelected != -1 )
+ {
+ pop->add( "Close class", IDC_EXPRESSIONS_CLOSE );
+ }
+ pop->add( "Close all classes", IDC_EXPRESSIONS_CLOSEALL );
+ pop->addSeparator();
+ pop->add( "Recreate all bitmaps", IDC_EXPRESSIONS_REDOBITMAPS );
+
+ // Convert click position
+ POINT pt;
+ pt.x = mx;
+ pt.y = my;
+ ClientToScreen( (HWND)getHandle(), &pt );
+ ScreenToClient( (HWND)g_MDLViewer->getHandle(), &pt );
+
+ // Convert coordinate space
+ pop->popup( g_MDLViewer, pt.x, pt.y );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Output : int
+//-----------------------------------------------------------------------------
+int mxExpressionTab::getSelectedIndex () const
+{
+ // Convert based on override index
+ return m_nSelected;
+}