equal
deleted
inserted
replaced
222 { |
222 { |
223 const Player* p; |
223 const Player* p; |
224 |
224 |
225 switch (e->event) { |
225 switch (e->event) { |
226 case WE_CREATE: { |
226 case WE_CREATE: { |
227 int i; |
227 uint i; |
228 for (i = 0; w->widget[i + 3].type != WWT_LAST; i++) { |
228 for (i = 3; i < w->widget_count; i++) { |
229 if (!HASBIT(_legend_excludebits, i)) LowerWindowWidget(w, i + 3); |
229 if (!HASBIT(_legend_excludebits, i - 3)) LowerWindowWidget(w, i); |
230 } |
230 } |
231 break; |
231 break; |
232 } |
232 } |
233 |
233 |
234 case WE_PAINT: |
234 case WE_PAINT: |
703 |
703 |
704 static void CargoPaymentRatesWndProc(Window *w, WindowEvent *e) |
704 static void CargoPaymentRatesWndProc(Window *w, WindowEvent *e) |
705 { |
705 { |
706 switch (e->event) { |
706 switch (e->event) { |
707 case WE_CREATE: { |
707 case WE_CREATE: { |
708 int i; |
708 uint i; |
709 for (i = 0; w->widget[i + 3].type != WWT_LAST; i++) { |
709 for (i = 3; i < w->widget_count; i++) { |
710 if (!HASBIT(_legend_cargobits, i)) LowerWindowWidget(w, i + 3); |
710 if (!HASBIT(_legend_cargobits, i - 3)) LowerWindowWidget(w, i); |
711 } |
711 } |
712 break; |
712 break; |
713 } |
713 } |
714 |
714 |
715 case WE_PAINT: { |
715 case WE_PAINT: { |