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

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.104 by root, Fri Apr 14 14:55:28 2006 UTC vs.
Revision 1.105 by root, Fri Apr 14 20:27:36 2006 UTC

137 $table->add (1, 5, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub { 137 $table->add (1, 5, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub {
138 my ($self, $value) = @_; 138 my ($self, $value) = @_;
139 $CFG->{fow_smooth} = $value; 139 $CFG->{fow_smooth} = $value;
140 }); 140 });
141 141
142 $table->add (0, 5, new CFClient::UI::Label align => 1, text => "Log Fontsize");
143 $table->add (1, 5, new CFClient::UI::Slider range => [$CFG->{log_fontsize}, 8, 30, 1], connect_changed => sub {
144 my ($self, $value) = @_;
145 $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = int $value);
146 });
147
142 $table->add (1, 6, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 148 $table->add (1, 6, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub {
143 destroy_screen (); 149 destroy_screen ();
144 init_screen (); 150 init_screen ();
145 }); 151 });
146 152
203 209
204sub console_window { 210sub console_window {
205 my $window = new CFClient::UI::FancyFrame 211 my $window = new CFClient::UI::FancyFrame
206 border_bg => [1, 1, 1, 0.5], 212 border_bg => [1, 1, 1, 0.5],
207 bg => [0.3, 0.3, 0.3, 0.8], 213 bg => [0.3, 0.3, 0.3, 0.8],
214 user_w => $::WIDTH/4,
215 user_h => $::HEIGHT,
208 child => (my $vbox = new CFClient::UI::VBox); 216 child => (my $vbox = new CFClient::UI::VBox);
209 217
210 $vbox->add ($LOGVIEW = new CFClient::UI::TextView expand => 1); 218 $vbox->add ($LOGVIEW = new CFClient::UI::TextView
219 expand => 1,
220 fontsize => $::CFG->{log_fontsize},
221 );
222
211 $vbox->add (my $input = new CFClient::UI::LineEntry); 223 $vbox->add (my $input = new CFClient::UI::LineEntry);
212 $input->connect (activate => sub { 224 $input->connect (activate => sub {
213 my ($input, $text) = @_; 225 my ($input, $text) = @_;
214 $input->set_text (''); 226 $input->set_text ('');
215 227
334 $fps = $fps * 0.95 + 1 / ($NOW - $LAST_REFRESH) * 0.05; 346 $fps = $fps * 0.95 + 1 / ($NOW - $LAST_REFRESH) * 0.05;
335 debug sprintf "%3.2f", $fps; 347 debug sprintf "%3.2f", $fps;
336 348
337 $want_refresh = 0; 349 $want_refresh = 0;
338 $can_refresh = 0; 350 $can_refresh = 0;
339
340 glViewport 0, 0, $WIDTH, $HEIGHT;
341 glClearColor +($CFG->{fow_intensity}) x 3, 1;
342 glClear GL_COLOR_BUFFER_BIT;
343
344 glMatrixMode GL_PROJECTION;
345 glLoadIdentity;
346 glOrtho 0, $WIDTH, $HEIGHT, 0, -10000 , 10000;
347 glMatrixMode GL_MODELVIEW;
348 glLoadIdentity;
349 351
350 $CFClient::UI::TOPLEVEL->draw; 352 $CFClient::UI::TOPLEVEL->draw;
351 353
352 SDL::GLSwapBuffers; 354 SDL::GLSwapBuffers;
353 355
504############################################################################# 506#############################################################################
505 507
506CFClient::read_cfg "$Crossfire::VARDIR/pclientrc"; 508CFClient::read_cfg "$Crossfire::VARDIR/pclientrc";
507 509
508my %DEF_CFG = ( 510my %DEF_CFG = (
511 sdl_mode => 0,
509 width => 640, 512 width => 640,
510 height => 480, 513 height => 480,
514 fullscreen => 0,
511 fast => 0, 515 fast => 0,
512 fow_enable => 1, 516 fow_enable => 1,
513 fow_intensity => 0.45, 517 fow_intensity => 0.45,
514 fow_smooth => 0, 518 fow_smooth => 0,
515 fullscreen => 0, 519 log_fontsize => 14,
516 sdl_mode => 0,
517 mapsize => 100, 520 mapsize => 100,
518 host => "crossfire.schmorp.de", 521 host => "crossfire.schmorp.de",
519 port => 13327, 522 port => 13327,
520 say_command => 'say', 523 say_command => 'say',
521); 524);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines