ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MessageDistributor.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MessageDistributor.pm (file contents):
Revision 1.1 by elmex, Sun Jan 6 16:28:49 2008 UTC vs.
Revision 1.6 by elmex, Tue Oct 28 12:20:36 2008 UTC

12 $self->{log} = DC::UI::ChatView->new ( 12 $self->{log} = DC::UI::ChatView->new (
13 expand => 1, 13 expand => 1,
14 can_close => 0, 14 can_close => 0,
15 can_undock => 0, 15 can_undock => 0,
16 info => { 16 info => {
17 id => "",
17 title => "Log", 18 title => "Log",
18 tooltip =>
19 "<b>Server Log</b>. This text viewer contains all recent message sent by the server.", 19 tooltip => "<b>Server Log</b>. This text viewer contains all recent message sent by the server.",
20 entry_tooltip =>
21 "<b>Command Entry</b>. If you enter something and press return/enter here, " 20 entry_tooltip => "<b>Command Entry</b>. If you enter something and press return/enter here, "
22 ."the line you entered will be sent to the server as a command.", 21 . "the line you entered will be sent to the server as a command.",
23 reply => '' 22 reply => ''
24 } 23 }
25 ) 24 )
26 ); 25 );
27 26
28 return $self 27 return $self
29} 28}
30 29
31# called by MAPWIDGET activate console event 30# called by MAPWIDGET activate console event
32sub activate_console { 31sub activate_console {
32 # nop
33} 33}
34 34
35# adding channel 35# adding channel
36sub add_channel { 36sub add_channel {
37 my ($self, $chaninfo) = @_; 37 my ($self, $chaninfo) = @_;
39 $self->{info}->{$chaninfo->{id}} = $chaninfo; 39 $self->{info}->{$chaninfo->{id}} = $chaninfo;
40 $self->touch_channel ($chaninfo->{id}); 40 $self->touch_channel ($chaninfo->{id});
41} 41}
42 42
43# set max paragraphs 43# set max paragraphs
44sub set_max_para { 44sub set_max_par {
45 my ($self, $par) = @_;
46 for ($self->{log}, values %{$self->{chatview}}) {
47 $_->set_max_par ($par);
48 }
45} 49}
46 50
47# set fontsize 51# set fontsize for all chatviews
48sub set_fontsize { 52sub set_fontsize {
53 my ($self, $s) = @_;
54
55 for ($self->{log}, values %{$self->{chatview}}) {
56 $_->set_fontsize ($s);
57 }
49} 58}
50 59
51# push message in 60# push message in
52sub message { 61sub message {
53 my ($self, $para) = @_; 62 my ($self, $para) = @_;
84 } 93 }
85} 94}
86 95
87sub update_chat { 96sub update_chat {
88 my ($self, $id) = @_; 97 my ($self, $id) = @_;
98
89 $self->{chatview}->{$id}->update_info ($self->{info}->{$id}); 99 $self->{chatview}->{$id}->update_info ($self->{info}->{$id});
90} 100}
91 101
92sub init_chat { 102sub init_chat {
93 my ($self, $id) = @_; 103 my ($self, $id) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines