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.21 by root, Fri Apr 7 20:08:57 2006 UTC vs.
Revision 1.22 by root, Fri Apr 7 20:13:13 2006 UTC

88} 88}
89 89
90sub refresh { 90sub refresh {
91 glClear GL_COLOR_BUFFER_BIT; 91 glClear GL_COLOR_BUFFER_BIT;
92 92
93 for (values %Client::Widget::ACTIVE_WIDGETS) { 93 $_->draw for values %Crossfire::Client::Widget::ACTIVE_WIDGETS;
94 $_->draw
95 }
96 94
97 SDL::GLSwapBuffers; 95 SDL::GLSwapBuffers;
98} 96}
99 97
100%SDL_CB = ( 98%SDL_CB = (
110 if ($SDL_EV->key_mod & KMOD_ALT && $SDL_EV->key_sym == SDLK_RETURN) { 108 if ($SDL_EV->key_mod & KMOD_ALT && $SDL_EV->key_sym == SDLK_RETURN) {
111 # alt-enter 109 # alt-enter
112 $CFG->{fullscreen} = !$CFG->{fullscreen}; 110 $CFG->{fullscreen} = !$CFG->{fullscreen};
113 init_screen; 111 init_screen;
114 } else { 112 } else {
115 Client::Widget::feed_sdl_key_down_event ($SDL_EV); 113 Crossfire::Client::Widget::feed_sdl_key_down_event ($SDL_EV);
116 } 114 }
117 }, 115 },
118 SDL_KEYUP() => sub { 116 SDL_KEYUP() => sub {
119 Client::Widget::feed_sdl_key_up_event ($SDL_EV); 117 Crossfire::Client::Widget::feed_sdl_key_up_event ($SDL_EV);
120 }, 118 },
121 SDL_MOUSEMOTION() => sub { 119 SDL_MOUSEMOTION() => sub {
122 warn "sdl motion\n";#d# 120 warn "sdl motion\n";#d#
123 }, 121 },
124 SDL_MOUSEBUTTONDOWN() => sub { 122 SDL_MOUSEBUTTONDOWN() => sub {
125 Client::Widget::feed_sdl_button_down_event ($SDL_EV); 123 Crossfire::Client::Widget::feed_sdl_button_down_event ($SDL_EV);
126 }, 124 },
127 SDL_MOUSEBUTTONUP() => sub { 125 SDL_MOUSEBUTTONUP() => sub {
128 Client::Widget::feed_sdl_button_up_event ($SDL_EV); 126 Crossfire::Client::Widget::feed_sdl_button_up_event ($SDL_EV);
129 }, 127 },
130 SDL_ACTIVEEVENT() => sub { 128 SDL_ACTIVEEVENT() => sub {
131 warn "active\n";#d# 129 warn "active\n";#d#
132 }, 130 },
133); 131);
175#find_rcfile "uifont.ttf"; 173#find_rcfile "uifont.ttf";
176 174
177$mapwidget->activate; 175$mapwidget->activate;
178$mapwidget->focus_in; 176$mapwidget->focus_in;
179 177
180read_cfg "$Crossfire::VARDIR/pclientrc"; 178Crossfire::Client::read_cfg "$Crossfire::VARDIR/pclientrc";
181 179
182$FACECACHE = eval { Crossfire::load_ref "$Crossfire::VARDIR/pclient.faces" } || {}; 180$FACECACHE = eval { Crossfire::load_ref "$Crossfire::VARDIR/pclient.faces" } || {};
183 181
184$CFG ||= { 182$CFG ||= {
185 width => 640, 183 width => 640,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines