summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorZakk Roberts <midk@rockbox.org>2006-04-02 10:41:16 +0000
committerZakk Roberts <midk@rockbox.org>2006-04-02 10:41:16 +0000
commit15b2eefd6b7bbea7b253d2526b0cb445af348f5e (patch)
tree0c7be5194ec195a6ec0130d115325529961ad8c3 /apps/gui
parent12e528ccd9f8764e745a4b634cc1d4f798fe44d8 (diff)
downloadrockbox-15b2eefd6b7bbea7b253d2526b0cb445af348f5e.zip
rockbox-15b2eefd6b7bbea7b253d2526b0cb445af348f5e.tar.gz
rockbox-15b2eefd6b7bbea7b253d2526b0cb445af348f5e.tar.bz2
rockbox-15b2eefd6b7bbea7b253d2526b0cb445af348f5e.tar.xz
Updated quickscreens, now they look better than before while still retaining the ability to scroll - this is about as good as it gets until viewports are implemented. Also enabled the quickscreen for iPods.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9421 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/gwps.c5
-rw-r--r--apps/gui/gwps.h5
-rw-r--r--apps/gui/quickscreen.c61
-rw-r--r--apps/gui/quickscreen.h18
4 files changed, 64 insertions, 25 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 5c68ac4..a43f2e4 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -569,8 +569,9 @@ long gui_wps_show(void)
break;
#endif
-#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) \
- || (CONFIG_KEYPAD == IRIVER_H300_PAD)
+#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) ||\
+ (CONFIG_KEYPAD == IRIVER_H300_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) ||\
+ (CONFIG_KEYPAD == IPOD_4G_PAD)
/* play settings */
case WPS_QUICK:
#ifdef WPS_RC_QUICK
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 377fc59..e02eb0b 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -194,6 +194,7 @@
#define WPS_BROWSE_PRE BUTTON_SELECT
#define WPS_EXIT (BUTTON_PLAY | BUTTON_REPEAT)
#define WPS_CONTEXT (BUTTON_SELECT | BUTTON_REPEAT)
+#define WPS_QUICK (BUTTON_MENU | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
@@ -342,7 +343,7 @@ struct wps_data
int curr_subline[WPS_MAX_LINES];
int progress_height;
int progress_start;
- int progress_end;
+ int progress_end;
bool wps_loaded;
bool peak_meter_enabled;
#ifdef HAVE_LCD_COLOR
@@ -381,7 +382,7 @@ struct wps_state
void wps_state_init(void);
/* change the ff/rew-status
- if ff_rew = true then we are in skipping mode
+ if ff_rew = true then we are in skipping mode
else we are in normal mode */
void wps_state_update_ff_rew(bool ff_rew);
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 5709071..0cee6fd 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -45,44 +45,69 @@ void gui_quickscreen_init(struct gui_quickscreen * qs,
void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display)
{
- char buffer[30];
+ char buffer[30], line_text[40];
const unsigned char *option;
const unsigned char *title;
const unsigned char *left_right_title;
- char line_text[40];
+ int w;
+ bool statusbar = global_settings.statusbar;
#ifdef HAS_BUTTONBAR
display->has_buttonbar=false;
#endif
gui_textarea_clear(display);
display->setfont(FONT_SYSFIXED);
left_right_title=(unsigned char *)qs->left_right_title;
+
/* Displays the icons */
- display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], 1, 8, 7, 8);
- display->mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], 1, 24, 7, 8);
- display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], 1, 40, 7, 8);
/* Displays the first line of text */
option=(unsigned char *)option_select_get_text(qs->left_option, buffer,
sizeof buffer);
title=(unsigned char *)qs->left_option->title;
snprintf(line_text, sizeof(line_text), "%s %s", title, left_right_title);
- display->puts_scroll(0, 0+!(global_settings.statusbar), line_text);
- display->puts_scroll(3, 1+!(global_settings.statusbar), option);
+ display->puts_scroll(2, !statusbar, line_text);
+ display->puts_scroll(2, 1+!statusbar, option);
+ display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], 1, 8, 7, 8);
/* Displays the second line of text */
- option=(unsigned char *)option_select_get_text(qs->bottom_option, buffer,
- sizeof buffer);
- title=(unsigned char *)qs->bottom_option->title;
- display->puts_scroll(0, 2+!(global_settings.statusbar), title);
- display->puts_scroll(3, 3+!(global_settings.statusbar), option);
-
- /* Displays the third line of text */
option=(unsigned char *)option_select_get_text(qs->right_option, buffer,
sizeof buffer);
title=(unsigned char *)qs->right_option->title;
snprintf(line_text, sizeof(line_text), "%s %s", title, left_right_title);
- display->puts_scroll(0, 4+!(global_settings.statusbar), line_text);
- display->puts_scroll(3, 5+!(global_settings.statusbar), option);
+ display->getstringsize(line_text, &w, NULL);
+ if(w > LCD_WIDTH-8)
+ {
+ display->puts_scroll(2, 2+!statusbar, line_text);
+ display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], 1, 24, 7, 8);
+ }
+ else
+ {
+ display->putsxy(LCD_WIDTH-w-12, 24, line_text);
+ display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], LCD_WIDTH-8, 24, 7, 8);
+ }
+ display->getstringsize(option, &w, NULL);
+ if(w > LCD_WIDTH)
+ display->puts_scroll(0, 3+!statusbar, option);
+ else
+ display->putsxy(LCD_WIDTH-w-12, 32, option);
+
+ /* Displays the third line of text */
+ option=(unsigned char *)option_select_get_text(qs->bottom_option, buffer,
+ sizeof buffer);
+ title=(unsigned char *)qs->bottom_option->title;
+
+ display->getstringsize(title, &w, NULL);
+ if(w > LCD_WIDTH)
+ display->puts_scroll(0, 4+!statusbar, line_text);
+ else
+ display->putsxy(LCD_WIDTH/2-w/2, 40, title);
+
+ display->getstringsize(option, &w, NULL);
+ if(w > LCD_WIDTH)
+ display->puts_scroll(0, 5+!statusbar, option);
+ else
+ display->putsxy(LCD_WIDTH/2-w/2, 48, option);
+ display->mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], LCD_WIDTH/2-4, 56, 7, 8);
gui_textarea_update(display);
display->setfont(FONT_UI);
@@ -127,14 +152,18 @@ bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button)
option_select_next(qs->right_option);
return(true);
+#ifdef QUICKSCREEN_BOTTOM_INV
case QUICKSCREEN_BOTTOM_INV :
case QUICKSCREEN_BOTTOM_INV | BUTTON_REPEAT :
+#endif
#ifdef QUICKSCREEN_RC_BOTTOM_INV
case QUICKSCREEN_RC_BOTTOM_INV :
case QUICKSCREEN_RC_BOTTOM_INV | BUTTON_REPEAT :
#endif
+#if defined(QUICKSCREEN_RC_BOTTOM_INV) || defined(QUICKSCREEN_BOTTOM_INV)
option_select_prev(qs->bottom_option);
return(true);
+#endif
}
return(false);
}
diff --git a/apps/gui/quickscreen.h b/apps/gui/quickscreen.h
index fdbe4db..e6e04c9 100644
--- a/apps/gui/quickscreen.h
+++ b/apps/gui/quickscreen.h
@@ -19,7 +19,8 @@
#include "button.h"
#include "config.h"
#if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == IRIVER_H100_PAD) ||\
- (CONFIG_KEYPAD == IRIVER_H300_PAD)
+ (CONFIG_KEYPAD == IRIVER_H300_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD) ||\
+ (CONFIG_KEYPAD == IPOD_3G_PAD)
#ifndef _GUI_QUICKSCREEN_H_
#define _GUI_QUICKSCREEN_H_
@@ -30,14 +31,21 @@
#include "screen_access.h"
#define QUICKSCREEN_LEFT BUTTON_LEFT
-#define QUICKSCREEN_BOTTOM BUTTON_DOWN
-#define QUICKSCREEN_BOTTOM_INV BUTTON_UP
#define QUICKSCREEN_RIGHT BUTTON_RIGHT
+#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) ||\
+ (CONFIG_KEYPAD == RECORDER_PAD)
+#define QUICKSCREEN_BOTTOM BUTTON_DOWN
+#define QUICKSCREEN_BOTTOM_INV BUTTON_UP
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD)
+#define QUICKSCREEN_BOTTOM BUTTON_PLAY
+#define QUICKSCREEN_QUIT BUTTON_MENU
+#define QUICKSCREEN_QUIT2 BUTTON_SELECT
+#endif
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
-#define QUICKSCREEN_QUIT BUTTON_MODE
-#define QUICKSCREEN_QUIT2 BUTTON_OFF
+#define QUICKSCREEN_QUIT BUTTON_MODE
+#define QUICKSCREEN_QUIT2 BUTTON_OFF
#define QUICKSCREEN_RC_QUIT BUTTON_RC_MODE
#ifdef CONFIG_REMOTE_KEYPAD
#define QUICKSCREEN_RC_LEFT BUTTON_RC_REW