MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnTableEditFileLoad

Method OnTableEditFileLoad

editor/TableFileEdit.cpp:69–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67// CTableFileEdit message handlers
68
69void CTableFileEdit::OnTableEditFileLoad() {
70 // TODO: Add your command handler code here
71 if (m_PageList.ModifiedPrompt(this) == IDNO)
72 return;
73
74 CString filters = "Outrage Table File (*.loc)|*.loc|All Files (*.*)|*.*||";
75
76 CFileDialog dlg_open(TRUE, NULL, NULL, OFN_FILEMUSTEXIST, (LPCTSTR)filters, this);
77 if (dlg_open.DoModal() == IDCANCEL) {
78 return;
79 }
80
81 if (!m_PageList.LoadTable(dlg_open.GetPathName().GetBuffer(0))) {
82 MessageBox("Out of Memory Error: LoadTable()\n", "Load Table Error!");
83 m_PageList.ClearList();
84 return;
85 }
86
87 m_PageList.FillFromList(&m_NameList);
88 EnableAll(TRUE);
89
90 m_PageList.DisplaySelected(&m_NameList, &m_DescriptionBox);
91 m_PageList.SetTitleString(this);
92}
93
94void CTableFileEdit::OnTableEditFileExit() {
95 // TODO: Add your command handler code here

Callers

nothing calls this directly

Calls 8

LoadTableMethod · 0.80
GetBufferMethod · 0.80
FillFromListMethod · 0.80
DisplaySelectedMethod · 0.80
ModifiedPromptMethod · 0.45
DoModalMethod · 0.45
ClearListMethod · 0.45
SetTitleStringMethod · 0.45

Tested by

no test coverage detected