equal
deleted
inserted
replaced
190 if (!IS_INT_INSIDE(y, 0, 5)) return; |
190 if (!IS_INT_INSIDE(y, 0, 5)) return; |
191 |
191 |
192 y = GetNthSetBit(GetMaskOfTownActions(NULL, _local_player, t), y + w->vscroll.pos - 1); |
192 y = GetNthSetBit(GetMaskOfTownActions(NULL, _local_player, t), y + w->vscroll.pos - 1); |
193 if (y >= 0) { |
193 if (y >= 0) { |
194 WP(w,def_d).data_1 = y; |
194 WP(w,def_d).data_1 = y; |
195 SetWindowDirty(w); |
195 w->SetDirty(); |
196 } |
196 } |
197 break; |
197 break; |
198 } |
198 } |
199 |
199 |
200 case 6: { /* carry out the action */ |
200 case 6: { /* carry out the action */ |
203 } |
203 } |
204 } |
204 } |
205 break; |
205 break; |
206 |
206 |
207 case WE_4: |
207 case WE_4: |
208 SetWindowDirty(w); |
208 w->SetDirty(); |
209 break; |
209 break; |
210 } |
210 } |
211 } |
211 } |
212 |
212 |
213 static const WindowDesc _town_authority_desc = { |
213 static const WindowDesc _town_authority_desc = { |
464 case WE_CLICK: |
464 case WE_CLICK: |
465 switch (e->we.click.widget) { |
465 switch (e->we.click.widget) { |
466 case 3: { /* Sort by Name ascending/descending */ |
466 case 3: { /* Sort by Name ascending/descending */ |
467 _town_sort_order = (_town_sort_order == 0) ? 1 : 0; |
467 _town_sort_order = (_town_sort_order == 0) ? 1 : 0; |
468 _town_sort_dirty = true; |
468 _town_sort_dirty = true; |
469 SetWindowDirty(w); |
469 w->SetDirty(); |
470 } break; |
470 } break; |
471 |
471 |
472 case 4: { /* Sort by Population ascending/descending */ |
472 case 4: { /* Sort by Population ascending/descending */ |
473 _town_sort_order = (_town_sort_order == 2) ? 3 : 2; |
473 _town_sort_order = (_town_sort_order == 2) ? 3 : 2; |
474 _town_sort_dirty = true; |
474 _town_sort_dirty = true; |
475 SetWindowDirty(w); |
475 w->SetDirty(); |
476 } break; |
476 } break; |
477 |
477 |
478 case 5: { /* Click on Town Matrix */ |
478 case 5: { /* Click on Town Matrix */ |
479 const Town* t; |
479 const Town* t; |
480 |
480 |
493 } |
493 } |
494 } |
494 } |
495 break; |
495 break; |
496 |
496 |
497 case WE_4: |
497 case WE_4: |
498 SetWindowDirty(w); |
498 w->SetDirty(); |
499 break; |
499 break; |
500 |
500 |
501 case WE_RESIZE: |
501 case WE_RESIZE: |
502 w->vscroll.cap += e->we.sizing.diff.y / 10; |
502 w->vscroll.cap += e->we.sizing.diff.y / 10; |
503 break; |
503 break; |