MCPcopy Create free account
hub / github.com/diasurgical/devilution / gmenu_presskeys

Function gmenu_presskeys

Source/gmenu.cpp:230–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230BOOL gmenu_presskeys(int vkey)
231{
232 if (!sgpCurrentMenu)
233 return FALSE;
234 switch (vkey) {
235 case VK_RETURN:
236 if ((sgpCurrItem->dwFlags & GMENU_ENABLED) != 0) {
237 PlaySFX(IS_TITLEMOV);
238 sgpCurrItem->fnMenu(TRUE);
239 }
240 break;
241 case VK_ESCAPE:
242 PlaySFX(IS_TITLEMOV);
243 gmenu_set_items(0, 0);
244 break;
245 case VK_SPACE:
246 return FALSE;
247 case VK_LEFT:
248 gmenu_left_right(FALSE);
249 break;
250 case VK_RIGHT:
251 gmenu_left_right(TRUE);
252 break;
253 case VK_UP:
254 gmenu_up_down(FALSE);
255 break;
256 case VK_DOWN:
257 gmenu_up_down(TRUE);
258 break;
259 }
260 return TRUE;
261}
262
263void gmenu_left_right(BOOL isRight)
264{

Callers 1

PressKeyFunction · 0.85

Calls 4

PlaySFXFunction · 0.85
gmenu_set_itemsFunction · 0.85
gmenu_left_rightFunction · 0.85
gmenu_up_downFunction · 0.85

Tested by

no test coverage detected