1.1 --- a/core/MenuManager.cpp Wed Feb 24 23:41:06 2010 -0800
1.2 +++ b/core/MenuManager.cpp Sat Feb 27 14:56:02 2010 +1300
1.3 @@ -231,6 +231,7 @@
1.4 unsigned int pgn = menu->GetPagination();
1.5 unsigned int maxItems = style->GetMaxPageItems();
1.6 bool exitButton = (menu->GetMenuOptionFlags() & MENUFLAG_BUTTON_EXIT) == MENUFLAG_BUTTON_EXIT;
1.7 + bool novoteButton = (menu->GetMenuOptionFlags() & MENUFLAG_BUTTON_NOVOTE) == MENUFLAG_BUTTON_NOVOTE;
1.8
1.9 if (pgn != MENU_NO_PAGINATION)
1.10 {
1.11 @@ -241,6 +242,11 @@
1.12 maxItems--;
1.13 }
1.14
1.15 + if (novoteButton)
1.16 + {
1.17 + maxItems--;
1.18 + }
1.19 +
1.20 /* This is very not allowed! */
1.21 if (maxItems < 2)
1.22 {
1.23 @@ -436,6 +442,20 @@
1.24 /* Draw the item according to the order */
1.25 menu_slots_t *slots = md.slots;
1.26 unsigned int position = 0; /* Keep track of the last position */
1.27 +
1.28 + if (novoteButton)
1.29 + {
1.30 + char text[50];
1.31 + if (!CoreTranslate(text, sizeof(text), "%T", 2, NULL, "No Vote", &client))
1.32 + {
1.33 + UTIL_Format(text, sizeof(text), "No Vote");
1.34 + }
1.35 + ItemDrawInfo dr(text, 0);
1.36 + position = panel->DrawItem(dr);
1.37 + slots[position].type = ItemSel_Exit;
1.38 + position++;
1.39 + }
1.40 +
1.41 if (order == ItemOrder_Ascending)
1.42 {
1.43 md.item_on_page = drawItems[0].position;