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

Method UpdateDialog

editor/levelkeypad.cpp:278–510  ·  view source on GitHub ↗

call this to update all the text entries in the keypad.

Source from the content-addressed store, hash-verified

276
277// call this to update all the text entries in the keypad.
278void levelkeypad::UpdateDialog() {
279 CButton *bbox;
280 int flags;
281 int lgflags;
282 int priority;
283 char g_list;
284 char name[256];
285 char iname[256];
286 char desc[2560];
287 char message[2560];
288 int num_goals;
289 int num_items = 0;
290 int i;
291 char big_text_message[MAX_LEVEL_GOALS * 5 * 40];
292
293 char item_type;
294 int item_handle;
295
296 SendDlgItemMessage(IDC_BGOS_COMBO, CB_RESETCONTENT, 0, 0);
297 for (i = 0; i < MAX_SOUNDS; i++) {
298 if (Sounds[i].used)
299 SendDlgItemMessage(IDC_BGOS_COMBO, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)Sounds[i].name);
300 }
301 if (sound_override_glass_breaking != -1)
302 SendDlgItemMessage(IDC_BGOS_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR)Sounds[sound_override_glass_breaking].name);
303 else
304 SendDlgItemMessage(IDC_BGOS_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR) "Default");
305
306 if (force_field_bounce_texture[0] != -1)
307 SendDlgItemMessage(IDC_FFT1_COMBO, CB_SELECTSTRING, 0,
308 (LPARAM)(LPCTSTR)GameTextures[force_field_bounce_texture[0]].name);
309 else
310 SendDlgItemMessage(IDC_FFT1_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR) "Not Assigned");
311 if (force_field_bounce_texture[1] != -1)
312 SendDlgItemMessage(IDC_FFT2_COMBO, CB_SELECTSTRING, 0,
313 (LPARAM)(LPCTSTR)GameTextures[force_field_bounce_texture[1]].name);
314 else
315 SendDlgItemMessage(IDC_FFT2_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR) "Not Assigned");
316 if (force_field_bounce_texture[2] != -1)
317 SendDlgItemMessage(IDC_FFT3_COMBO, CB_SELECTSTRING, 0,
318 (LPARAM)(LPCTSTR)GameTextures[force_field_bounce_texture[2]].name);
319 else
320 SendDlgItemMessage(IDC_FFT3_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR) "Not Assigned");
321
322 SendDlgItemMessage(IDC_FFOS_COMBO, CB_RESETCONTENT, 0, 0);
323 for (i = 0; i < MAX_SOUNDS; i++) {
324 if (Sounds[i].used)
325 SendDlgItemMessage(IDC_FFOS_COMBO, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)Sounds[i].name);
326 }
327 if (sound_override_force_field != -1)
328 SendDlgItemMessage(IDC_FFOS_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR)Sounds[sound_override_force_field].name);
329 else
330 SendDlgItemMessage(IDC_FFOS_COMBO, CB_SELECTSTRING, 0, (LPARAM)(LPCTSTR) "Default");
331
332 int idc_amb_type[6] = {IDC_AMB_TYPE1, IDC_AMB_TYPE2, IDC_AMB_TYPE3, IDC_AMB_TYPE4, IDC_AMB_TYPE5, IDC_AMB_TYPE6};
333
334 int idc_chars[6][4] = {
335 {IDC_AMB_N_GROUPS1, IDC_AMB_MAX1, IDC_AMB_MIN1}, {IDC_AMB_N_GROUPS2, IDC_AMB_MAX2, IDC_AMB_MIN2},

Callers

nothing calls this directly

Calls 15

PrintToDlgItemFunction · 0.85
make_goal_dialog_textFunction · 0.85
GetALValueMethod · 0.80
SetCheckMethod · 0.80
LGStatusMethod · 0.80
GetNumGoalsMethod · 0.80
GoalGetNumItemsMethod · 0.80
GoalStatusMethod · 0.80
GoalPriorityMethod · 0.80
GoalGoalListMethod · 0.80
GoalGetNameMethod · 0.80
GoalGetItemNameMethod · 0.80

Tested by

no test coverage detected