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.282 by root, Mon Jun 5 02:25:10 2006 UTC vs.
Revision 1.283 by root, Mon Jun 5 02:28:30 2006 UTC

1542 1542
1543sub realloc { 1543sub realloc {
1544 my ($self) = @_; 1544 my ($self) = @_;
1545 1545
1546 delete $self->{ox}; 1546 delete $self->{ox};
1547 delete $self->{req_h};
1548 $self->SUPER::realloc; 1547 $self->SUPER::realloc;
1549} 1548}
1550 1549
1551sub set_text { 1550sub set_text {
1552 my ($self, $text) = @_; 1551 my ($self, $text) = @_;
1554 return if $self->{text} eq "T$text"; 1553 return if $self->{text} eq "T$text";
1555 $self->{text} = "T$text"; 1554 $self->{text} = "T$text";
1556 1555
1557 $self->{layout} = new CFClient::Layout if $self->{layout}->is_rgba; 1556 $self->{layout} = new CFClient::Layout if $self->{layout}->is_rgba;
1558 $self->{layout}->set_text ($text); 1557 $self->{layout}->set_text ($text);
1558 delete $self->{req_h};
1559 1559
1560 $self->realloc; 1560 $self->realloc;
1561 $self->update; 1561 $self->update;
1562} 1562}
1563 1563
1569 1569
1570 my $rgba = $markup =~ /span.*(?:foreground|background)/; 1570 my $rgba = $markup =~ /span.*(?:foreground|background)/;
1571 1571
1572 $self->{layout} = new CFClient::Layout $rgba if $self->{layout}->is_rgba != $rgba; 1572 $self->{layout} = new CFClient::Layout $rgba if $self->{layout}->is_rgba != $rgba;
1573 $self->{layout}->set_markup ($markup); 1573 $self->{layout}->set_markup ($markup);
1574 delete $self->{req_h};
1574 1575
1575 $self->realloc; 1576 $self->realloc;
1576 $self->update; 1577 $self->update;
1577} 1578}
1578 1579
1694 $self->{last_activity} = $::NOW; 1695 $self->{last_activity} = $::NOW;
1695 $self->{text} = $text; 1696 $self->{text} = $text;
1696 1697
1697 $text =~ s/./*/g if $self->{hidden}; 1698 $text =~ s/./*/g if $self->{hidden};
1698 $self->{layout}->set_text ("$text "); 1699 $self->{layout}->set_text ("$text ");
1700 delete $self->{req_h};
1699 1701
1700 $self->_emit (changed => $self->{text}); 1702 $self->_emit (changed => $self->{text});
1703
1704 $self->realloc;
1701 $self->update; 1705 $self->update;
1702} 1706}
1703 1707
1704sub set_text { 1708sub set_text {
1705 my ($self, $text) = @_; 1709 my ($self, $text) = @_;
1706 1710
1707 $self->{cursor} = length $text; 1711 $self->{cursor} = length $text;
1708 $self->_set_text ($text); 1712 $self->_set_text ($text);
1709
1710 $self->realloc;
1711} 1713}
1712 1714
1713sub get_text { 1715sub get_text {
1714 $_[0]{text} 1716 $_[0]{text}
1715} 1717}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines