Draw text buffer immediatly on menu dialogue
Previous version hardcoded the text speed to zero for menus and was breaking text dialogues text speed. This method should, hopefully, fix those issues and be more robust.
@@ -29,7 +29,6 @@ UBYTE text_out_speed = 1;
UBYTE text_draw_speed = 1;
UBYTE tmp_text_in_speed = 1;
UBYTE tmp_text_out_speed = 1;
-UBYTE tmp_text_draw_speed = 1;
UBYTE text_num_lines = 0;
UBYTE avatar_enabled = 0;
@@ -233,8 +232,6 @@ void UIShowMenu(UWORD flag_index, UWORD line, UBYTE layout, UBYTE cancel_config)
menu_cancel_on_last_option = cancel_config & MENU_CANCEL_ON_LAST_OPTION;
menu_cancel_on_b = cancel_config & MENU_CANCEL_ON_B_PRESSED;
menu_layout = layout;
- tmp_text_draw_speed = text_draw_speed;
- text_draw_speed = 0;
UIShowText(line);
menu_num_options = tmp_text_lines[0];
UIDrawMenuCursor();
@@ -335,7 +332,7 @@ void UIDrawTextBufferChar()
text_y++;
}
- if (text_draw_speed == 0)
+ if (text_draw_speed == 0 || menu_enabled)
{
UIDrawTextBufferChar();
}
@@ -343,9 +340,6 @@ void UIDrawTextBufferChar()
else
{
text_drawn = TRUE;
- // restore the user selected text draw speed as it
- // might have been override in UIShowMenu
- text_draw_speed = tmp_text_draw_speed;
}
}
