[BUG] Specials menu displays the wrong selected move
Closed this issue · 3 comments
When I open the special move menu in a fight and I go over a special move, the screen on the right shows me the wrong infos. It seems like if I go over the Nth element the screen on the right shows me the Nth element that is shown in the menu that pops up when you have to learn a new special move
Thanks for pointing this out! In the screenshot, the description is the one for the 1st Special
for Knight
(wrong one).
I remember finding out about this and then forgetting. Alas, the issue is gonna keep it in my mind.
Can reproduce this easily.
- Learn any move that is not the first
- The right window will always show the description of the first one
Let's see where this stems from. Will update this post with links.
Edit: found it.
helapordo/src/build-nc/game_curses.c
Line 3488 in e85dfa4
This bit of code is related:
/* Prepare selection display window */
my_wins[0] = newwin(18, 40, 4, 30);
updateSelectedSpecialW(my_wins[0], my_menu, f);
refresh();
int picked = 0;
ITEM *cur;
while (!picked && (c = wgetch(my_menu_win)) != 'q') {
switch (c) {
case KEY_DOWN: {
menu_driver(my_menu, REQ_DOWN_ITEM);
cur = current_item(my_menu);
//Update selected window
wclear(my_wins[0]);
wrefresh(my_wins[0]);
updateSelectedSpecialW(my_wins[0], my_menu, f);
}
break;
I think since you never get to move the cursor without more than one special unlocked, it doesn't ever update and always shows the first one it landed on from this function:
helapordo/src/build-nc/game_curses.c
Line 2093 in e85dfa4
Which should probably be investigated.
The right window should be started from the lowest special slot you have unlocked already.