src/graph_gui.cpp
changeset 9273 35e0224ea8f1
parent 9255 e9877474e173
child 9289 df7b2e2f18a1
equal deleted inserted replaced
9272:e64b518a7b54 9273:35e0224ea8f1
   283 
   283 
   284 				SetBit(_legend_excluded_players, p->index);
   284 				SetBit(_legend_excluded_players, p->index);
   285 				w->RaiseWidget(p->index + 3);
   285 				w->RaiseWidget(p->index + 3);
   286 			}
   286 			}
   287 
   287 
   288 			DrawWindowWidgets(w);
   288 			w->DrawWidgets();
   289 
   289 
   290 			FOR_ALL_PLAYERS(p) {
   290 			FOR_ALL_PLAYERS(p) {
   291 				if (!p->is_active) continue;
   291 				if (!p->is_active) continue;
   292 
   292 
   293 				DrawPlayerIcon(p->index, 4, 18 + p->index * 12);
   293 				DrawPlayerIcon(p->index, 4, 18 + p->index * 12);
   382 	switch (e->event) {
   382 	switch (e->event) {
   383 		case WE_PAINT: {
   383 		case WE_PAINT: {
   384 			GraphDrawer gd;
   384 			GraphDrawer gd;
   385 			const Player* p;
   385 			const Player* p;
   386 
   386 
   387 			DrawWindowWidgets(w);
   387 			w->DrawWidgets();
   388 
   388 
   389 			gd.left = 2;
   389 			gd.left = 2;
   390 			gd.top = 18;
   390 			gd.top = 18;
   391 			gd.height = 136;
   391 			gd.height = 136;
   392 			gd.has_negative_values = true;
   392 			gd.has_negative_values = true;
   453 	switch (e->event) {
   453 	switch (e->event) {
   454 		case WE_PAINT: {
   454 		case WE_PAINT: {
   455 			GraphDrawer gd;
   455 			GraphDrawer gd;
   456 			const Player* p;
   456 			const Player* p;
   457 
   457 
   458 			DrawWindowWidgets(w);
   458 			w->DrawWidgets();
   459 
   459 
   460 			gd.left = 2;
   460 			gd.left = 2;
   461 			gd.top = 18;
   461 			gd.top = 18;
   462 			gd.height = 104;
   462 			gd.height = 104;
   463 			gd.has_negative_values = false;
   463 			gd.has_negative_values = false;
   520 	switch (e->event) {
   520 	switch (e->event) {
   521 		case WE_PAINT: {
   521 		case WE_PAINT: {
   522 			GraphDrawer gd;
   522 			GraphDrawer gd;
   523 			const Player* p;
   523 			const Player* p;
   524 
   524 
   525 			DrawWindowWidgets(w);
   525 			w->DrawWidgets();
   526 
   526 
   527 			gd.left = 2;
   527 			gd.left = 2;
   528 			gd.top = 18;
   528 			gd.top = 18;
   529 			gd.height = 104;
   529 			gd.height = 104;
   530 			gd.has_negative_values = false;
   530 			gd.has_negative_values = false;
   587 	switch (e->event) {
   587 	switch (e->event) {
   588 		case WE_PAINT: {
   588 		case WE_PAINT: {
   589 			GraphDrawer gd;
   589 			GraphDrawer gd;
   590 			const Player* p;
   590 			const Player* p;
   591 
   591 
   592 			DrawWindowWidgets(w);
   592 			w->DrawWidgets();
   593 
   593 
   594 			gd.left = 2;
   594 			gd.left = 2;
   595 			gd.top = 18;
   595 			gd.top = 18;
   596 			gd.height = 200;
   596 			gd.height = 200;
   597 			gd.has_negative_values = false;
   597 			gd.has_negative_values = false;
   656 	switch (e->event) {
   656 	switch (e->event) {
   657 		case WE_PAINT: {
   657 		case WE_PAINT: {
   658 			GraphDrawer gd;
   658 			GraphDrawer gd;
   659 			const Player* p;
   659 			const Player* p;
   660 
   660 
   661 			DrawWindowWidgets(w);
   661 			w->DrawWidgets();
   662 
   662 
   663 			gd.left = 2;
   663 			gd.left = 2;
   664 			gd.top = 18;
   664 			gd.top = 18;
   665 			gd.height = 200;
   665 			gd.height = 200;
   666 			gd.has_negative_values = false;
   666 			gd.has_negative_values = false;
   722 {
   722 {
   723 	switch (e->event) {
   723 	switch (e->event) {
   724 		case WE_PAINT: {
   724 		case WE_PAINT: {
   725 			GraphDrawer gd;
   725 			GraphDrawer gd;
   726 
   726 
   727 			DrawWindowWidgets(w);
   727 			w->DrawWidgets();
   728 
   728 
   729 			int x = 495;
   729 			int x = 495;
   730 			int y = 24;
   730 			int y = 24;
   731 
   731 
   732 			gd.excluded_data = _legend_excluded_cargo;
   732 			gd.excluded_data = _legend_excluded_cargo;
   884 	switch (e->event) {
   884 	switch (e->event) {
   885 		case WE_PAINT: {
   885 		case WE_PAINT: {
   886 			const Player* plist[MAX_PLAYERS];
   886 			const Player* plist[MAX_PLAYERS];
   887 			const Player* p;
   887 			const Player* p;
   888 
   888 
   889 			DrawWindowWidgets(w);
   889 			w->DrawWidgets();
   890 
   890 
   891 			uint pl_num = 0;
   891 			uint pl_num = 0;
   892 			FOR_ALL_PLAYERS(p) if (p->is_active) plist[pl_num++] = p;
   892 			FOR_ALL_PLAYERS(p) if (p->is_active) plist[pl_num++] = p;
   893 
   893 
   894 			qsort((void*)plist, pl_num, sizeof(*plist), PerfHistComp);
   894 			qsort((void*)plist, pl_num, sizeof(*plist), PerfHistComp);
   971 		uint16 y = 14;
   971 		uint16 y = 14;
   972 		int total_score = 0;
   972 		int total_score = 0;
   973 		int color_done, color_notdone;
   973 		int color_done, color_notdone;
   974 
   974 
   975 		/* Draw standard stuff */
   975 		/* Draw standard stuff */
   976 		DrawWindowWidgets(this);
   976 		this->DrawWidgets();
   977 
   977 
   978 		/* Check if the currently selected player is still active. */
   978 		/* Check if the currently selected player is still active. */
   979 		if (player == INVALID_PLAYER || !GetPlayer(player)->is_active) {
   979 		if (player == INVALID_PLAYER || !GetPlayer(player)->is_active) {
   980 			if (player != INVALID_PLAYER) {
   980 			if (player != INVALID_PLAYER) {
   981 				/* Raise and disable the widget for the previous selection. */
   981 				/* Raise and disable the widget for the previous selection. */