Fixed amb207: Last item displayed as "10" instead of "0" on new menus.

This commit is contained in:
Steve Dudenhoeffer 2007-04-13 23:59:52 +00:00
parent 1f423dc39f
commit 7b4283bf4a

View File

@ -458,7 +458,7 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
_snprintf(buffer, _snprintf(buffer,
sizeof(buffer)-1, sizeof(buffer)-1,
m_AutoColors ? "\\r%d. \\w%s\n" : "%d. %s\n", m_AutoColors ? "\\r%d. \\w%s\n" : "%d. %s\n",
option, option == 10 ? 0 : option,
m_OptNames[abs(MENU_BACK)].c_str() m_OptNames[abs(MENU_BACK)].c_str()
); );
m_Text.append(buffer); m_Text.append(buffer);
@ -473,7 +473,7 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
_snprintf(buffer, _snprintf(buffer,
sizeof(buffer)-1, sizeof(buffer)-1,
m_AutoColors ? "\\r%d. \\w%s\n" : "%d. %s\n", m_AutoColors ? "\\r%d. \\w%s\n" : "%d. %s\n",
option, option == 10 ? 0 : option,
m_OptNames[abs(MENU_MORE)].c_str() m_OptNames[abs(MENU_MORE)].c_str()
); );
m_Text.append(buffer); m_Text.append(buffer);
@ -488,7 +488,7 @@ const char *Menu::GetTextString(int player, page_t page, int &keys)
_snprintf(buffer, _snprintf(buffer,
sizeof(buffer)-1, sizeof(buffer)-1,
m_AutoColors ? "\\r%d. \\w%s\n" : "%d. %s\n", m_AutoColors ? "\\r%d. \\w%s\n" : "%d. %s\n",
option, option == 10 ? 0 : option,
m_OptNames[abs(MENU_EXIT)].c_str() m_OptNames[abs(MENU_EXIT)].c_str()
); );
m_Text.append(buffer); m_Text.append(buffer);