summaryrefslogtreecommitdiff
path: root/utils/hlfaceposer/actorproperties.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/actorproperties.cpp
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'utils/hlfaceposer/actorproperties.cpp')
-rw-r--r--utils/hlfaceposer/actorproperties.cpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/utils/hlfaceposer/actorproperties.cpp b/utils/hlfaceposer/actorproperties.cpp
new file mode 100644
index 0000000..dfd6248
--- /dev/null
+++ b/utils/hlfaceposer/actorproperties.cpp
@@ -0,0 +1,77 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "resource.h"
+#include "ActorProperties.h"
+#include "ChoreoView.h"
+#include "choreoactor.h"
+#include "mdlviewer.h"
+
+static CActorParams g_Params;
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : hwndDlg -
+// uMsg -
+// wParam -
+// lParam -
+// Output : static BOOL CALLBACK
+//-----------------------------------------------------------------------------
+static BOOL CALLBACK ActorPropertiesDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ // Insert code here to put the string (to find and replace with)
+ // into the edit controls.
+ // ...
+ {
+ g_Params.PositionSelf( hwndDlg );
+
+ SetDlgItemText( hwndDlg, IDC_ACTORNAME, g_Params.m_szName );
+
+ SetWindowText( hwndDlg, g_Params.m_szDialogTitle );
+
+ SetFocus( GetDlgItem( hwndDlg, IDC_ACTORNAME ) );
+ }
+ return FALSE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDOK:
+ g_Params.m_szName[ 0 ] = 0;
+ GetDlgItemText( hwndDlg, IDC_ACTORNAME, g_Params.m_szName, 256 );
+ EndDialog( hwndDlg, 1 );
+ break;
+ case IDCANCEL:
+ EndDialog( hwndDlg, 0 );
+ break;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : *view -
+// *actor -
+// Output : int
+//-----------------------------------------------------------------------------
+int ActorProperties( CActorParams *params )
+{
+ g_Params = *params;
+
+ int retval = DialogBox( (HINSTANCE)GetModuleHandle( 0 ),
+ MAKEINTRESOURCE( IDD_ACTORPROPERTIES ),
+ (HWND)g_MDLViewer->getHandle(),
+ (DLGPROC)ActorPropertiesDialogProc );
+
+ *params = g_Params;
+
+ return retval;
+} \ No newline at end of file