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

Comparing deliantra/Deliantra-Client/bin/deliantra (file contents):
Revision 1.34 by root, Sun Mar 30 00:25:13 2008 UTC vs.
Revision 1.37 by root, Mon May 5 16:19:19 2008 UTC

99use Deliantra; 99use Deliantra;
100use Deliantra::Protocol::Constants; 100use Deliantra::Protocol::Constants;
101 101
102use Compress::LZF; 102use Compress::LZF;
103 103
104use DC; 104use DC; BEGIN { $SIG{__DIE__} = sub { DC::fatal Carp::longmess "$@" unless $^S } }
105use DC::OpenGL (); 105use DC::OpenGL ();
106use DC::Protocol; 106use DC::Protocol;
107use DC::DB; 107use DC::DB;
108use DC::UI; 108use DC::UI;
109use DC::UI::Canvas; 109use DC::UI::Canvas;
1621 $CFG->{show_tips} = $value; 1621 $CFG->{show_tips} = $value;
1622 0 1622 0
1623 } 1623 }
1624 ); 1624 );
1625 1625
1626 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Messages Window Size"); 1626 $table->add_at (0, $row, new DC::UI::Label align => 1, text => "Message Window Size");
1627 $table->add_at (1, $row++, my $saycmd = new DC::UI::Entry 1627 $table->add_at (1, $row++, my $saycmd = new DC::UI::Entry
1628 text => $CFG->{logview_max_par}, 1628 text => $CFG->{logview_max_par},
1629 tooltip => "This is maximum number of messages remembered in the <b>Messages</b> window. If the server " 1629 tooltip => "This is maximum number of messages remembered in the <b>Message</b> window. If the server "
1630 . "sends more messages than this number, older messages get removed to save memory and " 1630 . "sends more messages than this number, older messages get removed to save memory and "
1631 . "computing time. A value of <b>0</b> disables this feature, but that is not recommended.", 1631 . "computing time. A value of <b>0</b> disables this feature, but that is not recommended.",
1632 on_changed => sub { 1632 on_changed => sub {
1633 my ($self, $value) = @_; 1633 my ($self, $value) = @_;
1634 $MESSAGE_DIST->set_max_par ($CFG->{logview_max_par} = $value*1); 1634 $MESSAGE_DIST->set_max_par ($CFG->{logview_max_par} = $value*1);
2242 force_h => $::HEIGHT * 0.6, 2242 force_h => $::HEIGHT * 0.6,
2243 has_close_button => 1, 2243 has_close_button => 1,
2244 ; 2244 ;
2245 2245
2246 $METASERVER = metaserver_dialog; 2246 $METASERVER = metaserver_dialog;
2247 $MESSAGE_WINDOW = new DC::UI::Dockbar (name => 'message_window', title => 'Messages'); 2247 $MESSAGE_WINDOW = new DC::UI::Dockbar (title => 'Messages');
2248 $MESSAGE_DIST = new DC::MessageDistributor dockbar => $MESSAGE_WINDOW; 2248 $MESSAGE_DIST = new DC::MessageDistributor dockbar => $MESSAGE_WINDOW;
2249 2249
2250 $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new DC::UI::Notebook expand => 1, debug => 1, 2250 $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new DC::UI::Notebook expand => 1, debug => 1,
2251 filter => new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); 2251 filter => new DC::UI::ScrolledWindow expand => 1, scroll_y => 1);
2252 2252
2273 $BUTTONBAR = new DC::UI::Buttonbar x => 0, y => 0, z => 200; # put on top 2273 $BUTTONBAR = new DC::UI::Buttonbar x => 0, y => 0, z => 200; # put on top
2274 2274
2275 $BUTTONBAR->add (new DC::UI::Flopper text => "Setup", other => $SETUP_DIALOG, 2275 $BUTTONBAR->add (new DC::UI::Flopper text => "Setup", other => $SETUP_DIALOG,
2276 tooltip => "Toggles a dialog where you can configure all aspects of this client."); 2276 tooltip => "Toggles a dialog where you can configure all aspects of this client.");
2277 2277
2278 $BUTTONBAR->add (new DC::UI::Flopper text => "Message Window", other => $MESSAGE_WINDOW, 2278# $BUTTONBAR->add (new DC::UI::Flopper text => "Message Window", other => $MESSAGE_WINDOW,
2279 tooltip => "Toggles the server message log, where the client collects <i>all</i> messages from the server."); 2279# tooltip => "Toggles the server message log, where the client collects <i>all</i> messages from the server.");
2280 2280
2281 make_gauge_window->show; # XXX: this has to be set before make_stats_window as make_stats_window calls update_stats_window which updated the gauges also X-D 2281 make_gauge_window->show; # XXX: this has to be set before make_stats_window as make_stats_window calls update_stats_window which updated the gauges also X-D
2282 2282
2283 $BUTTONBAR->add (new DC::UI::Flopper text => "Playerbook", other => player_window, 2283 $BUTTONBAR->add (new DC::UI::Flopper text => "Playerbook", other => player_window,
2284 tooltip => "Toggles the player view, where you can manage Inventory, Spells, Skills and see your Stats."); 2284 tooltip => "Toggles the player view, where you can manage Inventory, Spells, Skills and see your Stats.");
2286 $BUTTONBAR->add (new DC::UI::Button 2286 $BUTTONBAR->add (new DC::UI::Button
2287 text => "Save Config", 2287 text => "Save Config",
2288 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", 2288 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.",
2289 on_activate => sub { 2289 on_activate => sub {
2290 $::CFG->{layout} = DC::UI::get_layout; 2290 $::CFG->{layout} = DC::UI::get_layout;
2291 DC::write_cfg "$Deliantra::VARDIR/client.cf"; 2291 DC::write_cfg;
2292 status "Configuration Saved"; 2292 status "Configuration Saved";
2293 0 2293 0
2294 }, 2294 },
2295 ); 2295 );
2296 2296
2432 DC::read_cfg "$Deliantra::OLDDIR/cfplusrc"; 2432 DC::read_cfg "$Deliantra::OLDDIR/cfplusrc";
2433 print STDERR "INFO: used old configuration file\n"; 2433 print STDERR "INFO: used old configuration file\n";
2434 } 2434 }
2435 2435
2436 DC::DB::Server::run; 2436 DC::DB::Server::run;
2437
2438 if ($CFG->{db_schema} < 1) {
2439 warn "INFO: upgrading database schema from 0 to 1, mapcache and tilecache will be lost\n";
2440 DC::DB::nuke_db;
2441 $CFG->{db_schema} = 1;
2442 DC::write_cfg;
2443 }
2444
2437 DC::DB::open_db; 2445 DC::DB::open_db;
2438 2446
2439 DC::UI::set_layout ($::CFG->{layout}); 2447 DC::UI::set_layout ($::CFG->{layout});
2440 2448
2441 my %DEF_CFG = ( 2449 my %DEF_CFG = (
2544our $STARTUP_CANCEL = EV::idle sub { 2552our $STARTUP_CANCEL = EV::idle sub {
2545 undef $::STARTUP_CANCEL; 2553 undef $::STARTUP_CANCEL;
2546 $startup_done->(); 2554 $startup_done->();
2547}; 2555};
2548 2556
2557delete $SIG{__DIE__};
2549EV::loop; 2558EV::loop;
2550 2559
2551#video_shutdown; 2560#video_shutdown;
2552#audio_shutdown; 2561#audio_shutdown;
2553DC::OpenGL::quit; 2562DC::OpenGL::quit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines