(svn r1598) Feature: Message history now is stickyable and resizeable

The news messages are now precisely cropped according to pixel width to fit optimal into the window.
Introduced a new date format: DATE_TINY, which is ISOish.
This commit is contained in:
dominik
2005-01-22 23:13:20 +00:00
parent 8313879b3c
commit 6027e777c8
4 changed files with 44 additions and 11 deletions

View File

@@ -259,6 +259,17 @@ static byte *FormatMonthAndYear(byte *buff, uint16 number)
return FormatNoCommaNumber(buff, ymd.year + MAX_YEAR_BEGIN_REAL);
}
static byte *FormatTinyDate(byte *buff, uint16 number)
{
const char *src;
YearMonthDay ymd;
ConvertDayToYMD(&ymd, number);
buff += sprintf(buff, " %02i-%02i-%04i", ymd.day, ymd.month + 1, ymd.year + MAX_YEAR_BEGIN_REAL);
return buff;
}
uint GetCurrentCurrencyRate(void)
{
return (&_currency_specs[_opt.currency])->rate;
@@ -478,6 +489,12 @@ static byte *DecodeString(byte *buff, const byte *str)
buff = GetString(buff, str);
} break;
case 0x9E: { // {DATE_TINY}
buff = FormatTinyDate(buff, GetParamUint16());
break;
}
// case 0x88..0x98: // {COLORS}
// case 0xE: // {TINYFONT}
// case 0xF: // {BIGFONT}