diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2DlgItemMerchandiseField.cpp | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2DlgItemMerchandiseField.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/T2DLL/T2DlgItemMerchandiseField.cpp b/src/T2DLL/T2DlgItemMerchandiseField.cpp new file mode 100644 index 0000000..11247d1 --- /dev/null +++ b/src/T2DLL/T2DlgItemMerchandiseField.cpp @@ -0,0 +1,43 @@ +#include "CEditWFocus.h" +#include "T2Dialog.h" +#include "T2DlgItemMerchandiseField.h" + +T2DlgItemMerchandiseField::T2DlgItemMerchandiseField(T2TowerDoc *inDoc, T2ImageObj *inImageObj, CPalette *inPalette) + : T2DlgItemEdit(inDoc, inImageObj, inPalette) +{ +} + +/*virtual*/ T2DlgItemMerchandiseField::~T2DlgItemMerchandiseField() { +} + +/*virtual*/ void T2DlgItemMerchandiseField::CreateSubItem(void *inData) { + T2DlgItemEdit::CreateSubItem(inData); + if (mSubItem) + mSubItem->SetReadOnly(); +} + +/*virtual*/ void T2DlgItemMerchandiseField::OnT2SetFocus(CWnd *inWnd) { + T2DlgItemEdit::OnT2SetFocus(inWnd); + + T2DlgItem *theField1 = ((T2Dialog *) GetParent())->GetT2DlgItem(GetDlgCtrlID() + 1); + if (theField1) { + theField1->SetValue(GetValue()); + theField1->ShowWindow(SW_SHOWNORMAL); + } + + T2DlgItem *theField2 = ((T2Dialog *) GetParent())->GetT2DlgItem(GetDlgCtrlID() + 2); + if (theField2) + theField2->ShowWindow(SW_HIDE); +} + +/*virtual*/ void T2DlgItemMerchandiseField::OnT2KillFocus(CWnd *inWnd) { + T2DlgItemEdit::OnT2KillFocus(inWnd); + + T2DlgItem *theField1 = ((T2Dialog *) GetParent())->GetT2DlgItem(GetDlgCtrlID() + 1); + if (theField1) + theField1->ShowWindow(SW_HIDE); + + T2DlgItem *theField2 = ((T2Dialog *) GetParent())->GetT2DlgItem(GetDlgCtrlID() + 2); + if (theField2) + theField2->ShowWindow(SW_SHOWNORMAL); +} |