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.198 by root, Fri May 12 02:08:52 2006 UTC vs.
Revision 1.199 by root, Fri May 12 15:45:42 2006 UTC

383sub set_parent { 383sub set_parent {
384 my ($self, $parent) = @_; 384 my ($self, $parent) = @_;
385 385
386 Scalar::Util::weaken ($self->{parent} = $parent); 386 Scalar::Util::weaken ($self->{parent} = $parent);
387 387
388
389 # TODO: req_w _does_change after ->reconfigure 388 # TODO: req_w _does_change after ->reconfigure
390 $self->check_size 389 $self->check_size
391 unless exists $self->{req_w}; 390 unless exists $self->{req_w};
392} 391}
393 392
777 $self->add ($self->{slider}); 776 $self->add ($self->{slider});
778 777
779 $self 778 $self
780} 779}
781 780
782#TODO# update range on size_allocate depeneing on child 781#TODO# update range on size_allocate depending on child
783# update viewport offset on scroll 782# update viewport offset on scroll
784 783
785############################################################################# 784#############################################################################
786 785
787package CFClient::UI::Frame; 786package CFClient::UI::Frame;
788 787
789our @ISA = CFClient::UI::Bin::; 788our @ISA = CFClient::UI::Bin::;
790 789
791use CFClient::OpenGL; 790use CFClient::OpenGL;
791
792sub new {
793 my $class = shift;
794
795 $class->SUPER::new (
796 bg => undef,
797 @_,
798 )
799}
800
801sub _draw {
802 my ($self) = @_;
803
804 if ($self->{bg}) {
805 my ($w, $h) = @$self{qw(w h)};
806
807 glEnable GL_BLEND;
808 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
809 glColor @{ $self->{bg} };
810
811 glBegin GL_QUADS;
812 glVertex 0 , 0;
813 glVertex 0 , $h;
814 glVertex $w, $h;
815 glVertex $w, 0;
816 glEnd;
817
818 glDisable GL_BLEND;
819 }
820
821 $self->SUPER::_draw;
822}
792 823
793############################################################################# 824#############################################################################
794 825
795package CFClient::UI::FancyFrame; 826package CFClient::UI::FancyFrame;
796 827

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines