ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.67 by root, Sun Jun 11 18:36:15 2006 UTC vs.
Revision 1.73 by root, Sat Jun 17 15:07:54 2006 UTC

363sub stop_game { 363sub stop_game {
364 $LOGIN_BUTTON->set_text ("Login"); 364 $LOGIN_BUTTON->set_text ("Login");
365 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); 365 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER);
366 $SETUP_DIALOG->show; 366 $SETUP_DIALOG->show;
367 $INV_WINDOW->hide; 367 $INV_WINDOW->hide;
368 $SETUP_SPELLS->clear_spells;
368 369
369 return unless $CONN; 370 return unless $CONN;
370 371
371 status "connection closed"; 372 status "connection closed";
372 373
815 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED}); 816 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED});
816 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP}); 817 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP});
817 818
818 $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000); 819 $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000);
819 820
820 # TODO: replace by CS_STAT_RES_xxx constants
821 my %tbl = ( 821 my %tbl = (
822 phys => 100, 822 phys => CS_STAT_RES_PHYS,
823 magic => 101, 823 magic => CS_STAT_RES_MAG,
824 fire => 102, 824 fire => CS_STAT_RES_FIRE,
825 elec => 103, 825 elec => CS_STAT_RES_ELEC,
826 cold => 104, 826 cold => CS_STAT_RES_COLD,
827 conf => 105, 827 conf => CS_STAT_RES_CONF,
828 acid => 106, 828 acid => CS_STAT_RES_ACID,
829 drain => 107, 829 drain => CS_STAT_RES_DRAIN,
830 ghit => 108, 830 ghit => CS_STAT_RES_GHOSTHIT,
831 pois => 109, 831 pois => CS_STAT_RES_POISON,
832 slow => 110, 832 slow => CS_STAT_RES_SLOW,
833 para => 111, 833 para => CS_STAT_RES_PARA,
834 tund => 112, 834 tund => CS_STAT_TURN_UNDEAD,
835 fear => 113, 835 fear => CS_STAT_RES_FEAR,
836 depl => 113, 836 depl => CS_STAT_RES_DEPLETE,
837 deat => 115, 837 deat => CS_STAT_RES_DEATH,
838 holyw => 116, 838 holyw => CS_STAT_RES_HOLYWORD,
839 blind => 117, 839 blind => CS_STAT_RES_BLIND,
840 ); 840 );
841 841
842 $STATWIDS->{"res_$_"}->set_text (sprintf "%d%", $stats->{$tbl{$_}}) 842 $STATWIDS->{"res_$_"}->set_text (sprintf "%d%", $stats->{$tbl{$_}})
843 for keys %tbl; 843 for keys %tbl;
844} 844}
1352 } 1352 }
1353 } 1353 }
1354 }; 1354 };
1355 1355
1356 my $vb = new CFClient::UI::VBox; 1356 my $vb = new CFClient::UI::VBox;
1357 $vb->add (my $hb = new CFClient::UI::HBox);
1358 $hb->add (new CFClient::UI::Label text => "only shift-up stops fire");
1359 $hb->add (new CFClient::UI::CheckBox
1360 expand => 1,
1361 state => $CFG->{shift_fire_stop},
1362 tooltip => "If this checkbox is enabled you will stop fire only if you stop pressing shift",
1363 on_changed => sub {
1364 my ($cbox, $value) = @_;
1365 $CFG->{shift_fire_stop} = $value;
1366 });
1367
1357 $vb->add ($binding_list); 1368 $vb->add ($binding_list);
1358 $vb->add (my $hb = new CFClient::UI::HBox); 1369 $vb->add (my $hb = new CFClient::UI::HBox);
1359 1370
1360 $hb->add (new CFClient::UI::Button 1371 $hb->add (new CFClient::UI::Button
1361 text => "record new", 1372 text => "record new",
1504 name => "mapmap", 1515 name => "mapmap",
1505 x => 0, 1516 x => 0,
1506 y => $FONTSIZE + 8, 1517 y => $FONTSIZE + 8,
1507 border_bg => [1, 1, 1, 192/255], 1518 border_bg => [1, 1, 1, 192/255],
1508 bg => [1, 1, 1, 0], 1519 bg => [1, 1, 1, 0],
1520 no_close_button => 1,
1509 child => ($MAPMAP = new CFClient::MapWidget::MapMap 1521 child => ($MAPMAP = new CFClient::MapWidget::MapMap
1510 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.", 1522 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.",
1511 ), 1523 ),
1512 )->show; 1524 )->show;
1513 1525
1617 1629
1618 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]); 1630 $STATUSBOX->add ("Set video mode $WIDTH×$HEIGHT", timeout => 10, fg => [1, 1, 1, 0.5]);
1619} 1631}
1620 1632
1621sub video_shutdown { 1633sub video_shutdown {
1634 CFClient::OpenGL::shutdown;
1635
1622 undef $SDL_ACTIVE; 1636 undef $SDL_ACTIVE;
1623} 1637}
1624 1638
1625my @bgmusic = qw(game1.ogg game2.ogg game3.ogg game5.ogg game6.ogg ross1.ogg ross2.ogg ross3.ogg ross4.ogg ross5.ogg); #d# 1639my @bgmusic = qw(game1.ogg game2.ogg game3.ogg game5.ogg game6.ogg ross1.ogg ross2.ogg ross3.ogg ross4.ogg ross5.ogg); #d#
1626my $bgmusic;#TODO#hack#d# 1640my $bgmusic;#TODO#hack#d#
1922 video_init; 1936 video_init;
1923 audio_init; 1937 audio_init;
1924} 1938}
1925 1939
1926Event::loop; 1940Event::loop;
1941#CFClient::SDL_Quit;
1942#CFClient::_exit 0;
1927 1943
1928END { CFClient::SDL_Quit } 1944END { CFClient::SDL_Quit }
1929 1945
1930=head1 NAME 1946=head1 NAME
1931 1947

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines