… | |
… | |
68 | x => "center", |
68 | x => "center", |
69 | y => "center", |
69 | y => "center", |
70 | has_close_button => 1, |
70 | has_close_button => 1, |
71 | on_delete => sub { shift->hide }, |
71 | on_delete => sub { shift->hide }, |
72 | on_visibility_change => sub { |
72 | on_visibility_change => sub { |
73 | warn "VCHANGE <@_>\n";#d# |
|
|
74 | $_[0]{visibility} = $_[1]; |
73 | $_[0]{visibility} = $_[1]; |
75 | update_worldmap $_[0]{ws} if $_[1]; |
74 | update_worldmap $_[0]{ws} if $_[1]; |
76 | }, |
75 | }, |
77 | ); |
76 | ); |
78 | |
77 | |
… | |
… | |
106 | cf::override 1; |
105 | cf::override 1; |
107 | }, |
106 | }, |
108 | ; |
107 | ; |
109 | |
108 | |
110 | cf::async_ext { |
109 | cf::async_ext { |
|
|
110 | $Coro::current->{desc} = "worldmap updater"; |
111 | my $schedule_interval = Coro::Event->timer (after => 1); |
111 | my $schedule_interval = Coro::Event->timer (after => 1, data => cf::WF_AUTOCANCEL); |
112 | |
112 | |
113 | while () { |
113 | while () { |
114 | $schedule_interval->interval ($WORLDMAP_UPDATE_INTERVAL); |
114 | $schedule_interval->interval ($WORLDMAP_UPDATE_INTERVAL); |
115 | $schedule_interval->next; |
115 | $schedule_interval->next; |
116 | |
116 | |