static MENU_UPDATE_FUNC(script_print) { if (!script_preview_flag || !entry->selected) { MENU_SET_NAME("Show script"); MENU_SET_VALUE(""); script_preview_flag = 0; return; } static int prev_script = -1; if (prev_script != script_selected) { int size; char* p = get_script_path(script_selected); char* f = (char*)read_entire_file(p, &size); if (f) { script_copy_window(script_preview, sizeof(script_preview), f, 0, 0, 20, 60); fio_free(f); } else { snprintf(script_preview, sizeof(script_preview), "Could not read '%s'", p); } } prev_script = script_selected; bmp_fill(40, 0, 0, 720, 430); int fnt = FONT(FONT_MED, COLOR_WHITE, 40); big_bmp_printf(fnt, 10, 10, "%s", script_preview); info->custom_drawing = CUSTOM_DRAW_THIS_MENU; }
void draw_beta_warning() { bmp_fill(COLOR_BLACK, 0, 0, 720, 480); bfnt_puts("Magic Lantern", 242, 53, COLOR_WHITE, COLOR_BLACK); bmp_printf(FONT_MED, 50, 150, "This is a development snapshot for testing purposes."); bmp_printf(FONT_MED, 50, 200, " Please report all bugs at www.magiclantern.fm. "); bmp_printf(FONT_MED, 50, 250, " Be careful using it for production work. "); bmp_printf(FONT_MED, 50, 300, " Enjoy! "); big_bmp_printf(FONT_MED, 10, 410, "Magic Lantern version : %s\n" "Mercurial changeset : %s\n" "Built on %s by %s.", build_version, build_id, build_date, build_user); }