A (very) few UI improvements

This commit is contained in:
Nemh 2015-05-31 14:31:00 +02:00
parent c9c0fb8b56
commit ba4acfc4f4
2 changed files with 15 additions and 8 deletions

View File

@ -86,7 +86,7 @@ void menu_setup()
menu.items = malloc(sizeof(Menu_Item*) * number);
menu.items[0] = menu_create_item("About", FUNCTION_CALL, menu_about);
menu.items[1] = menu_create_item("Tex flag", CHECK_BOX, get_tex_flag_address());
menu.items[1] = menu_create_item("Pretty Print", CHECK_BOX, get_tex_flag_address());
if(menu.items[0] && menu.items[1]) menu.items_number = number;
else {
menu_free_item(menu.items[0]);

View File

@ -634,14 +634,21 @@ int Console_GetKey()
if (key == KEY_CTRL_EXE)
{
if (Current_Line == Last_Line)
{
return Console_NewLine(LINE_TYPE_INPUT, 1);
}
else
{
return CONSOLE_ARG_ERR;
#ifdef POPUP_PRETTY
if(Line[Current_Line].tex_flag) Console_Draw_TeX_Popup(Line[Current_Line].tex_str, Line[Current_Line].tex_width, Line[Current_Line].tex_height);
else {
#endif
if (Current_Line == Last_Line)
{
return Console_NewLine(LINE_TYPE_INPUT, 1);
}
else
{
return CONSOLE_ARG_ERR;
}
#ifdef POPUP_PRETTY
}
#endif
}
if (key == KEY_CTRL_DEL) return Console_Backspace();