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.186 by root, Tue Apr 25 12:10:58 2006 UTC vs.
Revision 1.187 by root, Tue Apr 25 12:56:34 2006 UTC

70 70
71our $FONT_PROP; 71our $FONT_PROP;
72our $FONT_FIXED; 72our $FONT_FIXED;
73 73
74our $MAP; 74our $MAP;
75our $MAPMAP;
75our $MAPWIDGET; 76our $MAPWIDGET;
76our $BUTTONBAR; 77our $BUTTONBAR;
77our $LOGVIEW; 78our $LOGVIEW;
78our $CONSOLE; 79our $CONSOLE;
79our $METASERVER; 80our $METASERVER;
817 fontsize => 0.8, 818 fontsize => 0.8,
818 markup => "Use <b>Alt-Enter</b> to toggle fullscreen mode"; 819 markup => "Use <b>Alt-Enter</b> to toggle fullscreen mode";
819 $ALT_ENTER_MESSAGE->show; 820 $ALT_ENTER_MESSAGE->show;
820 $ALT_ENTER_MESSAGE->move (0, $HEIGHT - $ALT_ENTER_MESSAGE->{h}); 821 $ALT_ENTER_MESSAGE->move (0, $HEIGHT - $ALT_ENTER_MESSAGE->{h});
821 822
822 $CFClient::UI::ROOT->add ($MAPWIDGET = new CFClient::MapWidget); 823 CFClient::UI::FancyFrame->new (
823 $MAPWIDGET->focus_in; 824 border_bg => [1, 1, 1, 192/255],
825 bg => [1, 1, 1, 0],
826 child => $MAPMAP = new CFClient::MapWidget::MapMap
827 )->show;
828
829 $MAPWIDGET = new CFClient::MapWidget;
824 $MAPWIDGET->connect (activate_console => sub { 830 $MAPWIDGET->connect (activate_console => sub {
825 my ($mapwidget, $preset) = @_; 831 my ($mapwidget, $preset) = @_;
826 832
827 if ($CONSOLE) { 833 if ($CONSOLE) {
828 $CONSOLE->{input}->{auto_activated} = 1; 834 $CONSOLE->{input}->{auto_activated} = 1;
831 if ($preset && $CONSOLE->{input}->get_text eq '') { 837 if ($preset && $CONSOLE->{input}->get_text eq '') {
832 $CONSOLE->{input}->set_text ($preset); 838 $CONSOLE->{input}->set_text ($preset);
833 } 839 }
834 } 840 }
835 }); 841 });
842 $MAPWIDGET->show;
843 $MAPWIDGET->focus_in;
836 844
837 $CFClient::UI::ROOT->add ($BUTTONBAR = new CFClient::UI::HBox); 845 $BUTTONBAR = new CFClient::UI::HBox;
838 846
839 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Client Setup", other => client_setup); 847 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Client Setup", other => client_setup);
840 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Server Setup", other => server_setup); 848 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Server Setup", other => server_setup);
841 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Message Window", other => message_window); 849 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Message Window", other => message_window);
842 850
845 853
846 $BUTTONBAR->add (new CFClient::UI::Button text => "Save Config", connect_activate => sub { 854 $BUTTONBAR->add (new CFClient::UI::Button text => "Save Config", connect_activate => sub {
847 CFClient::write_cfg "$Crossfire::VARDIR/pclientrc"; 855 CFClient::write_cfg "$Crossfire::VARDIR/pclientrc";
848 status "Configuration Saved"; 856 status "Configuration Saved";
849 }); 857 });
858
859 $BUTTONBAR->show;
850 860
851 $BUTTONBAR->{children}[1]->emit ("activate"); # pop up server setup 861 $BUTTONBAR->{children}[1]->emit ("activate"); # pop up server setup
852} 862}
853 863
854sub video_shutdown { 864sub video_shutdown {
1036# at worst. 1046# at worst.
1037sub conn::flood_fill { 1047sub conn::flood_fill {
1038 my ($self, $gx, $gy, $path, $hash, $flags) = @_; 1048 my ($self, $gx, $gy, $path, $hash, $flags) = @_;
1039 1049
1040 # the server does not allow map paths > 6 1050 # the server does not allow map paths > 6
1041 return if 6 <= length $path; 1051 return if 7 <= length $path;
1042 1052
1043 my ($x0, $y0, $x1, $y1) = @{$self->{neigh_rect}}; 1053 my ($x0, $y0, $x1, $y1) = @{$self->{neigh_rect}};
1044 1054
1045 for ( 1055 for (
1046 [1, 0, -1], 1056 [1, 0, -1],
1089 1099
1090 $self->flush_map; 1100 $self->flush_map;
1091 1101
1092 my ($ox, $oy) = ($::MAP->ox, $::MAP->oy); 1102 my ($ox, $oy) = ($::MAP->ox, $::MAP->oy);
1093 1103
1094 my $mapmapw = 250; 1104 my $mapmapw = $MAPMAP->{w};
1095 my $mapmaph = 250; 1105 my $mapmaph = $MAPMAP->{h};
1096 1106
1097 $self->{neigh_rect} = [ 1107 $self->{neigh_rect} = [
1098 $ox - $mapmapw * 0.5, $oy - $mapmapw * 0.5, 1108 $ox - $mapmapw * 0.5, $oy - $mapmapw * 0.5,
1099 $ox + $mapmapw * 0.5 + $w, $oy + $mapmapw * 0.5 + $h, 1109 $ox + $mapmapw * 0.5 + $w, $oy + $mapmapw * 0.5 + $h,
1100 ]; 1110 ];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines