More formatting updates. Reduced whitespace, looks even better.

This commit is contained in:
William Ferrell
2000-03-30 20:43:33 +00:00
parent a98c8109a8
commit ddfd41f53e
78 changed files with 0 additions and 590 deletions
-16
View File
@@ -57,22 +57,17 @@ draw_heartbeat ()
static int PAD = 255;
typedef struct menu_info {
int selected;
int length;
} menu_info;
static int draw_menu (Menu menu, menu_info * info);
static int fill_menu_info (Menu menu, menu_info * info);
static int menu_handle_action (menu_item * item);
static int slid_func (menu_item * item);
int
do_menu (Menu menu)
{
@@ -84,13 +79,11 @@ do_menu (Menu menu)
int (*func) ();
int (*readfunc) (int);
if (!menu)
return MENU_ERROR;
fill_menu_info (menu, &info);
while (!done) {
// Keep the cursor off titles... (?)
while (menu[info.selected].type == TYPE_TITL) {
@@ -100,7 +93,6 @@ do_menu (Menu menu)
info.selected -= 2;
}
draw_menu (menu, &info);
// FIXME: This should use a better keypress interface, which
@@ -114,7 +106,6 @@ do_menu (Menu menu)
// Check for client input...
}
// Handle the key according to the keybindings...
switch (key) {
case 'D':
@@ -198,13 +189,11 @@ draw_menu (Menu menu, menu_info * info)
// these should maybe be removed:
int wid = lcd.wid, hgt = lcd.hgt;
if (!menu)
return MENU_ERROR;
lcd.clear ();
// Scroll down until the selected item is centered, if possible...
top = info->selected - (hgt / 2);
if (top < 0)
@@ -216,8 +205,6 @@ draw_menu (Menu menu, menu_info * info)
if (top < 0)
top = 0;
// Draw all visible items...
for (i = top; i < bottom; i++, y++) {
if (i == info->selected)
@@ -263,14 +250,12 @@ draw_menu (Menu menu, menu_info * info)
if (bottom < info->length)
lcd.chr (1, hgt, 'v');
draw_heartbeat ();
//lcd.flush();
return 0;
}
static int
fill_menu_info (Menu menu, menu_info * info)
{
@@ -293,7 +278,6 @@ menu_handle_action (menu_item * item)
return MENU_OK;
}
static int
slid_func (menu_item * item)
{