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

Function InputNumber

editor/EditLineDialog.cpp:126–135  ·  view source on GitHub ↗

Gets a number from the user Parameters: n - filled in the with return value title - the title for the input window prompt - the prompt for the input box Returns: false if cancel was pressed on the dialog, else true If false returned, n is unchanged

Source from the content-addressed store, hash-verified

124// Returns: false if cancel was pressed on the dialog, else true
125// If false returned, n is unchanged
126bool InputNumber(int *n, char *title, char *prompt, CWnd *wnd) {
127 char buf[100] = "";
128 CEditLineDialog dlg(title, prompt, buf, 1, wnd);
129
130 if (dlg.DoModal() == IDOK) {
131 *n = atoi((char *)dlg.GetText());
132 return 1;
133 } else
134 return 0;
135}

Callers 5

OnTrigGotoMethod · 0.85
OnRoomSelectByNumberMethod · 0.85
OnDropTerrainMethod · 0.85

Calls 2

DoModalMethod · 0.45
GetTextMethod · 0.45

Tested by

no test coverage detected