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.142 by root, Mon Mar 12 22:23:09 2007 UTC vs.
Revision 1.146 by root, Wed Apr 4 02:43:30 2007 UTC

465sub graphics_setup { 465sub graphics_setup {
466 my $vbox = new CFPlus::UI::VBox; 466 my $vbox = new CFPlus::UI::VBox;
467 467
468 $vbox->add (my $table = new CFPlus::UI::Table expand => 1, col_expand => [0, 1]); 468 $vbox->add (my $table = new CFPlus::UI::Table expand => 1, col_expand => [0, 1]);
469 469
470 my $row = 0;
471
472 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "OpenGL Info");
473 $table->add (1, $row++, new CFPlus::UI::Label valign => 0, fontsize => 0.8, text => CFPlus::OpenGL::gl_vendor . ", " . CFPlus::OpenGL::gl_version,
474 can_events => 1,
475 tooltip => "<tt><span size='8192'>" . (CFPlus::OpenGL::gl_extensions) . "</span></tt>");
476
470 $table->add (0, 0, new CFPlus::UI::Label valign => 0, align => 1, text => "Video Mode"); 477 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Video Mode");
471 $table->add (1, 0, my $hbox = new CFPlus::UI::HBox); 478 $table->add (1, $row++, my $hbox = new CFPlus::UI::HBox);
472 479
473 $hbox->add (my $mode_slider = new CFPlus::UI::Slider force_w => $WIDTH * 0.1, expand => 1, range => [$CFG->{sdl_mode}, 0, $#SDL_MODES, 0, 1]); 480 $hbox->add (my $mode_slider = new CFPlus::UI::Slider force_w => $WIDTH * 0.1, expand => 1, range => [$CFG->{sdl_mode}, 0, $#SDL_MODES, 0, 1]);
474 $hbox->add (my $mode_label = new CFPlus::UI::Label align => 0, valign => 0, height => 0.8, template => "9999x9999"); 481 $hbox->add (my $mode_label = new CFPlus::UI::Label align => 0, valign => 0, height => 0.8, template => "9999x9999");
475 482
476 $mode_slider->connect (changed => sub { 483 $mode_slider->connect (changed => sub {
478 485
479 $CFG->{sdl_mode} = $self->{range}[0] = $value = int $value; 486 $CFG->{sdl_mode} = $self->{range}[0] = $value = int $value;
480 $mode_label->set_text (sprintf "%dx%d", @{$SDL_MODES[$value]}); 487 $mode_label->set_text (sprintf "%dx%d", @{$SDL_MODES[$value]});
481 }); 488 });
482 $mode_slider->emit (changed => $mode_slider->{range}[0]); 489 $mode_slider->emit (changed => $mode_slider->{range}[0]);
483
484 my $row = 1;
485 490
486 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Fullscreen"); 491 $table->add (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Fullscreen");
487 $table->add (1, $row++, $FULLSCREEN_ENABLE = new CFPlus::UI::CheckBox 492 $table->add (1, $row++, $FULLSCREEN_ENABLE = new CFPlus::UI::CheckBox
488 state => $CFG->{fullscreen}, 493 state => $CFG->{fullscreen},
489 tooltip => "Bring the client into fullscreen mode.", 494 tooltip => "Bring the client into fullscreen mode.",
1058 . "so only set it if you really need to prefetch images. " 1063 . "so only set it if you really need to prefetch images. "
1059 . "This option can be set and unset any time.", 1064 . "This option can be set and unset any time.",
1060 on_changed => sub { $CFG->{face_prefetch} = $_[1]; 0 }, 1065 on_changed => sub { $CFG->{face_prefetch} = $_[1]; 0 },
1061 ); 1066 );
1062 1067
1063 $table->add (0, 9, new CFPlus::UI::Label valign => 0, align => 1, text => "Output-Count"); 1068 $table->add (0, 9, new CFPlus::UI::Label valign => 0, align => 1, text => "Output-Rate");
1064 $table->add (1, 9, new CFPlus::UI::Entry 1069 $table->add (1, 9, new CFPlus::UI::Entry
1070 text => $CFG->{output_rate},
1071 tooltip => "The approximate bandwidth in bytes per second that the server should not exceed "
1072 . "when sending images, to ensure interactiveness. When 0 or unset, the server "
1073 . "default will be used, which is usually around 100kb/s.",
1074 on_changed => sub { $CFG->{output_rate} = $_[1]; 0 },
1075 );
1076
1077 $table->add (0, 10, new CFPlus::UI::Label valign => 0, align => 1, text => "Output-Count");
1078 $table->add (1, 10, new CFPlus::UI::Entry
1065 text => $CFG->{output_count}, 1079 text => $CFG->{output_count},
1066 tooltip => "Should be set to 1 unless you know what you are doing. This option is only used once at log-in.", 1080 tooltip => "Should be set to 1 unless you know what you are doing. This option is only used once at log-in.",
1067 on_changed => sub { $CFG->{output_count} = $_[1]; 0 }, 1081 on_changed => sub { $CFG->{output_count} = $_[1]; 0 },
1068 ); 1082 );
1069 1083
1070 $table->add (0, 10, new CFPlus::UI::Label valign => 0, align => 1, text => "Output-Sync"); 1084 $table->add (0, 11, new CFPlus::UI::Label valign => 0, align => 1, text => "Output-Sync");
1071 $table->add (1, 10, new CFPlus::UI::Entry 1085 $table->add (1, 11, new CFPlus::UI::Entry
1072 text => $CFG->{output_sync}, 1086 text => $CFG->{output_sync},
1073 tooltip => "Should be set to 1 unless you know what you are doing. This option is only used once at log-in.", 1087 tooltip => "Should be set to 1 unless you know what you are doing. This option is only used once at log-in.",
1074 on_changed => sub { $CFG->{output_sync} = $_[1]; 0 }, 1088 on_changed => sub { $CFG->{output_sync} = $_[1]; 0 },
1075 ); 1089 );
1076 1090
1077 $table->add (1, 11, $LOGIN_BUTTON = new CFPlus::UI::Button 1091 $table->add (1, 12, $LOGIN_BUTTON = new CFPlus::UI::Button
1078 expand => 1, 1092 expand => 1,
1079 align => 0, 1093 align => 0,
1080 text => "Login", 1094 text => "Login",
1081 on_activate => sub { 1095 on_activate => sub {
1082 $CONN ? stop_game 1096 $CONN ? stop_game
1083 : start_game; 1097 : start_game;
1084 0 1098 0
1085 }, 1099 },
1086 ); 1100 );
1087 1101
1088 $table->add (0, 12, new CFPlus::UI::Label valign => 0, align => 1, text => "Chat Command"); 1102 $table->add (0, 13, new CFPlus::UI::Label valign => 0, align => 1, text => "Chat Command");
1089 $table->add (1, 12, my $saycmd = new CFPlus::UI::Entry 1103 $table->add (1, 13, my $saycmd = new CFPlus::UI::Entry
1090 text => $CFG->{say_command}, 1104 text => $CFG->{say_command},
1091 tooltip => "This is the command that will be used if you write a line in the message window entry or press <b>\"</b> in the map window. " 1105 tooltip => "This is the command that will be used if you write a line in the message window entry or press <b>\"</b> in the map window. "
1092 . "Usually you want to enter something like 'say' or 'shout' or 'gsay' here. " 1106 . "Usually you want to enter something like 'say' or 'shout' or 'gsay' here. "
1093 . "But you could also set it to <b>tell <i>playername</i></b> to only chat with that user.", 1107 . "But you could also set it to <b>tell <i>playername</i></b> to only chat with that user.",
1094 on_changed => sub { 1108 on_changed => sub {
1096 $CFG->{say_command} = $value; 1110 $CFG->{say_command} = $value;
1097 0 1111 0
1098 } 1112 }
1099 ); 1113 );
1100 1114
1101 $table->add (0, 13, new CFPlus::UI::Label valign => 0, align => 1, text => "Tip of the day"); 1115 $table->add (0, 14, new CFPlus::UI::Label valign => 0, align => 1, text => "Tip of the day");
1102 $table->add (1, 13, my $saycmd = new CFPlus::UI::CheckBox 1116 $table->add (1, 14, my $saycmd = new CFPlus::UI::CheckBox
1103 state => $CFG->{show_tips}, 1117 state => $CFG->{show_tips},
1104 tooltip => "Show the <b>Tip of the day</b> window at startup?", 1118 tooltip => "Show the <b>Tip of the day</b> window at startup?",
1105 on_changed => sub { 1119 on_changed => sub {
1106 my ($self, $value) = @_; 1120 my ($self, $value) = @_;
1107 $CFG->{show_tips} = $value; 1121 $CFG->{show_tips} = $value;
2093 bgm_enable => 1, 2107 bgm_enable => 1,
2094 bgm_volume => 0.25, 2108 bgm_volume => 0.25,
2095 face_prefetch => 0, 2109 face_prefetch => 0,
2096 output_sync => 1, 2110 output_sync => 1,
2097 output_count => 1, 2111 output_count => 1,
2112 output_rate => "",
2098 pickup => 0, 2113 pickup => 0,
2099 inv_sort => "mtime", 2114 inv_sort => "mtime",
2100 default => "profile", # default profile 2115 default => "profile", # default profile
2101 show_tips => 1, 2116 show_tips => 1,
2102 ); 2117 );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines