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

Method OnSelchangeBriefAddsLayoutList

editor/BriefScreenEdit.cpp:156–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void CBriefScreenEdit::OnSelchangeBriefAddsLayoutList() {
157 if (bm_handle > BAD_BITMAP_HANDLE) {
158 bm_FreeBitmap(bm_handle);
159 bm_handle = -1;
160 }
161
162 CComboBox *combo = (CComboBox *)GetDlgItem(IDC_BRIEF_ADDS_LAYOUT_LIST);
163 int sel = combo->GetCurSel();
164 if (sel > 0) {
165 bm_handle = bm_AllocLoadFileBitmap(PBlayouts[sel - 1].filename, 0);
166 }
167
168 CWnd *objwnd;
169 RECT rect;
170 int w, h;
171
172 objwnd = GetDlgItem(IDC_BRIEF_ADDS_PICTURE);
173 objwnd->GetWindowRect(&rect);
174 w = rect.right - rect.left;
175 h = rect.bottom - rect.top;
176
177 int temp = bm_AllocBitmap(w, h, 0);
178 if (temp > BAD_BITMAP_HANDLE) {
179 bm_ClearBitmap(temp);
180 if (bm_handle > BAD_BITMAP_HANDLE) {
181 bm_ScaleBitmapToBitmap(temp, bm_handle);
182 }
183 bm_FreeBitmap(bm_handle);
184 bm_handle = temp;
185 }
186}
187
188void CBriefScreenEdit::OnMissionflags() {
189 CBriefMissionFlagsDlg dlg(m_Set, m_UnSet);

Callers

nothing calls this directly

Calls 5

bm_FreeBitmapFunction · 0.85
bm_AllocLoadFileBitmapFunction · 0.85
bm_AllocBitmapFunction · 0.85
bm_ClearBitmapFunction · 0.85
bm_ScaleBitmapToBitmapFunction · 0.85

Tested by

no test coverage detected