summaryrefslogtreecommitdiff
path: root/apps/recorder/recording.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-09-27 15:42:55 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-09-27 15:42:55 +0000
commitf3b015f73b29f2d3514c32a9b8b8f0338b52e358 (patch)
tree65e1694745947a9a7d673811d12155f3b2a03019 /apps/recorder/recording.c
parent5353473b723749a7cd92d72e94423b74058287dc (diff)
downloadrockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.tar.gz
rockbox-f3b015f73b29f2d3514c32a9b8b8f0338b52e358.zip
FS#7808 by Tom Ross, Ken Fazzone and me, with help from Antoine Cellerier.
Add two new line selector types: solid colour and gradient. Solid colour only uses the primary colour setting. The secondary colour setting is used for the gradient. Text colour for the selected item is also changeable. These new settings are a bit controversial so they may be removed later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14868 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r--apps/recorder/recording.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index f643b8442a..bd04d26929 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -857,6 +857,16 @@ bool recording_screen(bool no_source)
857 ID2P(LANG_GIGABYTE) 857 ID2P(LANG_GIGABYTE)
858 }; 858 };
859 859
860 int style = STYLE_INVERT;
861#ifdef HAVE_LCD_COLOR
862 if (global_settings.cursor_style == 2) {
863 style |= STYLE_COLORBAR;
864 }
865 else if (global_settings.cursor_style == 3) {
866 style |= STYLE_GRADIENT;
867 }
868#endif
869
860 struct audio_recording_options rec_options; 870 struct audio_recording_options rec_options;
861 if (check_dir(global_settings.rec_directory) == false) 871 if (check_dir(global_settings.rec_directory) == false)
862 { 872 {
@@ -930,7 +940,7 @@ bool recording_screen(bool no_source)
930 { 940 {
931 screens[i].setfont(FONT_SYSFIXED); 941 screens[i].setfont(FONT_SYSFIXED);
932 screens[i].getstringsize("M", &w, &h); 942 screens[i].getstringsize("M", &w, &h);
933 screens[i].setmargins(global_settings.invert_cursor ? 0 : w, 8); 943 screens[i].setmargins(global_settings.cursor_style ? 0 : w, 8);
934 filename_offset[i] = ((screens[i].height >= 80) ? 1 : 0); 944 filename_offset[i] = ((screens[i].height >= 80) ? 1 : 0);
935 pm_y[i] = 8 + h * (2 + filename_offset[i]); 945 pm_y[i] = 8 + h * (2 + filename_offset[i]);
936 } 946 }
@@ -1331,7 +1341,7 @@ bool recording_screen(bool no_source)
1331 { 1341 {
1332 screens[i].setfont(FONT_SYSFIXED); 1342 screens[i].setfont(FONT_SYSFIXED);
1333 screens[i].setmargins( 1343 screens[i].setmargins(
1334 global_settings.invert_cursor ? 0 : w, 8); 1344 global_settings.cursor_style ? 0 : w, 8);
1335 } 1345 }
1336 } 1346 }
1337 } 1347 }
@@ -1555,11 +1565,11 @@ bool recording_screen(bool no_source)
1555 global_settings.volume, 1565 global_settings.volume,
1556 buf2, sizeof(buf2))); 1566 buf2, sizeof(buf2)));
1557 1567
1558 if (global_settings.invert_cursor && (pos++ == cursor)) 1568 if (global_settings.cursor_style && (pos++ == cursor))
1559 { 1569 {
1560 for(i = 0; i < screen_update; i++) 1570 for(i = 0; i < screen_update; i++)
1561 screens[i].puts_style_offset(0, filename_offset[i] + 1571 screens[i].puts_style_offset(0, filename_offset[i] +
1562 PM_HEIGHT + 2, buf, STYLE_INVERT,0); 1572 PM_HEIGHT + 2, buf, style,0);
1563 } 1573 }
1564 else 1574 else
1565 { 1575 {
@@ -1574,11 +1584,11 @@ bool recording_screen(bool no_source)
1574 fmt_gain(SOUND_MIC_GAIN, 1584 fmt_gain(SOUND_MIC_GAIN,
1575 global_settings.rec_mic_gain, 1585 global_settings.rec_mic_gain,
1576 buf2, sizeof(buf2))); 1586 buf2, sizeof(buf2)));
1577 if(global_settings.invert_cursor && ((1==cursor)||(2==cursor))) 1587 if(global_settings.cursor_style && ((1==cursor)||(2==cursor)))
1578 { 1588 {
1579 for(i = 0; i < screen_update; i++) 1589 for(i = 0; i < screen_update; i++)
1580 screens[i].puts_style_offset(0, filename_offset[i] + 1590 screens[i].puts_style_offset(0, filename_offset[i] +
1581 PM_HEIGHT + 3, buf, STYLE_INVERT,0); 1591 PM_HEIGHT + 3, buf, style,0);
1582 } 1592 }
1583 else 1593 else
1584 { 1594 {
@@ -1598,11 +1608,11 @@ bool recording_screen(bool no_source)
1598 fmt_gain(SOUND_LEFT_GAIN, 1608 fmt_gain(SOUND_LEFT_GAIN,
1599 global_settings.rec_left_gain, 1609 global_settings.rec_left_gain,
1600 buf2, sizeof(buf2))); 1610 buf2, sizeof(buf2)));
1601 if(global_settings.invert_cursor && ((1==cursor)||(2==cursor))) 1611 if(global_settings.cursor_style && ((1==cursor)||(2==cursor)))
1602 { 1612 {
1603 for(i = 0; i < screen_update; i++) 1613 for(i = 0; i < screen_update; i++)
1604 screens[i].puts_style_offset(0, filename_offset[i] + 1614 screens[i].puts_style_offset(0, filename_offset[i] +
1605 PM_HEIGHT + 3, buf, STYLE_INVERT,0); 1615 PM_HEIGHT + 3, buf, style,0);
1606 } 1616 }
1607 else 1617 else
1608 { 1618 {
@@ -1616,11 +1626,11 @@ bool recording_screen(bool no_source)
1616 fmt_gain(SOUND_RIGHT_GAIN, 1626 fmt_gain(SOUND_RIGHT_GAIN,
1617 global_settings.rec_right_gain, 1627 global_settings.rec_right_gain,
1618 buf2, sizeof(buf2))); 1628 buf2, sizeof(buf2)));
1619 if(global_settings.invert_cursor && ((1==cursor)||(3==cursor))) 1629 if(global_settings.cursor_style && ((1==cursor)||(3==cursor)))
1620 { 1630 {
1621 for(i = 0; i < screen_update; i++) 1631 for(i = 0; i < screen_update; i++)
1622 screens[i].puts_style_offset(0, filename_offset[i] + 1632 screens[i].puts_style_offset(0, filename_offset[i] +
1623 PM_HEIGHT + 4, buf, STYLE_INVERT,0); 1633 PM_HEIGHT + 4, buf, style,0);
1624 } 1634 }
1625 else 1635 else
1626 { 1636 {
@@ -1701,11 +1711,11 @@ bool recording_screen(bool no_source)
1701 global_settings.rec_right_gain)/2, 1711 global_settings.rec_right_gain)/2,
1702 buf2, sizeof(buf2))); 1712 buf2, sizeof(buf2)));
1703 1713
1704 if(global_settings.invert_cursor && ((cursor==4) || (cursor==5))) 1714 if(global_settings.cursor_style && ((cursor==4) || (cursor==5)))
1705 { 1715 {
1706 for(i = 0; i < screen_update; i++) 1716 for(i = 0; i < screen_update; i++)
1707 screens[i].puts_style_offset(0, filename_offset[i] + 1717 screens[i].puts_style_offset(0, filename_offset[i] +
1708 PM_HEIGHT + line[i], buf, STYLE_INVERT,0); 1718 PM_HEIGHT + line[i], buf, style,0);
1709 } 1719 }
1710 else if ( 1720 else if (
1711 global_settings.rec_source == AUDIO_SRC_MIC 1721 global_settings.rec_source == AUDIO_SRC_MIC
@@ -1737,7 +1747,7 @@ bool recording_screen(bool no_source)
1737 } 1747 }
1738#endif /* HAVE_AGC */ 1748#endif /* HAVE_AGC */
1739 1749
1740 if(!global_settings.invert_cursor) { 1750 if(!global_settings.cursor_style) {
1741 switch(cursor) 1751 switch(cursor)
1742 { 1752 {
1743 case 1: 1753 case 1: