ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.126 by root, Wed Dec 26 21:03:21 2007 UTC vs.
Revision 1.131 by root, Thu May 8 19:00:37 2008 UTC

206 ["Statistics\tF2", sub { ::toggle_player_page ($::STATS_PAGE) }], 206 ["Statistics\tF2", sub { ::toggle_player_page ($::STATS_PAGE) }],
207 ["Skills\tF3", sub { ::toggle_player_page ($::SKILL_PAGE) }], 207 ["Skills\tF3", sub { ::toggle_player_page ($::SKILL_PAGE) }],
208 ["Spells…\tF4", sub { ::toggle_player_page ($::SPELL_PAGE) }], 208 ["Spells…\tF4", sub { ::toggle_player_page ($::SPELL_PAGE) }],
209 ["Inventory…\tF5", sub { ::toggle_player_page ($::INVENTORY_PAGE) }], 209 ["Inventory…\tF5", sub { ::toggle_player_page ($::INVENTORY_PAGE) }],
210 ["Setup… \tF9", sub { $::SETUP_DIALOG->toggle_visibility }], 210 ["Setup… \tF9", sub { $::SETUP_DIALOG->toggle_visibility }],
211 ["Server Messages…", sub { $::MESSAGE_WINDOW->toggle_visibility }], 211# ["Server Messages…", sub { $::MESSAGE_WINDOW->toggle_visibility }],
212 [ 212 [
213 $::PICKUP_ENABLE->{state} 213 $::PICKUP_ENABLE->{state}
214 ? "Disable automatic pickup" 214 ? "Disable automatic pickup"
215 : "Enable automatic pickup", 215 : "Enable automatic pickup",
216 sub { $::PICKUP_ENABLE->toggle } 216 sub { $::PICKUP_ENABLE->toggle }
217 ], 217 ],
218 ); 218 );
219 219
220 if ($::CONN && $::CONN->{editor_support}) { 220 if ($::CONN && $::CONN->{editor_support}) {
221 push @items, [ 221# push @items, [
222 "Edit this map <span size='xx-small'>(" . (DC::asxml $::CONN->{map_info}[0]) . ")</span>", 222# "Edit this map <span size='xx-small'>(" . (DC::asxml $::CONN->{map_info}[0]) . ")</span>",
223 \&editor_invoke, 223# \&editor_invoke,
224 ]; 224# ];
225 225
226 for my $type (qw(test name)) { 226 for my $type (qw(test name)) {
227 $::CONN->{editor_support}{type} ne $type 227 $::CONN->{editor_support}{type} ne $type
228 or next; 228 or next;
229 my $server = $::CONN->{editor_support}{"${type}server"} 229 my $server = $::CONN->{editor_support}{"${type}server"}
319 my $mod = $ev->{mod}; 319 my $mod = $ev->{mod};
320 my $sym = $ev->{sym}; 320 my $sym = $ev->{sym};
321 my $uni = $ev->{unicode}; 321 my $uni = $ev->{unicode};
322 322
323 $mod &= DC::KMOD_CTRL | DC::KMOD_ALT | DC::KMOD_SHIFT; 323 $mod &= DC::KMOD_CTRL | DC::KMOD_ALT | DC::KMOD_SHIFT;
324
325 # ignore repeated keypresses
326 return if $self->{last_mod} == $mod && $self->{last_sym} == $sym;
327 $self->{last_mod} = $mod;
328 $self->{last_sym} = $sym;
324 329
325 if ($::CONN && (my $dir = $DIR{(!!($mod & DC::KMOD_ALT)) . ",$sym"})) { 330 if ($::CONN && (my $dir = $DIR{(!!($mod & DC::KMOD_ALT)) . ",$sym"})) {
326 if ($mod & DC::KMOD_SHIFT) { 331 if ($mod & DC::KMOD_SHIFT) {
327 $self->{shft}++; 332 $self->{shft}++;
328 if ($dir->[0] != $self->{fire_dir}) { 333 if ($dir->[0] != $self->{fire_dir}) {
347 352
348 my $res = 0; 353 my $res = 0;
349 my $mod = $ev->{mod}; 354 my $mod = $ev->{mod};
350 my $sym = $ev->{sym}; 355 my $sym = $ev->{sym};
351 356
357 delete $self->{last_mod};
358 delete $self->{last_sym};
359
352 if ($::CFG->{shift_fire_stop}) { 360 if ($::CFG->{shift_fire_stop}) {
353 if (!($mod & DC::KMOD_SHIFT) && delete $self->{shft}) { 361 if (!($mod & DC::KMOD_SHIFT) && delete $self->{shft}) {
354 $::CONN->user_send ("fire_stop"); 362 $::CONN->user_send ("fire_stop");
355 delete $self->{fire_dir}; 363 delete $self->{fire_dir};
356 $res = 1; 364 $res = 1;
630 $self->add ($self->{vbox} = new DC::UI::VBox); 638 $self->add ($self->{vbox} = new DC::UI::VBox);
631 639
632 $self->{label} = [ 640 $self->{label} = [
633 map 641 map
634 DC::UI::Label->new ( 642 DC::UI::Label->new (
643 align => 0,
635 can_hover => 1, 644 can_hover => 1,
636 can_events => 1, 645 can_events => 1,
637 tooltip_width => 0.33, 646 tooltip_width => 0.33,
638 fontsize => $_, 647 fontsize => $_,
639 ), (0.8) x 16 648 ), (0.8) x 16

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines