(svn r999) New icons for the network interface, newgrf gui and the tiny euro

This commit is contained in:
dominik 2004-12-09 23:16:52 +00:00
parent 02bf3ed5c0
commit 416e2b67b1
7 changed files with 34 additions and 15 deletions

Binary file not shown.

View File

@ -122,14 +122,23 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
SetDParam(1, cur_item->info.clients_max);
DrawString(135, y, STR_NETWORK_CLIENTS_ONLINE, 2);
// draw red or green icon, depending on compatibility with server. TODO: needs new icons
DrawSprite((SPR_OPENTTD_BASE + 10) | (compatible?0x30d8000:0x30b8000), 185, y);
// draw red or green flag, to show if the server is password protected. TODO: needs new icons
DrawSprite((cur_item->info.use_password)? 0xC12 : 0xC13, 195, y);
// only draw icons if the server is online
if(cur_item->online) {
cur_item = cur_item->next;
y += NET_PRC__SIZE_OF_ROW;
if (++n == w->vscroll.cap) { break;} // max number of games in the window
// draw a lock if the server is password protected.
if(cur_item->info.use_password)
DrawSprite(SPR_LOCK, 186, y-1);
// draw red or green icon, depending on compatibility with server.
DrawSprite(SPR_BLOT | (compatible?0x30d8000:0x30b8000), 195, y);
// draw flag according to server language
DrawSprite(SPR_FLAGS_BASE + cur_item->info.server_lang, 206, y);
cur_item = cur_item->next;
y += NET_PRC__SIZE_OF_ROW;
if (++n == w->vscroll.cap) { break;} // max number of games in the window
}
}
}

View File

@ -1035,7 +1035,7 @@ static void NewgrfWndProc(Window *w, WindowEvent *e)
if(h) GfxFillRect(1, y + 1, 267, y + 12, 156);
// XXX - will be grf name later
DoDrawString(c->filename, 25, y + 2, h ? 0xC : 0x10);
DrawSprite(SPRITE_PALETTE(0x2EB | 0x30b8000), 5, y + 3);
DrawSprite(SPRITE_PALETTE(SPR_SQUARE | 0x30b8000), 5, y + 2);
y += NEWGRF_WND_PROC_ROWSIZE;
}

View File

@ -748,12 +748,13 @@ static const char * const _cached_filenames[4] = {
"cached_sprites.xx3",
};
#define OPENTTD_SPRITES_COUNT 70
#define OPENTTD_SPRITES_COUNT 93
static const uint16 _openttd_grf_indexes[] = {
SPR_OPENTTD_BASE+0, SPR_OPENTTD_BASE+7, // icons etc
134, 134, // euro symbol medium size
582, 582, // euro symbol large size
SPR_OPENTTD_BASE+10, SPR_OPENTTD_BASE+57, // more icons
134, 134, // euro symbol medium size
582, 582, // euro symbol large size
358, 358, // euro symbol tiny
SPR_OPENTTD_BASE+11, SPR_OPENTTD_BASE+57, // more icons
648, 648, // nordic char: æ
616, 616, // nordic char: Æ
666, 666, // nordic char: Ø

View File

@ -46,7 +46,16 @@ enum Sprites {
SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
SPR_OPENTTD_BASE = SPR_SLOPES_BASE + 74, //5270
SPR_BLOT = SPR_OPENTTD_BASE + 10, // used as vehicle profit marker
SPR_BLOT = SPR_OPENTTD_BASE + 32, // colored circle (mainly used as vehicle profit marker and for sever compatibility)
SPR_PIN_UP = SPR_OPENTTD_BASE + 62, // pin icon
SPR_PIN_DOWN = SPR_OPENTTD_BASE + 63,
/* Network GUI sprites */
SPR_SQUARE = SPR_OPENTTD_BASE + 23, // colored square (used for newgrf compatibility)
SPR_LOCK = SPR_OPENTTD_BASE + 22, // lock icon (for password protected servers)
SPR_FLAGS_BASE = SPR_OPENTTD_BASE + 90, // start of the flags block (in same order as enum NetworkLanguage)
/* Manager face sprites */
SPR_GRADIENT = 874, // background gradient behind manager face

View File

@ -135,7 +135,7 @@ static void TownAuthorityWndProc(Window *w, WindowEvent *e)
*/
SetDParam((IS_HUMAN_PLAYER(p->index) ? 4 : 3), str);
if (t->exclusivity == p->index) // red icon for player with exclusive rights
DrawSprite((SPR_OPENTTD_BASE + 10) | 0x30b8000, 18, y);
DrawSprite((SPR_BLOT) | 0x30b8000, 18, y);
DrawString(28, y, STR_2024, 0);
y+=10;

View File

@ -52,7 +52,7 @@ void DrawVehicleProfitButton(Vehicle *v, int x, int y)
ormod = 0x30a8000; // yellow
else
ormod = 0x30d8000; // green
DrawSprite((SPR_OPENTTD_BASE + 10) | ormod, x, y);
DrawSprite((SPR_BLOT) | ormod, x, y);
}
/************ Sorter functions *****************/