smallmap_gui.c
changeset 534 306bc86eb23e
parent 507 04b5403aaf6b
child 541 625227bb2a3d
equal deleted inserted replaced
533:404f9e37bff1 534:306bc86eb23e
   796 				if (x + t->sign.width_2 > dpi->left &&
   796 				if (x + t->sign.width_2 > dpi->left &&
   797 						x < dpi->left + dpi->width &&
   797 						x < dpi->left + dpi->width &&
   798 						y + 6 > dpi->top &&
   798 						y + 6 > dpi->top &&
   799 						y < dpi->top + dpi->height) {
   799 						y < dpi->top + dpi->height) {
   800 					// And draw it.
   800 					// And draw it.
   801 					SET_DPARAM16(0, t->index);
   801 					SetDParam(0, t->index);
   802 					DrawString(x, y, STR_2056, 12);
   802 					DrawString(x, y, STR_2056, 12);
   803 				}
   803 				}
   804 			}
   804 			}
   805 		}
   805 		}
   806 	}
   806 	}
   844 		int x,y,y_org;
   844 		int x,y,y_org;
   845 		DrawPixelInfo new_dpi;
   845 		DrawPixelInfo new_dpi;
   846 
   846 
   847 
   847 
   848 		/* draw the window */
   848 		/* draw the window */
   849 		SET_DPARAM16(0, STR_00E5_CONTOURS + _smallmap_type);
   849 		SetDParam(0, STR_00E5_CONTOURS + _smallmap_type);
   850 		DrawWindowWidgets(w);
   850 		DrawWindowWidgets(w);
   851 
   851 
   852 		/* draw the legend */
   852 		/* draw the legend */
   853 		tbl = _legend_table[(_smallmap_type != 2) ? _smallmap_type : (_opt.landscape + IND_OFFS)];
   853 		tbl = _legend_table[(_smallmap_type != 2) ? _smallmap_type : (_opt.landscape + IND_OFFS)];
   854 		x = 4;
   854 		x = 4;
  1017 	ViewPort *vp = w->viewport;
  1017 	ViewPort *vp = w->viewport;
  1018 
  1018 
  1019 	switch(e->event) {
  1019 	switch(e->event) {
  1020 	case WE_PAINT: {
  1020 	case WE_PAINT: {
  1021 		// set the number in the title bar
  1021 		// set the number in the title bar
  1022 		SET_DPARAM16(0, (w->window_number+1));
  1022 		SetDParam(0, (w->window_number+1));
  1023 
  1023 
  1024 		DrawWindowWidgets(w);
  1024 		DrawWindowWidgets(w);
  1025 		DrawWindowViewport(w);
  1025 		DrawWindowViewport(w);
  1026 	}	break;
  1026 	}	break;
  1027 	case WE_CLICK: {
  1027 	case WE_CLICK: {