Progress circle in all menus

This commit is contained in:
bsongis
2011-11-26 22:30:00 +00:00
parent ab5de66405
commit c38cb2e0ff
5 changed files with 9 additions and 9 deletions
+4 -4
View File
@@ -573,7 +573,7 @@ void RlcFile::flush()
}
#define PROGRESS_CIRCLE
void RlcFile::DisplayProgressBar()
void RlcFile::DisplayProgressBar(uint8_t x)
{
if (s_eeDirtyMsk || m_rlc_len || eeprom_buffer_size) {
#if defined (PROGRESS_BAR)
@@ -581,14 +581,14 @@ void RlcFile::DisplayProgressBar()
lcd_filled_rect(2, 1, 125, 5, WHITE);
lcd_filled_rect(3, 2, 123-len, 3);
#elif defined (PROGRESS_CIRCLE)
lcd_filled_rect(x-1, 0, 7, 7, WHITE);
uint8_t len = 200 - (s_eeDirtyMsk ? 200 : min((uint8_t)200, (uint8_t)((m_rlc_len / 4) + (eeprom_buffer_size / 3))));
uint8_t x = 17*FW-3;
lcd_hline(x+1, 1, len >= 50 ? 3 : len / 16);
lcd_hline(x+1, 1, len >= 50 ? 3 : len / 14);
if (len >= 50) lcd_vline(x+4, 2, len >= 100 ? 3 : (len-50) / 17);
if (len >= 100) lcd_hline(x+4, 1+4, len >= 150 ? -3 : -((len-100) / 17));
if (len >= 150) lcd_vline(x, 5, -((len-133) / 17));
#elif defined (PROGRESS_FIXED_CIRCLE)
lcd_square(17*FW-3, 1, 5);
lcd_square(x, 1, 5);
#endif
}
}