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

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.366 by root, Mon Apr 23 19:17:41 2007 UTC vs.
Revision 1.368 by root, Mon Jun 25 05:43:37 2007 UTC

266 my ($self) = @_; 266 my ($self) = @_;
267 267
268 $self->hide; 268 $self->hide;
269 $self->emit ("destroy"); 269 $self->emit ("destroy");
270 %$self = (); 270 %$self = ();
271}
272
273sub TO_JSON {
274 { __widget_ref__ => $_[0]{s_id} }
271} 275}
272 276
273sub show { 277sub show {
274 my ($self) = @_; 278 my ($self) = @_;
275 279
1969 my $mod = $ev->{mod}; 1973 my $mod = $ev->{mod};
1970 my $sym = $ev->{sym}; 1974 my $sym = $ev->{sym};
1971 my $uni = $ev->{unicode}; 1975 my $uni = $ev->{unicode};
1972 1976
1973 my $text = $self->get_text; 1977 my $text = $self->get_text;
1978
1979 $self->{cursor} = List::Util::max 0, List::Util::min $self->{cursor}, length $text;
1974 1980
1975 if ($uni == 8) { 1981 if ($uni == 8) {
1976 substr $text, --$self->{cursor}, 1, "" if $self->{cursor}; 1982 substr $text, --$self->{cursor}, 1, "" if $self->{cursor};
1977 } elsif ($uni == 127) { 1983 } elsif ($uni == 127) {
1978 substr $text, $self->{cursor}, 1, ""; 1984 substr $text, $self->{cursor}, 1, "";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines