Added scroll arrows to config pages to help guide user theres more options
authorskeezix <skeezix@flotsam-vm.(none)>
Mon, 24 Jan 2011 18:04:30 +0000 (13:04 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Mon, 24 Jan 2011 18:04:30 +0000 (13:04 -0500)
minimenu/mmcat.h
minimenu/mmconf.c

index 1f84e70..a1f8142 100644 (file)
@@ -16,7 +16,7 @@ typedef struct {
   unsigned int refcount;  // how many apps in this category
   // if a directory browser category, additional info is needed
   char *fspath;           // NULL if a pnd-category (not a filesystem category)
   unsigned int refcount;  // how many apps in this category
   // if a directory browser category, additional info is needed
   char *fspath;           // NULL if a pnd-category (not a filesystem category)
-  pnd_box_handle disco;   // faux-applications generated from filesystem
+  pnd_box_handle disco;   // faux-applications generated from filesystem (so that refs can point to here)
 } mm_category_t;
 
 #define MAX_CATS 200
 } mm_category_t;
 
 #define MAX_CATS 200
index 1c1ef61..0923a34 100644 (file)
@@ -32,10 +32,11 @@ confitem_t page_general[] = {
   { "CPU speed when leaving",        "Before running app, set this speed; app may override.",   "500",              "minimenu.run_speed",      ct_cpu_speed },
   { "Show 'All' tab",                "Whethor an All tab is shown or not",                      "1",                "categories.do_all_cat",   ct_boolean },
   { "Show directory browser tabs",   "Show a tab for each SD card?",                            "0",                "filesystem.do_browser",   ct_boolean },
   { "CPU speed when leaving",        "Before running app, set this speed; app may override.",   "500",              "minimenu.run_speed",      ct_cpu_speed },
   { "Show 'All' tab",                "Whethor an All tab is shown or not",                      "1",                "categories.do_all_cat",   ct_boolean },
   { "Show directory browser tabs",   "Show a tab for each SD card?",                            "0",                "filesystem.do_browser",   ct_boolean },
+  { "Detail panel on start?",        "Show or hide the detail panel when menu starts",          "1",                "display.show_detail_pane", ct_boolean },
   { "Start with app selected",       "Whethor selection is placed by default or not",           "0",                "minimenu.start_selected", ct_boolean },
   { "Start with app selected",       "Whethor selection is placed by default or not",           "0",                "minimenu.start_selected", ct_boolean },
+  { "Sub-categories as folders?",    "If no, uses tabs instead of folders within tabs.",        "1",                "tabs.subcat_as_folders",  ct_boolean },
   { "Wrap tab change",               "Changing tab left or right, does it wrap around?",        "0",                "tabs.wraparound",         ct_boolean },
   { "Grid stop vertical",            "Changing selection up or down, does it stop or wrap?",    "0",                "grid.wrap_vert_stop",     ct_boolean },
   { "Wrap tab change",               "Changing tab left or right, does it wrap around?",        "0",                "tabs.wraparound",         ct_boolean },
   { "Grid stop vertical",            "Changing selection up or down, does it stop or wrap?",    "0",                "grid.wrap_vert_stop",     ct_boolean },
-  { "Detail panel on start?",        "Show or hide the detail panel when menu starts",          "1",                "display.show_detail_pane", ct_boolean },
   { "Live (not exit) on app run?",   "Normally menu exits (to save ram) on app run",            "0",                "minimenu.live_on_run",    ct_boolean },
   { "Force wallpaper with..",        "You can force an override over themes background",        "/pandora/appdata/mmenu/wallpaper.png", "minimenu.force_wallpaper",  ct_filename },
   { "",                              "",                                                        NULL,               NULL,                      ct_nil },
   { "Live (not exit) on app run?",   "Normally menu exits (to save ram) on app run",            "0",                "minimenu.live_on_run",    ct_boolean },
   { "Force wallpaper with..",        "You can force an override over themes background",        "/pandora/appdata/mmenu/wallpaper.png", "minimenu.force_wallpaper",  ct_filename },
   { "",                              "",                                                        NULL,               NULL,                      ct_nil },
@@ -308,6 +309,27 @@ void conf_display_page ( confitem_t *page, unsigned int selitem, unsigned int fi
   dest += conf_render_text ( g_big_font, "Minimenu Configuration", dest, 10, 10, CONF_UNSELECTED );
   dest += conf_render_line ( dest, 45 );
 
   dest += conf_render_text ( g_big_font, "Minimenu Configuration", dest, 10, 10, CONF_UNSELECTED );
   dest += conf_render_line ( dest, 45 );
 
+  // scrollable hints
+  {
+
+    // up
+    if ( first_visible > 0 ) {
+      dest -> x = 10;
+      dest -> y = 65;
+      SDL_BlitSurface ( g_imagecache [ IMG_ARROW_UP ].i, NULL /* whole image */, sdl_realscreen, dest );
+      dest++;
+    } // scroll arrow up
+
+    // down
+    if ( first_visible + max_visible < conf_determine_pagelength ( page ) ) {
+      dest -> x = 10;
+      dest -> y = 345;
+      SDL_BlitSurface ( g_imagecache [ IMG_ARROW_DOWN ].i, NULL /* whole image */, sdl_realscreen, dest );
+      dest++;
+    } // scroll arrow up
+
+  } // scrollbar
+
   // items
   tx = 50; ty = 70;
   unsigned char counter = first_visible;
   // items
   tx = 50; ty = 70;
   unsigned char counter = first_visible;