338 if (!win->receives_keyboard_input) {
344 int v12 = win->field_34;
345 if (win->pCurrentPosActiveItem - win->pStartingPosActiveItem - v12 >= 0) {
346 win->pCurrentPosActiveItem -= v12;
352 if (win->field_30 != 0) {
355 GUIButton *pButton = win->GetControl(win->pCurrentPosActiveItem);
360 int v7 = win->pCurrentPosActiveItem + win->field_34;
362 win->pNumPresenceButton + win->pStartingPosActiveItem) {
363 win->pCurrentPosActiveItem = v7;
370 if (win->field_30 != 0) {
374 win->GetControl(win->pCurrentPosActiveItem);
380 int v17 = win->pStartingPosActiveItem;
381 int v18 = win->pCurrentPosActiveItem;
382 if (v18 >= win->pNumPresenceButton + v17 - 1)
383 win->pCurrentPosActiveItem = v17;
385 win->pCurrentPosActiveItem = v18 + 1;
386 if (win->field_30 != 0)
return true;
388 win->GetControl(win->pCurrentPosActiveItem);
394 unsigned int uClickX;
395 unsigned int uClickY;
397 int v4 = win->pStartingPosActiveItem;
398 int v28 = v4 + win->pNumPresenceButton;
399 if (v4 < v4 + win->pNumPresenceButton) {
401 GUIButton *pButton = win->GetControl(v4);
402 if (uClickX >= pButton->
uX
404 && uClickX <= pButton->uZ &&
405 uClickY >= pButton->
uY && uClickY <= pButton->uW)
417 win->pCurrentPosActiveItem = v4;
424 int v22 = win->pCurrentPosActiveItem;
425 int v23 = win->pStartingPosActiveItem;
427 win->pCurrentPosActiveItem =
428 win->pNumPresenceButton + v23 - 1;
430 win->pCurrentPosActiveItem = v22 - 1;
431 if (win->field_30 != 0)
return true;
433 win->GetControl(win->pCurrentPosActiveItem);
439 if (win->field_30 != 0) {
440 unsigned int uClickX;
441 unsigned int uClickY;
443 int v29 = win->pStartingPosActiveItem +
444 win->pNumPresenceButton;
446 for (
int v4 = win->pStartingPosActiveItem; v4 < v29; ++v4) {
447 GUIButton *pButton = win->GetControl(v4);
448 if (!pButton)
continue;
449 if (uClickX >= pButton->
uX && uClickX <= pButton->uZ &&
450 uClickY >= pButton->
uY && uClickY <= pButton->uW) {
451 win->pCurrentPosActiveItem = v4;