|
|
@ -66,9 +66,59 @@ enum |
|
|
|
|
|
|
|
|
|
|
|
#define kDefaultLinkInAnimName "LinkOut" |
|
|
|
#define kDefaultLinkInAnimName "LinkOut" |
|
|
|
|
|
|
|
|
|
|
|
class plResponderLinkProc; |
|
|
|
class plResponderLinkProc : public ParamMap2UserDlgProc |
|
|
|
extern plResponderLinkProc gResponderLinkProc; |
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
void ILoadLinkingRulesCombo(HWND hWnd, IParamBlock2* pb); |
|
|
|
|
|
|
|
void ILoadAgeFilenamesCombo(HWND hWnd, IParamBlock2 *pb); |
|
|
|
|
|
|
|
void ILoadParentAgeFilenamesCombo(HWND hWnd, IParamBlock2 *pb); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
virtual BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
ILoadLinkingRulesCombo(hWnd, pm->GetParamBlock()); |
|
|
|
|
|
|
|
ILoadAgeFilenamesCombo(hWnd, pm->GetParamBlock()); |
|
|
|
|
|
|
|
ILoadParentAgeFilenamesCombo(hWnd, pm->GetParamBlock()); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == CBN_SELCHANGE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int sel = ComboBox_GetCurSel((HWND)lParam); |
|
|
|
|
|
|
|
if (sel != CB_ERR) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (LOWORD(wParam) == IDC_LINKINGRULE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int data = ComboBox_GetItemData((HWND)lParam, sel); |
|
|
|
|
|
|
|
pm->GetParamBlock()->SetValue(kLinkingRule, 0, data); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (LOWORD(wParam) == IDC_LINKAGEFILENAME) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char buf[256]; |
|
|
|
|
|
|
|
SendMessage((HWND)lParam, CB_GETLBTEXT, sel, (LPARAM)buf); |
|
|
|
|
|
|
|
pm->GetParamBlock()->SetValue(kLinkAgeFilename, 0, buf); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (LOWORD(wParam) == IDC_PARENTAGEFILENAME) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char buf[256]; |
|
|
|
|
|
|
|
SendMessage((HWND)lParam, CB_GETLBTEXT, sel, (LPARAM)buf); |
|
|
|
|
|
|
|
pm->GetParamBlock()->SetValue(kLinkParentAgeFilename, 0, buf); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
virtual void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderLinkProc gResponderLinkProc; |
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderLinkBlock |
|
|
|
ParamBlockDesc2 gResponderLinkBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -200,60 +250,6 @@ plMessage *plResponderCmdLink::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, I |
|
|
|
return msg; |
|
|
|
return msg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class plResponderLinkProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
void ILoadLinkingRulesCombo(HWND hWnd, IParamBlock2* pb); |
|
|
|
|
|
|
|
void ILoadAgeFilenamesCombo(HWND hWnd, IParamBlock2 *pb); |
|
|
|
|
|
|
|
void ILoadParentAgeFilenamesCombo(HWND hWnd, IParamBlock2 *pb); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
ILoadLinkingRulesCombo(hWnd, pm->GetParamBlock()); |
|
|
|
|
|
|
|
ILoadAgeFilenamesCombo(hWnd, pm->GetParamBlock()); |
|
|
|
|
|
|
|
ILoadParentAgeFilenamesCombo(hWnd, pm->GetParamBlock()); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == CBN_SELCHANGE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int sel = ComboBox_GetCurSel((HWND)lParam); |
|
|
|
|
|
|
|
if (sel != CB_ERR) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (LOWORD(wParam) == IDC_LINKINGRULE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int data = ComboBox_GetItemData((HWND)lParam, sel); |
|
|
|
|
|
|
|
pm->GetParamBlock()->SetValue(kLinkingRule, 0, data); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (LOWORD(wParam) == IDC_LINKAGEFILENAME) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char buf[256]; |
|
|
|
|
|
|
|
SendMessage((HWND)lParam, CB_GETLBTEXT, sel, (LPARAM)buf); |
|
|
|
|
|
|
|
pm->GetParamBlock()->SetValue(kLinkAgeFilename, 0, buf); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (LOWORD(wParam) == IDC_PARENTAGEFILENAME) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char buf[256]; |
|
|
|
|
|
|
|
SendMessage((HWND)lParam, CB_GETLBTEXT, sel, (LPARAM)buf); |
|
|
|
|
|
|
|
pm->GetParamBlock()->SetValue(kLinkParentAgeFilename, 0, buf); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderLinkProc gResponderLinkProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int ComboBox_AddStringData(HWND hCombo, const char* str, int data) |
|
|
|
static int ComboBox_AddStringData(HWND hCombo, const char* str, int data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int idx = ComboBox_AddString(hCombo, str); |
|
|
|
int idx = ComboBox_AddString(hCombo, str); |
|
|
@ -369,6 +365,7 @@ void plResponderLinkProc::ILoadParentAgeFilenamesCombo(HWND hWnd, IParamBlock2 * |
|
|
|
|
|
|
|
|
|
|
|
// Needed for message creation
|
|
|
|
// Needed for message creation
|
|
|
|
#include "plModifier/plResponderModifier.h" |
|
|
|
#include "plModifier/plResponderModifier.h" |
|
|
|
|
|
|
|
#include "plResponderGetComp.h" |
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
enum
|
|
|
|
{ |
|
|
|
{ |
|
|
@ -377,8 +374,56 @@ enum |
|
|
|
kEnableResponder, |
|
|
|
kEnableResponder, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class plResponderEnableProc; |
|
|
|
class plResponderEnableProc : public ParamMap2UserDlgProc |
|
|
|
extern plResponderEnableProc gResponderEnableProc; |
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
void IUpdateButton(HWND hWnd, IParamBlock2 *pb) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
HWND hComp = GetDlgItem(hWnd, IDC_RESPONDER_BUTTON); |
|
|
|
|
|
|
|
plComponentBase *comp = plResponderGetComp::Instance().GetSavedComp(pb, kEnableNode, kEnableResponder); |
|
|
|
|
|
|
|
if (comp) |
|
|
|
|
|
|
|
SetWindowText(hComp, comp->GetINode()->GetName()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SetWindowText(hComp, "(none)"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
virtual BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IUpdateButton(hWnd, pb); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_BUTTON) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If the responder component is hosed, remove it so the plResponderGetComp won't get bogus info
|
|
|
|
|
|
|
|
if (!plResponderGetComp::Instance().GetSavedComp(pb, kEnableNode, kEnableResponder)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ReferenceTarget *empty = nil; |
|
|
|
|
|
|
|
pb->SetValue(kEnableResponder, 0, empty); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderGetComp::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(RESPONDER_CID); |
|
|
|
|
|
|
|
plResponderGetComp::Instance().GetComp(pb, kEnableNode, kEnableResponder, &cids); |
|
|
|
|
|
|
|
IUpdateButton(hWnd, pb); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
virtual void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderEnableProc gResponderEnableProc; |
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderEnableBlock |
|
|
|
ParamBlockDesc2 gResponderEnableBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -411,8 +456,6 @@ ParamBlockDesc2 *plResponderCmdEnable::GetDesc() |
|
|
|
return &gResponderEnableBlock; |
|
|
|
return &gResponderEnableBlock; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#include "plResponderGetComp.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const char *plResponderCmdEnable::GetInstanceName(IParamBlock2 *pb) |
|
|
|
const char *plResponderCmdEnable::GetInstanceName(IParamBlock2 *pb) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static char name[256]; |
|
|
|
static char name[256]; |
|
|
@ -441,57 +484,6 @@ plMessage *plResponderCmdEnable::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, |
|
|
|
return msg; |
|
|
|
return msg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class plResponderEnableProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
void IUpdateButton(HWND hWnd, IParamBlock2 *pb) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
HWND hComp = GetDlgItem(hWnd, IDC_RESPONDER_BUTTON); |
|
|
|
|
|
|
|
plComponentBase *comp = plResponderGetComp::Instance().GetSavedComp(pb, kEnableNode, kEnableResponder); |
|
|
|
|
|
|
|
if (comp) |
|
|
|
|
|
|
|
SetWindowText(hComp, comp->GetINode()->GetName()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SetWindowText(hComp, "(none)"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IUpdateButton(hWnd, pb); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_BUTTON) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If the responder component is hosed, remove it so the plResponderGetComp won't get bogus info
|
|
|
|
|
|
|
|
if (!plResponderGetComp::Instance().GetSavedComp(pb, kEnableNode, kEnableResponder)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ReferenceTarget *empty = nil; |
|
|
|
|
|
|
|
pb->SetValue(kEnableResponder, 0, empty); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderGetComp::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(RESPONDER_CID); |
|
|
|
|
|
|
|
plResponderGetComp::Instance().GetComp(pb, kEnableNode, kEnableResponder, &cids); |
|
|
|
|
|
|
|
IUpdateButton(hWnd, pb); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderEnableProc gResponderEnableProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
@ -562,14 +554,56 @@ plMessage *plResponderCmdPhysEnable::CreateMsg(plMaxNode* node, plErrorMsg *pErr |
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "plMessage/plOneShotMsg.h" |
|
|
|
|
|
|
|
#include "plOneShotComponent.h" |
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
enum
|
|
|
|
{ |
|
|
|
{ |
|
|
|
kOneShotComp, |
|
|
|
kOneShotComp, |
|
|
|
kOneShotNode, |
|
|
|
kOneShotNode, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class plResponderOneShotProc; |
|
|
|
class plResponderOneShotProc : public ParamMap2UserDlgProc |
|
|
|
extern plResponderOneShotProc gResponderOneShotProc; |
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
plResponderCompNode fCompNode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCompNode::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(ONESHOTCLASS_ID); |
|
|
|
|
|
|
|
fCompNode.Init(pb, kOneShotComp, kOneShotNode, IDC_RESPONDER_COMP, IDC_RESPONDER_NODE, &cids); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fCompNode.InitDlg(hWnd); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_COMP) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.CompButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_NODE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.NodeButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderOneShotProc gResponderOneShotProc; |
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderOneShotBlock |
|
|
|
ParamBlockDesc2 gResponderOneShotBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -607,9 +641,6 @@ const char *plResponderCmdOneShot::GetInstanceName(IParamBlock2 *pb) |
|
|
|
return name; |
|
|
|
return name; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#include "plMessage/plOneShotMsg.h" |
|
|
|
|
|
|
|
#include "plOneShotComponent.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plMessage *plResponderCmdOneShot::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) |
|
|
|
plMessage *plResponderCmdOneShot::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) |
|
|
|
{ |
|
|
|
{ |
|
|
|
plResponderCompNode compNode; |
|
|
|
plResponderCompNode compNode; |
|
|
@ -643,48 +674,6 @@ void plResponderCmdOneShot::CreateWait(plMaxNode* node, plErrorMsg* pErrMsg, IPa |
|
|
|
oneShotMsg->fCallbacks->AddCallback(waitInfo.point, waitInfo.receiver, waitInfo.callbackUser); |
|
|
|
oneShotMsg->fCallbacks->AddCallback(waitInfo.point, waitInfo.receiver, waitInfo.callbackUser); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class plResponderOneShotProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
plResponderCompNode fCompNode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCompNode::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(ONESHOTCLASS_ID); |
|
|
|
|
|
|
|
fCompNode.Init(pb, kOneShotComp, kOneShotNode, IDC_RESPONDER_COMP, IDC_RESPONDER_NODE, &cids); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fCompNode.InitDlg(hWnd); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_COMP) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.CompButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_NODE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.NodeButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderOneShotProc gResponderOneShotProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
@ -721,12 +710,47 @@ plMessage *plResponderCmdNotify::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, |
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#include "plCameraComponents.h" |
|
|
|
#include "plCameraComponents.h" |
|
|
|
|
|
|
|
#include "plPickNode.h" |
|
|
|
class plResponderActivatorEnableProc; |
|
|
|
|
|
|
|
extern plResponderActivatorEnableProc gResponderActivatorEnableProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum { kActivatorComp, kActivatorEnable }; |
|
|
|
enum { kActivatorComp, kActivatorEnable }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderActivatorEnableProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
void IUpdateButton(IParamBlock2 *pb, HWND hWnd) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
INode *node = pb->GetINode(kActivatorComp); |
|
|
|
|
|
|
|
if (node) |
|
|
|
|
|
|
|
SetDlgItemText(hWnd, IDC_RESPONDER_BUTTON, node->GetName()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SetDlgItemText(hWnd, IDC_RESPONDER_BUTTON, "(none)"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
IUpdateButton(pm->GetParamBlock(), hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_BUTTON) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (plPick::DetectorEnable(pm->GetParamBlock(), kActivatorComp, true)) |
|
|
|
|
|
|
|
IUpdateButton(pm->GetParamBlock(), hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderActivatorEnableProc gResponderActivatorEnableProc; |
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderActivatorEnableBlock |
|
|
|
ParamBlockDesc2 gResponderActivatorEnableBlock |
|
|
|
( |
|
|
|
( |
|
|
|
kResponderActivatorEnableBlk, _T("detectorEnable"), 0, NULL, P_AUTO_UI, |
|
|
|
kResponderActivatorEnableBlk, _T("detectorEnable"), 0, NULL, P_AUTO_UI, |
|
|
@ -835,19 +859,18 @@ plMessage *plResponderCmdDetectorEnable::CreateMsg(plMaxNode* node, plErrorMsg * |
|
|
|
return msg; |
|
|
|
return msg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#include "plPickNode.h" |
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderActivatorEnableProc : public ParamMap2UserDlgProc |
|
|
|
#include "plMessage/plExcludeRegionMsg.h" |
|
|
|
|
|
|
|
#include "plExcludeRegionComponent.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum { kXRegionComp, kXRegionType, kXRegionNode }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderXRegionProc : public ParamMap2UserDlgProc |
|
|
|
{ |
|
|
|
{ |
|
|
|
protected: |
|
|
|
protected: |
|
|
|
void IUpdateButton(IParamBlock2 *pb, HWND hWnd) |
|
|
|
plResponderCompNode fCompNode; |
|
|
|
{ |
|
|
|
|
|
|
|
INode *node = pb->GetINode(kActivatorComp); |
|
|
|
|
|
|
|
if (node) |
|
|
|
|
|
|
|
SetDlgItemText(hWnd, IDC_RESPONDER_BUTTON, node->GetName()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
SetDlgItemText(hWnd, IDC_RESPONDER_BUTTON, "(none)"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
@ -855,14 +878,25 @@ public: |
|
|
|
switch (msg) |
|
|
|
switch (msg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case WM_INITDIALOG: |
|
|
|
case WM_INITDIALOG: |
|
|
|
IUpdateButton(pm->GetParamBlock(), hWnd); |
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCompNode::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(XREGION_CID); |
|
|
|
|
|
|
|
fCompNode.Init(pb, kXRegionComp, kXRegionNode, IDC_RESPONDER_COMP, IDC_RESPONDER_NODE, &cids); |
|
|
|
|
|
|
|
fCompNode.InitDlg(hWnd); |
|
|
|
|
|
|
|
} |
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
case WM_COMMAND: |
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_BUTTON) |
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_COMP) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (plPick::DetectorEnable(pm->GetParamBlock(), kActivatorComp, true)) |
|
|
|
fCompNode.CompButtonPress(hWnd); |
|
|
|
IUpdateButton(pm->GetParamBlock(), hWnd); |
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_NODE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.NodeButtonPress(hWnd); |
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
@ -872,15 +906,7 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
void DeleteThis() {} |
|
|
|
void DeleteThis() {} |
|
|
|
}; |
|
|
|
}; |
|
|
|
static plResponderActivatorEnableProc gResponderActivatorEnableProc; |
|
|
|
static plResponderXRegionProc gResponderXRegionProc; |
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderXRegionProc; |
|
|
|
|
|
|
|
extern plResponderXRegionProc gResponderXRegionProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum { kXRegionComp, kXRegionType, kXRegionNode }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderXRegionBlock |
|
|
|
ParamBlockDesc2 gResponderXRegionBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -963,9 +989,6 @@ const char *plResponderCmdXRegion::GetInstanceName(IParamBlock2 *pb) |
|
|
|
return name; |
|
|
|
return name; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#include "plMessage/plExcludeRegionMsg.h" |
|
|
|
|
|
|
|
#include "plExcludeRegionComponent.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plMessage *plResponderCmdXRegion::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) |
|
|
|
plMessage *plResponderCmdXRegion::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg, IParamBlock2 *pb) |
|
|
|
{ |
|
|
|
{ |
|
|
|
plResponderCompNode compNode; |
|
|
|
plResponderCompNode compNode; |
|
|
@ -1000,53 +1023,9 @@ plMessage *plResponderCmdXRegion::CreateMsg(plMaxNode* node, plErrorMsg *pErrMsg |
|
|
|
throw "No exclude region component specified"; |
|
|
|
throw "No exclude region component specified"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class plResponderXRegionProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
plResponderCompNode fCompNode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCompNode::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(XREGION_CID); |
|
|
|
|
|
|
|
fCompNode.Init(pb, kXRegionComp, kXRegionNode, IDC_RESPONDER_COMP, IDC_RESPONDER_NODE, &cids); |
|
|
|
|
|
|
|
fCompNode.InitDlg(hWnd); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_COMP) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.CompButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_NODE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.NodeButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderXRegionProc gResponderXRegionProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderCameraTransitionProc; |
|
|
|
|
|
|
|
extern plResponderCameraTransitionProc gResponderCameraTransitionProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
enum
|
|
|
|
{ kCameraObj, |
|
|
|
{ kCameraObj, |
|
|
|
kPopCamera, |
|
|
|
kPopCamera, |
|
|
@ -1149,9 +1128,6 @@ plMessage *plResponderCmdCamTransition::CreateMsg(plMaxNode* node, plErrorMsg *p |
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderCameraForceProc; |
|
|
|
|
|
|
|
extern plResponderCameraForceProc gResponderCameraForceProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
enum
|
|
|
|
{ |
|
|
|
{ |
|
|
|
kCamForce, |
|
|
|
kCamForce, |
|
|
@ -1420,9 +1396,46 @@ plMessage *plResponderCmdVisibility::CreateMsg(plMaxNode* node, plErrorMsg *pErr |
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
enum { kSubWorldNode, kSubWorldType }; |
|
|
|
enum { kSubWorldNode, kSubWorldType }; |
|
|
|
|
|
|
|
enum
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
kRespondSubWorldEnter, |
|
|
|
|
|
|
|
kRespondSubWorldExit, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderSubWorldProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
virtual BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
int type = pb->GetInt(kSubWorldType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HWND nButton = GetDlgItem(hWnd, IDC_NODE_BUTTON); |
|
|
|
|
|
|
|
//HWND sEnterText = GetDlgItem(hWnd, IDC_SUBWORLD_ENTER);
|
|
|
|
|
|
|
|
HWND sExitText = GetDlgItem(hWnd, IDC_SUBWORLD_EXIT); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOL isEnter = (type == kRespondSubWorldEnter) ? TRUE : FALSE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ShowWindow(nButton, (isEnter) ? SW_SHOW : SW_HIDE); |
|
|
|
|
|
|
|
//ShowWindow(sEnterText,(isEnter) ? SW_SHOW : SW_HIDE);
|
|
|
|
|
|
|
|
ShowWindow(sExitText, (isEnter) ? SW_HIDE : SW_SHOW); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
virtual void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class plResponderSubWorldProc; |
|
|
|
static plResponderSubWorldProc gResponderSubWorldProc; |
|
|
|
extern plResponderSubWorldProc gResponderSubWorldProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderSubWorldBlock |
|
|
|
ParamBlockDesc2 gResponderSubWorldBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -1440,12 +1453,6 @@ ParamBlockDesc2 gResponderSubWorldBlock |
|
|
|
end |
|
|
|
end |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
kRespondSubWorldEnter, |
|
|
|
|
|
|
|
kRespondSubWorldExit, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCmdSubWorld& plResponderCmdSubWorld::Instance() |
|
|
|
plResponderCmdSubWorld& plResponderCmdSubWorld::Instance() |
|
|
|
{ |
|
|
|
{ |
|
|
|
static plResponderCmdSubWorld theInstance; |
|
|
|
static plResponderCmdSubWorld theInstance; |
|
|
@ -1532,54 +1539,45 @@ plMessage *plResponderCmdSubWorld::CreateMsg(plMaxNode* node, plErrorMsg *pErrMs |
|
|
|
|
|
|
|
|
|
|
|
return swMsg; |
|
|
|
return swMsg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderSubWorldProc : public ParamMap2UserDlgProc |
|
|
|
#include "pfMessage/plArmatureEffectMsg.h" |
|
|
|
|
|
|
|
#include "plAvatar/plArmatureEffects.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
kSurface, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderFootSurfaceProc : public ParamMap2UserDlgProc |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
HWND hCB = GetDlgItem(hWnd, IDC_COMP_RESPOND_FOOT_SURFACE); |
|
|
|
|
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
switch (msg) |
|
|
|
switch (msg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case WM_INITDIALOG: |
|
|
|
case WM_INITDIALOG: |
|
|
|
{ |
|
|
|
for (i = 0; i < plArmatureEffectsMgr::kMaxSurface; i++) |
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
ComboBox_AddString(hCB, plArmatureEffectsMgr::SurfaceStrings[i]); |
|
|
|
int type = pb->GetInt(kSubWorldType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HWND nButton = GetDlgItem(hWnd, IDC_NODE_BUTTON); |
|
|
|
|
|
|
|
//HWND sEnterText = GetDlgItem(hWnd, IDC_SUBWORLD_ENTER);
|
|
|
|
|
|
|
|
HWND sExitText = GetDlgItem(hWnd, IDC_SUBWORLD_EXIT); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOL isEnter = (type == kRespondSubWorldEnter) ? TRUE : FALSE; |
|
|
|
ComboBox_SetCurSel(hCB, pb->GetInt(ParamID(kSurface))); |
|
|
|
|
|
|
|
|
|
|
|
ShowWindow(nButton, (isEnter) ? SW_SHOW : SW_HIDE); |
|
|
|
|
|
|
|
//ShowWindow(sEnterText,(isEnter) ? SW_SHOW : SW_HIDE);
|
|
|
|
|
|
|
|
ShowWindow(sExitText, (isEnter) ? SW_HIDE : SW_SHOW); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
case WM_COMMAND: |
|
|
|
break; |
|
|
|
if (HIWORD(wParam) == CBN_SELCHANGE && LOWORD(wParam) == IDC_COMP_RESPOND_FOOT_SURFACE) |
|
|
|
|
|
|
|
pb->SetValue(ParamID(kSurface), 0, ComboBox_GetCurSel(hCB));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
void DeleteThis() {} |
|
|
|
void DeleteThis() {} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderFootSurfaceProc gResponderFootSurfaceProc; |
|
|
|
static plResponderSubWorldProc gResponderSubWorldProc; |
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "pfMessage/plArmatureEffectMsg.h" |
|
|
|
|
|
|
|
#include "plAvatar/plArmatureEffects.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderFootSurfaceProc; |
|
|
|
|
|
|
|
extern plResponderFootSurfaceProc gResponderFootSurfaceProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
kSurface, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderFootSurfaceBlock |
|
|
|
ParamBlockDesc2 gResponderFootSurfaceBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -1623,44 +1621,52 @@ plMessage *plResponderCmdFootSurface::CreateMsg(plMaxNode* node, plErrorMsg *pEr |
|
|
|
return msg; |
|
|
|
return msg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class plResponderFootSurfaceProc : public ParamMap2UserDlgProc |
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "plMultistageBehComponent.h" |
|
|
|
|
|
|
|
enum { kMultistageComp, kMultistageNode }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderMultistageProc : public ParamMap2UserDlgProc |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
plResponderCompNode fCompNode; |
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
public: |
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
virtual BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
{ |
|
|
|
{ |
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
HWND hCB = GetDlgItem(hWnd, IDC_COMP_RESPOND_FOOT_SURFACE); |
|
|
|
|
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (msg) |
|
|
|
switch (msg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case WM_INITDIALOG: |
|
|
|
case WM_INITDIALOG: |
|
|
|
for (i = 0; i < plArmatureEffectsMgr::kMaxSurface; i++) |
|
|
|
{ |
|
|
|
ComboBox_AddString(hCB, plArmatureEffectsMgr::SurfaceStrings[i]); |
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
ComboBox_SetCurSel(hCB, pb->GetInt(ParamID(kSurface))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCompNode::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(MULTISTAGE_BEH_CID); |
|
|
|
|
|
|
|
fCompNode.Init(pb, kMultistageComp, kMultistageNode, IDC_RESPONDER_COMP, IDC_RESPONDER_NODE, &cids); |
|
|
|
|
|
|
|
fCompNode.InitDlg(hWnd); |
|
|
|
|
|
|
|
} |
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
case WM_COMMAND: |
|
|
|
if (HIWORD(wParam) == CBN_SELCHANGE && LOWORD(wParam) == IDC_COMP_RESPOND_FOOT_SURFACE) |
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_COMP) |
|
|
|
pb->SetValue(ParamID(kSurface), 0, ComboBox_GetCurSel(hCB));
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.CompButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_NODE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.NodeButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
return FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
void DeleteThis() {} |
|
|
|
virtual void DeleteThis() {} |
|
|
|
}; |
|
|
|
}; |
|
|
|
static plResponderFootSurfaceProc gResponderFootSurfaceProc; |
|
|
|
static plResponderMultistageProc gResponderMultistageProc; |
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "plMultistageBehComponent.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class plResponderMultistageProc; |
|
|
|
|
|
|
|
extern plResponderMultistageProc gResponderMultistageProc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum { kMultistageComp, kMultistageNode }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ParamBlockDesc2 gResponderMultistageBlock |
|
|
|
ParamBlockDesc2 gResponderMultistageBlock |
|
|
|
( |
|
|
|
( |
|
|
@ -1722,44 +1728,3 @@ plMessage *plResponderCmdMultistage::CreateMsg(plMaxNode* node, plErrorMsg *pErr |
|
|
|
else |
|
|
|
else |
|
|
|
throw "No Multistage component specified"; |
|
|
|
throw "No Multistage component specified"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class plResponderMultistageProc : public ParamMap2UserDlgProc |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
plResponderCompNode fCompNode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
BOOL DlgProc(TimeValue t, IParamMap2 *pm, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case WM_INITDIALOG: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IParamBlock2 *pb = pm->GetParamBlock(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plResponderCompNode::ClassIDs cids; |
|
|
|
|
|
|
|
cids.push_back(MULTISTAGE_BEH_CID); |
|
|
|
|
|
|
|
fCompNode.Init(pb, kMultistageComp, kMultistageNode, IDC_RESPONDER_COMP, IDC_RESPONDER_NODE, &cids); |
|
|
|
|
|
|
|
fCompNode.InitDlg(hWnd); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case WM_COMMAND: |
|
|
|
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_COMP) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.CompButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDC_RESPONDER_NODE) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fCompNode.NodeButtonPress(hWnd); |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void DeleteThis() {} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
static plResponderMultistageProc gResponderMultistageProc; |
|
|
|
|
|
|
|