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.145 by elmex, Fri Apr 21 12:27:20 2006 UTC vs.
Revision 1.146 by elmex, Fri Apr 21 15:03:46 2006 UTC

1109 1109
1110sub size_allocate { 1110sub size_allocate {
1111 my ($self, $w, $h) = @_; 1111 my ($self, $w, $h) = @_;
1112 1112
1113 delete $self->{texture}; 1113 delete $self->{texture};
1114}
1115
1116sub set_fontsize {
1117 my ($self, $fontsize) = @_;
1118
1119 $self->{fontsize} = $fontsize;
1120 $self->update;
1114} 1121}
1115 1122
1116sub _draw { 1123sub _draw {
1117 my ($self) = @_; 1124 my ($self) = @_;
1118 1125
1652 $self->add ($self->{max} = new CFClient::UI::Label valign => 1, align => 0, template => "999"); 1659 $self->add ($self->{max} = new CFClient::UI::Label valign => 1, align => 0, template => "999");
1653 1660
1654 $self 1661 $self
1655} 1662}
1656 1663
1664sub set_fontsize {
1665 my ($self, $fsize) = @_;
1666
1667 $self->{value}->set_fontsize ($fsize);
1668 $self->{max} ->set_fontsize ($fsize);
1669 $self->update;
1670}
1671
1657sub set_value { 1672sub set_value {
1658 my ($self, $val, $max) = @_; 1673 my ($self, $val, $max) = @_;
1659 1674
1660 $self->set_max ($max) 1675 $self->set_max ($max)
1661 if defined $max; 1676 if defined $max;
2086} 2101}
2087 2102
2088sub add { 2103sub add {
2089 my ($self, $child) = @_; 2104 my ($self, $child) = @_;
2090 2105
2106 # integerize window positions
2107 $child->{x} = int $child->{x};
2108 $child->{y} = int $child->{y};
2109
2091 $self->SUPER::add ($child); 2110 $self->SUPER::add ($child);
2092} 2111}
2093 2112
2094sub on_refresh { 2113sub on_refresh {
2095 my ($self, $id, $cb) = @_; 2114 my ($self, $id, $cb) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines