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.29 by root, Mon Mar 24 00:24:47 2008 UTC vs.
Revision 1.35 by root, Sun Mar 30 06:05:53 2008 UTC

232 232
233 $markup .= $mod & DC::KMOD_NUM 233 $markup .= $mod & DC::KMOD_NUM
234 ? "[NUM]" 234 ? "[NUM]"
235 : "[<span foreground='#888'>num</span>]"; 235 : "[<span foreground='#888'>num</span>]";
236 236
237 # <tt> around next statement works around some bug that keeps the
238 # "font =>" from being used on windows
237 $MODBOX->set_markup ($markup); 239 $MODBOX->set_markup ("<tt>$markup</tt>");
238} 240}
239 241
240############################################################################# 242#############################################################################
241#TODO: maybe move into own audio module... 243#TODO: maybe move into own audio module...
242 244
763 if ($CONN) { 765 if ($CONN) {
764 DC::lowdelay fileno $CONN->{fh}; 766 DC::lowdelay fileno $CONN->{fh};
765 767
766 status "login successful"; 768 status "login successful";
767 } else { 769 } else {
770 warn $@;
768 status "unable to connect"; 771 status "unable to connect";
769 stop_game(); 772 stop_game();
770 } 773 }
771} 774}
772 775
1972 my @path = DC::Pod::full_path_of $node; 1975 my @path = DC::Pod::full_path_of $node;
1973 pop @path; # drop current node 1976 pop @path; # drop current node
1974 1977
1975 for my $node (@path) { 1978 for my $node (@path) {
1976 $buttons->add (new DC::UI::Button 1979 $buttons->add (new DC::UI::Button
1977 text => $node->{kw}[0], 1980 text => $node->[DC::Pod::N_KW][0],
1978 tooltip => "go to <i>" . (DC::asxml DC::Pod::full_path $node) . "</i>", 1981 tooltip => "go to <i>" . (DC::asxml DC::Pod::full_path $node) . "</i>",
1979 on_activate => sub { 1982 on_activate => sub {
1980 push @history, [$curnode, $viewer->current_paragraph] if $curnode; @future = (); 1983 push @history, [$curnode, $viewer->current_paragraph] if $curnode; @future = ();
1981 $load_node->($node); 1984 $load_node->($node);
1982 }, 1985 },
1983 ); 1986 );
1984 $buttons->add (new DC::UI::Label text => "/"); 1987 $buttons->add (new DC::UI::Label text => "/");
1985 } 1988 }
1986 1989
1987 $buttons->add (new DC::UI::Label text => $node->{kw}[0], padding_x => 4, padding_y => 4); 1990 $buttons->add (new DC::UI::Label text => $node->[DC::Pod::N_KW][0], padding_x => 4, padding_y => 4);
1988 1991
1989 $curnode = $node; 1992 $curnode = $node;
1990 1993
1991 $viewer->clear; 1994 $viewer->clear;
1992 $viewer->add_paragraph (DC::Pod::as_paragraphs DC::Pod::section_of $curnode); 1995 $viewer->add_paragraph (DC::Pod::as_paragraphs DC::Pod::section_of $curnode);
2178 can_events => 1, 2181 can_events => 1,
2179 can_hover => 1, 2182 can_hover => 1,
2180 markup => "", 2183 markup => "",
2181 align => 0, 2184 align => 0,
2182 font => $FONT_FIXED, 2185 font => $FONT_FIXED,
2183 tooltip => "#modifier_box"; 2186 tooltip => "#modifier_box",
2187 tooltip_width => 0.67,
2188 ;
2184 2189
2185 update_modbox; 2190 update_modbox;
2186 2191
2187 (new DC::UI::Frame 2192 (new DC::UI::Frame
2188 bg => [0, 0, 0, 0.4], 2193 bg => [0, 0, 0, 0.4],
2281 $BUTTONBAR->add (new DC::UI::Button 2286 $BUTTONBAR->add (new DC::UI::Button
2282 text => "Save Config", 2287 text => "Save Config",
2283 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.",
2284 on_activate => sub { 2289 on_activate => sub {
2285 $::CFG->{layout} = DC::UI::get_layout; 2290 $::CFG->{layout} = DC::UI::get_layout;
2286 DC::write_cfg "$Deliantra::VARDIR/client.cf"; 2291 DC::write_cfg;
2287 status "Configuration Saved"; 2292 status "Configuration Saved";
2288 0 2293 0
2289 }, 2294 },
2290 ); 2295 );
2291 2296
2416 EV::unloop; 2421 EV::unloop;
2417 #d# TODO calling exit here hangs the process in some futex 2422 #d# TODO calling exit here hangs the process in some futex
2418}; 2423};
2419 2424
2420{ 2425{
2426 DC::Pod::load_docwiki DC::find_rcfile "docwiki.pst";
2427
2421 if (-e "$Deliantra::VARDIR/client.cf") { 2428 if (-e "$Deliantra::VARDIR/client.cf") {
2422 DC::read_cfg "$Deliantra::VARDIR/client.cf"; 2429 DC::read_cfg "$Deliantra::VARDIR/client.cf";
2423 } else { 2430 } else {
2424 #TODO: compatibility cruft 2431 #TODO: compatibility cruft
2425 DC::read_cfg "$Deliantra::OLDDIR/cfplusrc"; 2432 DC::read_cfg "$Deliantra::OLDDIR/cfplusrc";
2426 print STDERR "INFO: used old configuration file\n"; 2433 print STDERR "INFO: used old configuration file\n";
2427 } 2434 }
2428 2435
2429 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
2445 DC::DB::open_db;
2430 2446
2431 DC::UI::set_layout ($::CFG->{layout}); 2447 DC::UI::set_layout ($::CFG->{layout});
2432 2448
2433 my %DEF_CFG = ( 2449 my %DEF_CFG = (
2434 sdl_mode => 0, 2450 sdl_mode => 0,
2504 DejaVuSansMono-BoldOblique.ttf 2520 DejaVuSansMono-BoldOblique.ttf
2505 ); 2521 );
2506 2522
2507 DC::add_font $_ for @fonts; 2523 DC::add_font $_ for @fonts;
2508 2524
2509 DC::pango_init;
2510
2511 $FONT_PROP = new_from_file DC::Font $fonts[0]; 2525 $FONT_PROP = new_from_file DC::Font $fonts[0];
2512 $FONT_FIXED = new_from_file DC::Font $fonts[1]; 2526 $FONT_FIXED = new_from_file DC::Font $fonts[1];
2513 2527
2514 $FONT_PROP->make_default; 2528 $FONT_PROP->make_default;
2529
2530 DC::pango_init;
2515 } 2531 }
2516 2532
2517# compare mono (ft) vs. rgba (cairo) 2533# compare mono (ft) vs. rgba (cairo)
2518# ft - 1.8s, cairo 3s, even in alpha-only mode 2534# ft - 1.8s, cairo 3s, even in alpha-only mode
2519# for my $rgba (0..1) { 2535# for my $rgba (0..1) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines