src/graph_gui.cpp
branchcpp_gui
changeset 6241 6a7a41b0cd32
parent 6235 5077e6ed3788
child 6246 2a4c2c4d66f0
equal deleted inserted replaced
6240:8d4ea2d6befc 6241:6a7a41b0cd32
   261 			if (!p->is_active) {
   261 			if (!p->is_active) {
   262 				SETBIT(_legend_excluded_players, p->index);
   262 				SETBIT(_legend_excluded_players, p->index);
   263 				RaiseWindowWidget(w, p->index + 3);
   263 				RaiseWindowWidget(w, p->index + 3);
   264 			}
   264 			}
   265 		}
   265 		}
   266 		DrawWindowWidgets(w);
   266 		w->DrawWidgets();
   267 
   267 
   268 		FOR_ALL_PLAYERS(p) {
   268 		FOR_ALL_PLAYERS(p) {
   269 			if (!p->is_active) continue;
   269 			if (!p->is_active) continue;
   270 
   270 
   271 			DrawPlayerIcon(p->index, 4, 18+p->index*12);
   271 			DrawPlayerIcon(p->index, 4, 18+p->index*12);
   362 		GraphDrawer gd;
   362 		GraphDrawer gd;
   363 		const Player* p;
   363 		const Player* p;
   364 		int i,j;
   364 		int i,j;
   365 		int numd;
   365 		int numd;
   366 
   366 
   367 		DrawWindowWidgets(w);
   367 		w->DrawWidgets();
   368 
   368 
   369 		gd.left = 2;
   369 		gd.left = 2;
   370 		gd.top = 18;
   370 		gd.top = 18;
   371 		gd.height = 136;
   371 		gd.height = 136;
   372 		gd.has_negative_values = true;
   372 		gd.has_negative_values = true;
   433 		GraphDrawer gd;
   433 		GraphDrawer gd;
   434 		const Player* p;
   434 		const Player* p;
   435 		int i,j;
   435 		int i,j;
   436 		int numd;
   436 		int numd;
   437 
   437 
   438 		DrawWindowWidgets(w);
   438 		w->DrawWidgets();
   439 
   439 
   440 		gd.left = 2;
   440 		gd.left = 2;
   441 		gd.top = 18;
   441 		gd.top = 18;
   442 		gd.height = 104;
   442 		gd.height = 104;
   443 		gd.has_negative_values = false;
   443 		gd.has_negative_values = false;
   503 		GraphDrawer gd;
   503 		GraphDrawer gd;
   504 		const Player* p;
   504 		const Player* p;
   505 		int i,j;
   505 		int i,j;
   506 		int numd;
   506 		int numd;
   507 
   507 
   508 		DrawWindowWidgets(w);
   508 		w->DrawWidgets();
   509 
   509 
   510 		gd.left = 2;
   510 		gd.left = 2;
   511 		gd.top = 18;
   511 		gd.top = 18;
   512 		gd.height = 104;
   512 		gd.height = 104;
   513 		gd.has_negative_values = false;
   513 		gd.has_negative_values = false;
   573 		GraphDrawer gd;
   573 		GraphDrawer gd;
   574 		const Player* p;
   574 		const Player* p;
   575 		int i,j;
   575 		int i,j;
   576 		int numd;
   576 		int numd;
   577 
   577 
   578 		DrawWindowWidgets(w);
   578 		w->DrawWidgets();
   579 
   579 
   580 		gd.left = 2;
   580 		gd.left = 2;
   581 		gd.top = 18;
   581 		gd.top = 18;
   582 		gd.height = 200;
   582 		gd.height = 200;
   583 		gd.has_negative_values = false;
   583 		gd.has_negative_values = false;
   646 		GraphDrawer gd;
   646 		GraphDrawer gd;
   647 		const Player* p;
   647 		const Player* p;
   648 		int i,j;
   648 		int i,j;
   649 		int numd;
   649 		int numd;
   650 
   650 
   651 		DrawWindowWidgets(w);
   651 		w->DrawWidgets();
   652 
   652 
   653 		gd.left = 2;
   653 		gd.left = 2;
   654 		gd.top = 18;
   654 		gd.top = 18;
   655 		gd.height = 200;
   655 		gd.height = 200;
   656 		gd.has_negative_values = false;
   656 		gd.has_negative_values = false;
   723 	case WE_PAINT: {
   723 	case WE_PAINT: {
   724 		int j, x, y;
   724 		int j, x, y;
   725 		CargoID i;
   725 		CargoID i;
   726 		GraphDrawer gd;
   726 		GraphDrawer gd;
   727 
   727 
   728 		DrawWindowWidgets(w);
   728 		w->DrawWidgets();
   729 
   729 
   730 		x = 495;
   730 		x = 495;
   731 		y = 24;
   731 		y = 24;
   732 
   732 
   733 		gd.excluded_data = _legend_excluded_cargo;
   733 		gd.excluded_data = _legend_excluded_cargo;
   857 			const Player* plist[MAX_PLAYERS];
   857 			const Player* plist[MAX_PLAYERS];
   858 			const Player* p;
   858 			const Player* p;
   859 			uint pl_num;
   859 			uint pl_num;
   860 			uint i;
   860 			uint i;
   861 
   861 
   862 			DrawWindowWidgets(w);
   862 			w->DrawWidgets();
   863 
   863 
   864 			pl_num = 0;
   864 			pl_num = 0;
   865 			FOR_ALL_PLAYERS(p) if (p->is_active) plist[pl_num++] = p;
   865 			FOR_ALL_PLAYERS(p) if (p->is_active) plist[pl_num++] = p;
   866 
   866 
   867 			qsort((void*)plist, pl_num, sizeof(*plist), PerfHistComp);
   867 			qsort((void*)plist, pl_num, sizeof(*plist), PerfHistComp);
   919 			uint16 y = 14;
   919 			uint16 y = 14;
   920 			int total_score = 0;
   920 			int total_score = 0;
   921 			int color_done, color_notdone;
   921 			int color_done, color_notdone;
   922 
   922 
   923 			// Draw standard stuff
   923 			// Draw standard stuff
   924 			DrawWindowWidgets(w);
   924 			w->DrawWidgets();
   925 
   925 
   926 			/* Check if the currently selected player is still active. */
   926 			/* Check if the currently selected player is still active. */
   927 			if (_performance_rating_detail_player == INVALID_PLAYER || !GetPlayer(_performance_rating_detail_player)->is_active) {
   927 			if (_performance_rating_detail_player == INVALID_PLAYER || !GetPlayer(_performance_rating_detail_player)->is_active) {
   928 				if (_performance_rating_detail_player != INVALID_PLAYER) {
   928 				if (_performance_rating_detail_player != INVALID_PLAYER) {
   929 					/* Raise and disable the widget for the previous selection. */
   929 					/* Raise and disable the widget for the previous selection. */