src/news_gui.cpp
changeset 6523 d41352ca5c1e
parent 6144 5a0ffbf27ced
child 6535 1a5437f36d78
equal deleted inserted replaced
6522:bf0da9f42953 6523:d41352ca5c1e
   133 				DrawStringRightAligned(428, 1, STR_01FF, 0);
   133 				DrawStringRightAligned(428, 1, STR_01FF, 0);
   134 
   134 
   135 				if (!(ni->flags & NF_VIEWPORT)) {
   135 				if (!(ni->flags & NF_VIEWPORT)) {
   136 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   136 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   137 					DrawStringMultiCenter(215, ni->display_mode == NM_NORMAL ? 76 : 56,
   137 					DrawStringMultiCenter(215, ni->display_mode == NM_NORMAL ? 76 : 56,
   138 						ni->string_id, 426);
   138 						ni->string_id, w->width - 4);
   139 				} else {
   139 				} else {
   140 					byte bk = _display_opt;
   140 					byte bk = _display_opt;
   141 					_display_opt &= ~DO_TRANS_BUILDINGS;
   141 					_display_opt &= ~DO_TRANS_BUILDINGS;
   142 					DrawWindowViewport(w);
   142 					DrawWindowViewport(w);
   143 					_display_opt = bk;
   143 					_display_opt = bk;
   148 						vp->left - w->left + vp->width - 1, vp->top - w->top + vp->height - 1,
   148 						vp->left - w->left + vp->width - 1, vp->top - w->top + vp->height - 1,
   149 						(ni->flags & NF_INCOLOR ? PALETTE_TO_TRANSPARENT : PALETTE_TO_STRUCT_GREY) | (1 << USE_COLORTABLE)
   149 						(ni->flags & NF_INCOLOR ? PALETTE_TO_TRANSPARENT : PALETTE_TO_STRUCT_GREY) | (1 << USE_COLORTABLE)
   150 					);
   150 					);
   151 
   151 
   152 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   152 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   153 					DrawStringMultiCenter(w->width / 2, 20, ni->string_id, 428);
   153 					DrawStringMultiCenter(w->width / 2, 20, ni->string_id, w->width - 4);
   154 				}
   154 				}
   155 				break;
   155 				break;
   156 			}
   156 			}
   157 
   157 
   158 			case NM_CALLBACK: {
   158 			case NM_CALLBACK: {
   166 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   166 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   167 					DrawStringMultiCenter(140, 38, ni->string_id, 276);
   167 					DrawStringMultiCenter(140, 38, ni->string_id, 276);
   168 				} else {
   168 				} else {
   169 					DrawWindowViewport(w);
   169 					DrawWindowViewport(w);
   170 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   170 					COPY_IN_DPARAM(0, ni->params, lengthof(ni->params));
   171 					DrawStringMultiCenter(w->width / 2, w->height - 16, ni->string_id, 276);
   171 					DrawStringMultiCenter(w->width / 2, w->height - 16, ni->string_id, w->width - 4);
   172 				}
   172 				}
   173 				break;
   173 				break;
   174 			}
   174 			}
   175 		}
   175 		}
   176 	} break;
   176 	} break;