equal
deleted
inserted
replaced
165 } |
165 } |
166 |
166 |
167 this->SetWidgetDisabledState(6, this->sel_index == -1); |
167 this->SetWidgetDisabledState(6, this->sel_index == -1); |
168 |
168 |
169 SetDParam(0, this->window_number); |
169 SetDParam(0, this->window_number); |
170 DrawWindowWidgets(this); |
170 this->DrawWidgets(); |
171 |
171 |
172 DrawString(2, 15, STR_2023_TRANSPORT_COMPANY_RATINGS, TC_FROMSTRING); |
172 DrawString(2, 15, STR_2023_TRANSPORT_COMPANY_RATINGS, TC_FROMSTRING); |
173 |
173 |
174 /* Draw list of players */ |
174 /* Draw list of players */ |
175 int y = 25; |
175 int y = 25; |
308 case WE_PAINT: |
308 case WE_PAINT: |
309 /* disable renaming town in network games if you are not the server */ |
309 /* disable renaming town in network games if you are not the server */ |
310 w->SetWidgetDisabledState(TVW_CHANGENAME, _networking && !_network_server); |
310 w->SetWidgetDisabledState(TVW_CHANGENAME, _networking && !_network_server); |
311 |
311 |
312 SetDParam(0, t->index); |
312 SetDParam(0, t->index); |
313 DrawWindowWidgets(w); |
313 w->DrawWidgets(); |
314 |
314 |
315 SetDParam(0, t->population); |
315 SetDParam(0, t->population); |
316 SetDParam(1, t->num_houses); |
316 SetDParam(1, t->num_houses); |
317 DrawString(2, 107, STR_2006_POPULATION, TC_FROMSTRING); |
317 DrawString(2, 107, STR_2006_POPULATION, TC_FROMSTRING); |
318 |
318 |
322 |
322 |
323 SetDParam(0, t->act_mail); |
323 SetDParam(0, t->act_mail); |
324 SetDParam(1, t->max_mail); |
324 SetDParam(1, t->max_mail); |
325 DrawString(2, 127, STR_200E_MAIL_LAST_MONTH_MAX, TC_FROMSTRING); |
325 DrawString(2, 127, STR_200E_MAIL_LAST_MONTH_MAX, TC_FROMSTRING); |
326 |
326 |
327 DrawWindowViewport(w); |
327 w->DrawViewport(); |
328 break; |
328 break; |
329 |
329 |
330 case WE_CLICK: |
330 case WE_CLICK: |
331 switch (e->we.click.widget) { |
331 switch (e->we.click.widget) { |
332 case TVW_CENTERVIEW: /* scroll to location */ |
332 case TVW_CENTERVIEW: /* scroll to location */ |
487 MakeSortedTownList(); |
487 MakeSortedTownList(); |
488 } |
488 } |
489 |
489 |
490 SetVScrollCount(w, _num_town_sort); |
490 SetVScrollCount(w, _num_town_sort); |
491 |
491 |
492 DrawWindowWidgets(w); |
492 w->DrawWidgets(); |
493 DrawSortButtonState(w, (_town_sort_order <= 1) ? TDW_SORTNAME : TDW_SORTPOPULATION, _town_sort_order & 1 ? SBS_DOWN : SBS_UP); |
493 w->DrawSortButtonState((_town_sort_order <= 1) ? TDW_SORTNAME : TDW_SORTPOPULATION, _town_sort_order & 1 ? SBS_DOWN : SBS_UP); |
494 |
494 |
495 { |
495 { |
496 int n = 0; |
496 int n = 0; |
497 uint16 i = w->vscroll.pos; |
497 uint16 i = w->vscroll.pos; |
498 int y = 28; |
498 int y = 28; |
624 |
624 |
625 static void ScenEditTownGenWndProc(Window *w, WindowEvent *e) |
625 static void ScenEditTownGenWndProc(Window *w, WindowEvent *e) |
626 { |
626 { |
627 switch (e->event) { |
627 switch (e->event) { |
628 case WE_PAINT: |
628 case WE_PAINT: |
629 DrawWindowWidgets(w); |
629 w->DrawWidgets(); |
630 break; |
630 break; |
631 |
631 |
632 case WE_CREATE: |
632 case WE_CREATE: |
633 w->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN); |
633 w->LowerWidget(_scengen_town_size + TSEW_SMALLTOWN); |
634 break; |
634 break; |