MCPcopy Create free account
hub / github.com/bazz1tv/snestracker / updateRecentFiles

Function updateRecentFiles

pc/tracker/Menu_Bar.cpp:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static void updateRecentFiles(Menu_Bar::File_Context *fc)
52{
53 /* Check for populated strings */
54 for (int i=0; i < NUM_RECENTFILES; i++)
55 {
56 if (RecentFiles::paths[i] != NULL)
57 {
58 fc->menu_items[RECENTFILE_STARTIDX - 2].is_visible = true; // enable the recentfiles HEAD spacer
59 fc->menu_items[RECENTFILE_STARTIDX - 1].is_visible = true; // enable the recentfiles HEADLINE
60 fc->menu_items[RECENTFILE_STARTIDX + NUM_RECENTFILES].is_visible = true; // enable the end-of-recentfiles separator
61 fc->menu_items[RECENTFILE_STARTIDX + i].is_visible = true; // enable the entry
62 fc->menu_items[RECENTFILE_STARTIDX + i].clickable_text.str = RecentFiles::dnames[i];
63 fc->menu_items[RECENTFILE_STARTIDX + i].clickable_text.init_width_height();
64 }
65 else
66 {
67 fc->menu_items[RECENTFILE_STARTIDX + i].is_visible = false; // enable the entry
68 }
69 }
70
71 fc->menu.preload(fc->menu.created_at.x, fc->menu.created_at.y);
72}
73
74int Menu_Bar::File_Context::openRecent(void *i)
75{

Callers 4

openRecentMethod · 0.85
File_ContextMethod · 0.85
open_songMethod · 0.85
save_commonFunction · 0.85

Calls 2

init_width_heightMethod · 0.45
preloadMethod · 0.45

Tested by

no test coverage detected