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.68 by root, Tue Apr 11 13:38:22 2006 UTC vs.
Revision 1.69 by root, Tue Apr 11 14:04:27 2006 UTC

31 31
32our $WIDTH; 32our $WIDTH;
33our $HEIGHT; 33our $HEIGHT;
34our $FULLSCREEN; 34our $FULLSCREEN;
35 35
36our $MAPWIDGET;
36our $FONTSIZE; 37our $FONTSIZE;
37 38
38our $SDL_TIMER; 39our $SDL_TIMER;
39our $SDL_APP; 40our $SDL_APP;
40our $SDL_EV; 41our $SDL_EV;
104 y => $HEIGHT * 59 / 60, 105 y => $HEIGHT * 59 / 60,
105 height => $HEIGHT / 60, 106 height => $HEIGHT / 60,
106 text => "Use <b>Alt-Enter</b> to toggle fullscreen mode"; 107 text => "Use <b>Alt-Enter</b> to toggle fullscreen mode";
107 $CFClient::Widget::TOPLEVEL->add ($ALT_ENTER_MESSAGE); 108 $CFClient::Widget::TOPLEVEL->add ($ALT_ENTER_MESSAGE);
108 109
110 $MAPWIDGET = new CFClient::Widget::MapWidget;
111 $CFClient::Widget::TOPLEVEL->add ($MAPWIDGET);
112 $MAPWIDGET->focus_in;
113
109 # Test code #d# 114 # Test code #d#
110 unless ($tw) { # haha... 115 unless ($tw) { # haha...
111 $te = new CFClient::Widget::FancyFrame x => 300, z => 1; 116 $te = new CFClient::Widget::FancyFrame x => 300, z => 1;
112 $te->add (new CFClient::Widget::Entry); 117 $te->add (new CFClient::Widget::Entry);
113 $CFClient::Widget::TOPLEVEL->add ($te); 118 $CFClient::Widget::TOPLEVEL->add ($te);
114 119
115 $tw = new CFClient::Widget::Animator x => $WIDTH - 200, w => 400, h => 300; 120 $tw = new CFClient::Widget::Animator x => $WIDTH - 200, w => 600, h => 300;
116 my $lbl1 = new CFClient::Widget::Label text => "<i>This</i> is a\n<u>TEST</u>!\nOf a themed\nFrame!"; 121 my $lbl1 = new CFClient::Widget::Label text => "<i>This</i> is a\n<u>TEST</u>!\nOf a themed\nFrame!";
117 my $lbl2 = new CFClient::Widget::Label text => "LBL2"; 122 my $lbl2 = new CFClient::Widget::Label text => "LBL2";
118 my $vb = new CFClient::Widget::VBox; 123 my $vb = new CFClient::Widget::VBox;
119 my $f = new CFClient::Widget::FancyFrame; 124 my $f = new CFClient::Widget::FancyFrame;
120 my $f2 = new CFClient::Widget::FancyFrame; 125 my $f2 = new CFClient::Widget::FancyFrame;
277@conn::ISA = Crossfire::Protocol::; 282@conn::ISA = Crossfire::Protocol::;
278 283
279sub conn::map_update { 284sub conn::map_update {
280 my ($self, $dirty) = @_; 285 my ($self, $dirty) = @_;
281 286
282 refresh; 287 $MAPWIDGET->update;
283} 288}
284 289
285sub conn::map_scroll { 290sub conn::map_scroll {
286 my ($self, $dx, $dy) = @_; 291 my ($self, $dx, $dy) = @_;
287 292
415 420
416############################################################################# 421#############################################################################
417 422
418SDL::Init SDL_INIT_EVERYTHING; 423SDL::Init SDL_INIT_EVERYTHING;
419 424
420my $mapwidget = CFClient::Widget::MapWidget->new;
421
422$CFClient::Widget::TOPLEVEL->add ($mapwidget);
423$mapwidget->focus_in;
424
425CFClient::read_cfg "$Crossfire::VARDIR/pclientrc"; 425CFClient::read_cfg "$Crossfire::VARDIR/pclientrc";
426 426
427$CFG ||= { 427$CFG ||= {
428 width => 640, 428 width => 640,
429 height => 480, 429 height => 480,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines