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.38 by root, Sun Apr 9 00:06:10 2006 UTC vs.
Revision 1.39 by root, Sun Apr 9 00:09:50 2006 UTC

30 30
31our $WIDTH; 31our $WIDTH;
32our $HEIGHT; 32our $HEIGHT;
33our $FULLSCREEN; 33our $FULLSCREEN;
34 34
35our $UIFONT; 35our $FONTSIZE;
36 36
37our $SDL_TIMER; 37our $SDL_TIMER;
38our $SDL_APP; 38our $SDL_APP;
39our $SDL_EV = new SDL::Event; 39our $SDL_EV = new SDL::Event;
40our %SDL_CB; 40our %SDL_CB;
62 %GL_EXT = map +($_ => 1), split /\s+/, Crossfire::Client::gl_extensions; 62 %GL_EXT = map +($_ => 1), split /\s+/, Crossfire::Client::gl_extensions;
63 63
64 $GL_EXT{GL_ARB_texture_non_power_of_two} 64 $GL_EXT{GL_ARB_texture_non_power_of_two}
65 or warn "WARNING: non-power-of-two opengl extension required"; 65 or warn "WARNING: non-power-of-two opengl extension required";
66 66
67 $FONTSIZE = int $HEIGHT / 40;
68
67 $ALT_ENTER_MESSAGE = new Crossfire::Client::Widget::Label 0, $HEIGHT - $HEIGHT / 40, 10, $UIFONT, "Alt-Enter toggles fullscreen mode"; 69 $ALT_ENTER_MESSAGE = new Crossfire::Client::Widget::Label 0, $FONTSIZE, $HEIGHT - $FONTSIZE, $FONTSIZE, "Alt-Enter toggles fullscreen mode";
68 $ALT_ENTER_MESSAGE->move (0, $HEIGHT - ($ALT_ENTER_MESSAGE->size_request)[1]); 70 $ALT_ENTER_MESSAGE->move (0, $HEIGHT - ($ALT_ENTER_MESSAGE->size_request)[1]);
69 $ALT_ENTER_MESSAGE->activate; 71 $ALT_ENTER_MESSAGE->activate;
70 72
71 # Test code #d# 73 # Test code #d#
74 {
72 my $frm = new Crossfire::Client::Widget::Frame; 75 my $frm = new Crossfire::Client::Widget::Frame;
73 $tw = new Crossfire::Client::Widget::Window; 76 $tw = new Crossfire::Client::Widget::Window;
74 $frm->add (new Crossfire::Client::Widget::Label 0, 0, 10, $UIFONT, "Foo in the garden!"); 77 $frm->add (new Crossfire::Client::Widget::Label 0, 0, 10, $FONTSIZE, "Foo in the garden!");
75 $tw->add ($frm); 78 $tw->add ($frm);
76 79
77 $tw->move (0, $HEIGHT - 120); 80 $tw->move (0, $HEIGHT - 120);
78 $tw->activate; 81 $tw->activate;
79 # Test code end #d# 82 }
80 83
81 glClearColor 0, 0, 0, 0; 84 glClearColor 0, 0, 0, 0;
82 85
83 glEnable GL_TEXTURE_2D; 86 glEnable GL_TEXTURE_2D;
84 glEnable GL_COLOR_MATERIAL; 87 glEnable GL_COLOR_MATERIAL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines