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.15 by root, Sat May 27 19:49:07 2006 UTC vs.
Revision 1.16 by elmex, Sat May 27 20:00:40 2006 UTC

177 unless $BUTTONBAR->{children}[1]->{state}; 177 unless $BUTTONBAR->{children}[1]->{state};
178} 178}
179 179
180sub client_setup { 180sub client_setup {
181 my $dialog = new CFClient::UI::FancyFrame 181 my $dialog = new CFClient::UI::FancyFrame
182 name => "client_setup",
182 title => "Client Setup", 183 title => "Client Setup",
183 child => (my $vbox = new CFClient::UI::VBox); 184 child => (my $vbox = new CFClient::UI::VBox);
184 $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]); 185 $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]);
185 186
186 $table->add (0, 0, new CFClient::UI::Label valign => 0, align => 1, text => "Video Mode"); 187 $table->add (0, 0, new CFClient::UI::Label valign => 0, align => 1, text => "Video Mode");
431 432
432 $win 433 $win
433} 434}
434 435
435sub make_stats_window { 436sub make_stats_window {
436 my $tgw = new CFClient::UI::FancyFrame title => "Stats"; 437 my $tgw = new CFClient::UI::FancyFrame title => "Stats", name => "stats_window";
437 438
438 $tgw->add (new CFClient::UI::Window child => my $vb = new CFClient::UI::VBox); 439 $tgw->add (new CFClient::UI::Window child => my $vb = new CFClient::UI::VBox);
439 $vb->add ($STATWIDS->{title} = new CFClient::UI::Label valign => 0, align => -1, text => "Title:", expand => 1, 440 $vb->add ($STATWIDS->{title} = new CFClient::UI::Label valign => 0, align => -1, text => "Title:", expand => 1,
440 can_hover => 1, can_events => 1, 441 can_hover => 1, can_events => 1,
441 tooltip => "Your name and title. You can change your title by using the <b>title</b> command, if supported by the server."); 442 tooltip => "Your name and title. You can change your title by using the <b>title</b> command, if supported by the server.");
704 }); 705 });
705} 706}
706 707
707sub server_setup { 708sub server_setup {
708 my $dialog = new CFClient::UI::FancyFrame 709 my $dialog = new CFClient::UI::FancyFrame
710 name => "server_setup",
709 title => "Server Setup", 711 title => "Server Setup",
710 child => (my $vbox = new CFClient::UI::VBox); 712 child => (my $vbox = new CFClient::UI::VBox);
711 713
712 $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]); 714 $vbox->add (my $table = new CFClient::UI::Table expand => 1, col_expand => [0, 1]);
713 $table->add (0, 2, new CFClient::UI::Label valign => 0, align => 1, text => "Host:Port"); 715 $table->add (0, 2, new CFClient::UI::Label valign => 0, align => 1, text => "Host:Port");
815 $dialog 817 $dialog
816} 818}
817 819
818sub message_window { 820sub message_window {
819 my $window = new CFClient::UI::FancyFrame 821 my $window = new CFClient::UI::FancyFrame
822 name => "message_window",
820 title => "Messages", 823 title => "Messages",
821 border_bg => [1, 1, 1, 1], 824 border_bg => [1, 1, 1, 1],
822 bg => [0, 0, 0, 0.75], 825 bg => [0, 0, 0, 0.75],
823 user_w => int $::WIDTH / 3, 826 user_w => int $::WIDTH / 3,
824 user_h => int $::HEIGHT / 5, 827 user_h => int $::HEIGHT / 5,
899 } 902 }
900} 903}
901 904
902sub make_inventory_window { 905sub make_inventory_window {
903 my $invwin = new CFClient::UI::FancyFrame 906 my $invwin = new CFClient::UI::FancyFrame
904 user_w => $WIDTH * (7/8), user_h => $HEIGHT * (7/8), title => "Inventory"; 907 user_w => $WIDTH * (7/8), user_h => $HEIGHT * (7/8), title => "Inventory", name => "inventory_window";
905 908
906 $invwin->add (my $hb = new CFClient::UI::HBox expand => 1); 909 $invwin->add (my $hb = new CFClient::UI::HBox expand => 1);
907 910
908 $hb->add (my $vb1 = new CFClient::UI::VBox expand => 1); 911 $hb->add (my $vb1 = new CFClient::UI::VBox expand => 1);
909 $vb1->add (my $lbl = new CFClient::UI::Label align => 0); 912 $vb1->add (my $lbl = new CFClient::UI::Label align => 0);
1064 1067
1065 $BUTTONBAR->add (new CFClient::UI::Button 1068 $BUTTONBAR->add (new CFClient::UI::Button
1066 text => "Save Config", 1069 text => "Save Config",
1067 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", 1070 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.",
1068 connect_activate => sub { 1071 connect_activate => sub {
1072 $::CFG->{layout} = CFClient::UI::get_layout;
1069 CFClient::write_cfg "$Crossfire::VARDIR/pclientrc"; 1073 CFClient::write_cfg "$Crossfire::VARDIR/pclientrc";
1070 status "Configuration Saved"; 1074 status "Configuration Saved";
1071 }, 1075 },
1072 ); 1076 );
1073 1077
1317 1321
1318{ 1322{
1319 local $SIG{__DIE__} = sub { CFClient::fatal $_[0] }; 1323 local $SIG{__DIE__} = sub { CFClient::fatal $_[0] };
1320 1324
1321 CFClient::read_cfg "$Crossfire::VARDIR/pclientrc"; 1325 CFClient::read_cfg "$Crossfire::VARDIR/pclientrc";
1326 CFClient::UI::set_layout ($::CFG->{layout});
1322 1327
1323 my %DEF_CFG = ( 1328 my %DEF_CFG = (
1324 sdl_mode => 0, 1329 sdl_mode => 0,
1325 width => 640, 1330 width => 640,
1326 height => 480, 1331 height => 480,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines