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

Comparing deliantra/Deliantra-Client/DC/UI/ChatView.pm (file contents):
Revision 1.9 by elmex, Fri Aug 31 08:15:45 2007 UTC vs.
Revision 1.10 by root, Sat Sep 1 07:22:21 2007 UTC

1package CFPlus::UI::ChatView; 1package CFPlus::UI::ChatView;
2 2
3use strict; 3use strict;
4use utf8; 4use utf8;
5 5
6our @ISA = CFPlus::UI::VBox::; 6our @ISA = CFPlus::UI::Dockable::;
7 7
8sub new { 8sub new {
9 my $class = shift; 9 my $class = shift;
10 my $self = $class->SUPER::new (@_);
11 10
11 my $self = $class->SUPER::new (
12 @_,
13 can_close => 1,
14 child => (my $vbox = new CFPlus::UI::VBox),
15 );
16
12 $self->add ($self->{txt} = new CFPlus::UI::TextScroller ( 17 $vbox->add ($self->{txt} = new CFPlus::UI::TextScroller (
13 expand => 1, 18 expand => 1,
14 font => $::FONT_FIXED, 19 font => $::FONT_FIXED,
15 fontsize => $::CFG->{log_fontsize}, 20 fontsize => $::CFG->{log_fontsize},
16 indent => -4, 21 indent => -4,
17 can_hover => 1, 22 can_hover => 1,
21 $self->{text_tooltip} 26 $self->{text_tooltip}
22 || "<b>Server Log</b>. This text viewer contains all recent messages " 27 || "<b>Server Log</b>. This text viewer contains all recent messages "
23 ."sent by the server.", 28 ."sent by the server.",
24 )); 29 ));
25 30
26 $self->add (my $hb = CFPlus::UI::HBox->new); 31 $vbox->add (my $hb = CFPlus::UI::HBox->new);
27 32
28 if ($self->{say_command}) { 33 if ($self->{say_command}) {
29 $hb->add (CFPlus::UI::Label->new (markup => $self->{say_command})); 34 $hb->add (CFPlus::UI::Label->new (markup => $self->{say_command}));
30 } 35 }
36
31 $hb->add ($self->{input} = CFPlus::UI::Entry->new ( 37 $hb->add ($self->{input} = CFPlus::UI::Entry->new (
32 expand => 1, 38 expand => 1,
33 tooltip => 39 tooltip =>
34 $self->{entry_tooltip} 40 $self->{entry_tooltip}
35 || "<b>Command Entry</b>. If you enter something and press return/enter here, " 41 || "<b>Command Entry</b>. If you enter something and press return/enter here, "
119sub set_max_para { 125sub set_max_para {
120 my ($self, $max_par) = @_; 126 my ($self, $max_par) = @_;
121 $self->{txt}{max_par} = $max_par; 127 $self->{txt}{max_par} = $max_par;
122} 128}
123 129
124sub clear { 130sub clear_log {
125 my ($self) = @_; 131 my ($self) = @_;
132
126 $self->{txt}->clear; 133 $self->{txt}->clear;
127} 134}
135
1361

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines