--- deliantra/Deliantra-Client/DC/UI.pm 2006/04/23 02:14:33 1.153 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/04/23 02:20:57 1.154 @@ -2151,7 +2151,7 @@ sub set_text { my ($self, $text) = @_; - $self->{label} ||= new CFClient::UI::Label fontsize => 0.8; + $self->{label} ||= new CFClient::UI::Label fontsize => 0.8, fg => [0, 0, 0]; $self->{label}->set_text ($text); $self->add ($self->{label}); } @@ -2161,9 +2161,40 @@ my ($w, $h) = @{$self->child}{qw(req_w req_h)}; - $w = List::Util::min $::WIDTH * 0.2, $w; + $w = List::Util::min $::WIDTH * 0.2, $w; + $h = List::Util::max $::HEIGHT * 0.2, $h; - ($w, $h) + ($w + 4, $h + 4) +} + +sub _draw { + my ($self) = @_; + + glPushMatrix; + glTranslate 0.375, 0.375; + + my ($w, $h) = @$self{qw(w h)}; + + glColor 1, 0.8, 0.4; + glBegin GL_QUADS; + glVertex 0 , 0; + glVertex 0 , $h; + glVertex $w, $h; + glVertex $w, 0; + glEnd; + + glColor 0, 0, 0; + glBegin GL_LINE_LOOP; + glVertex 0 , 0; + glVertex 0 , $h; + glVertex $w, $h; + glVertex $w, 0; + glEnd; + + glPopMatrix; + + glTranslate 2, 2; + $self->SUPER::_draw; } #############################################################################