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.65 by root, Thu Jun 8 01:51:32 2006 UTC vs.
Revision 1.70 by elmex, Tue Jun 13 10:28:38 2006 UTC

84our $CONSOLE; 84our $CONSOLE;
85our $METASERVER; 85our $METASERVER;
86our $LOGIN_BUTTON; 86our $LOGIN_BUTTON;
87our $QUIT_DIALOG; 87our $QUIT_DIALOG;
88our $HOST_ENTRY; 88our $HOST_ENTRY;
89our $SERVER_INFO;
89 90
90our $SETUP_DIALOG; 91our $SETUP_DIALOG;
91our $SETUP_NOTEBOOK; 92our $SETUP_NOTEBOOK;
92our $SETUP_SERVER; 93our $SETUP_SERVER;
93our $SETUP_KEYBOARD; 94our $SETUP_KEYBOARD;
362sub stop_game { 363sub stop_game {
363 $LOGIN_BUTTON->set_text ("Login"); 364 $LOGIN_BUTTON->set_text ("Login");
364 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); 365 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER);
365 $SETUP_DIALOG->show; 366 $SETUP_DIALOG->show;
366 $INV_WINDOW->hide; 367 $INV_WINDOW->hide;
368 $SETUP_SPELLS->clear_spells;
367 369
368 return unless $CONN; 370 return unless $CONN;
369 371
370 status "connection closed"; 372 status "connection closed";
371 373
1076 my ($self, $value) = @_; 1078 my ($self, $value) = @_;
1077 $CFG->{say_command} = $value; 1079 $CFG->{say_command} = $value;
1078 } 1080 }
1079 ); 1081 );
1080 1082
1083 $vbox->add (new CFClient::UI::Label
1084 text => "Server Info",
1085 fontsize => 1.2,
1086 padding_y => 8,
1087 fg => [1, 1, 0, 1],
1088 );
1089
1090 $vbox->add ($SERVER_INFO = new CFClient::UI::Label ellipsise => 0);
1091
1081 $vbox 1092 $vbox
1082} 1093}
1083 1094
1084sub message_window { 1095sub message_window {
1085 my $window = new CFClient::UI::FancyFrame 1096 my $window = new CFClient::UI::FancyFrame
1209 ["Potions" => PICKUP_POTION], 1220 ["Potions" => PICKUP_POTION],
1210 ["Magic Devices" => PICKUP_MAGIC_DEVICE], 1221 ["Magic Devices" => PICKUP_MAGIC_DEVICE],
1211 ["Ignore cursed" => PICKUP_NOT_CURSED], 1222 ["Ignore cursed" => PICKUP_NOT_CURSED],
1212 ["Jewelery" => PICKUP_JEWELS], 1223 ["Jewelery" => PICKUP_JEWELS],
1213 ], 1224 ],
1225 ["Weight/Value ratio", 2, 17]
1214 ) 1226 )
1215 { 1227 {
1216 my ($title, $x, $y, @bits) = @$_; 1228 my ($title, $x, $y, @bits) = @$_;
1217 $table->add ($x, $y, new CFClient::UI::Label text => $title, align => 1, fg => [1, 1, 0]); 1229 $table->add ($x, $y, new CFClient::UI::Label text => $title, align => 1, fg => [1, 1, 0]);
1218 1230
1235 $::CONN->send_command ("pickup $::CFG->{pickup}") 1247 $::CONN->send_command ("pickup $::CFG->{pickup}")
1236 if defined $::CONN; 1248 if defined $::CONN;
1237 }); 1249 });
1238 } 1250 }
1239 } 1251 }
1252
1253 $table->add (2, 18, new CFClient::UI::ValSlider
1254 range => [0, 0, 16, 1, 1],
1255 to_value => sub { ">= " . 5 * $_[0] },
1256 on_changed => sub {
1257 my ($slider, $value) = @_;
1258
1259 $::CFG->{pickup} &= ~0x7;
1260 $::CFG->{pickup} |= int $value
1261 if $value;
1262 1;
1263 });
1264 $table->add (3, 18, new CFClient::UI::Button
1265 text => "set",
1266 on_activate => sub {
1267 $::CONN->send_command ("pickup $::CFG->{pickup}")
1268 if defined $::CONN;
1269 1;
1270 });
1240 1271
1241 $table 1272 $table
1242} 1273}
1243 1274
1244sub inventory_window { 1275sub inventory_window {
1474 name => "mapmap", 1505 name => "mapmap",
1475 x => 0, 1506 x => 0,
1476 y => $FONTSIZE + 8, 1507 y => $FONTSIZE + 8,
1477 border_bg => [1, 1, 1, 192/255], 1508 border_bg => [1, 1, 1, 192/255],
1478 bg => [1, 1, 1, 0], 1509 bg => [1, 1, 1, 0],
1510 no_close_button => 1,
1479 child => ($MAPMAP = new CFClient::MapWidget::MapMap 1511 child => ($MAPMAP = new CFClient::MapWidget::MapMap
1480 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.", 1512 tooltip => "<b>Map</b>. On servers that support this feature, this will display an overview of the surrounding areas.",
1481 ), 1513 ),
1482 )->show; 1514 )->show;
1483 1515
1892 video_init; 1924 video_init;
1893 audio_init; 1925 audio_init;
1894} 1926}
1895 1927
1896Event::loop; 1928Event::loop;
1929#CFClient::SDL_Quit;
1930#CFClient::_exit 0;
1897 1931
1898END { CFClient::SDL_Quit } 1932END { CFClient::SDL_Quit }
1899 1933
1900=head1 NAME 1934=head1 NAME
1901 1935

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines