Thanks Egg

This commit is contained in:
Diegoisawesome 2018-11-07 14:48:06 -06:00
parent a052e45f27
commit 65f053fd89

View file

@ -1088,26 +1088,15 @@ static u16 sub_80E1EB8(const u8 *str)
static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress, u8 cursorPos) static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress, u8 cursorPos)
{ {
int i; int i;
u8 right;
u8 bottom;
u8 windowId; u8 windowId;
u8 count = gMultichoiceLists[multichoiceId].count; u8 count = gMultichoiceLists[multichoiceId].count;
const struct MenuAction *actions = gMultichoiceLists[multichoiceId].list; const struct MenuAction *actions = gMultichoiceLists[multichoiceId].list;
const struct MenuAction *action;
int width = 0; int width = 0;
u8 newWidth; u8 newWidth;
// Must be a fakematch because come on, seriously for (i = 0; i < count; i++)
if (width < count)
{ {
action = &actions[0]; width = display_text_and_get_width(actions[i].text, width);
i = count;
do
{
width = display_text_and_get_width(action->text, width);
action++;
i--;
} while (i != 0);
} }
newWidth = convert_pixel_width_to_tile_width(width); newWidth = convert_pixel_width_to_tile_width(width);