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.348 by root, Thu Aug 17 01:27:28 2006 UTC vs.
Revision 1.353 by root, Thu Nov 16 19:42:45 2006 UTC

898 glClear GL_COLOR_BUFFER_BIT; 898 glClear GL_COLOR_BUFFER_BIT;
899 899
900 { 900 {
901 package CFPlus::UI::Base; 901 package CFPlus::UI::Base;
902 902
903 ($draw_x, $draw_y, $draw_w, $draw_h) = 903 local ($draw_x, $draw_y, $draw_w, $draw_h) =
904 (0, 0, $self->{w}, $self->{h}); 904 (0, 0, $self->{w}, $self->{h});
905
906 $self->_render;
905 } 907 }
906
907 $self->_render;
908 }; 908 };
909} 909}
910 910
911sub _draw { 911sub _draw {
912 my ($self) = @_; 912 my ($self) = @_;
1968 $self->{cursor} = 0; 1968 $self->{cursor} = 0;
1969 } elsif ($sym == CFPlus::SDLK_END) { 1969 } elsif ($sym == CFPlus::SDLK_END) {
1970 $self->{cursor} = length $text; 1970 $self->{cursor} = length $text;
1971 } elsif ($uni == 21) { # ctrl-u 1971 } elsif ($uni == 21) { # ctrl-u
1972 $text = ""; 1972 $text = "";
1973 $self->{cursor} = 0;
1973 } elsif ($uni == 27) { 1974 } elsif ($uni == 27) {
1974 $self->emit ('escape'); 1975 $self->emit ('escape');
1975 } elsif ($uni) { 1976 } elsif ($uni) {
1976 substr $text, $self->{cursor}++, 0, chr $uni; 1977 substr $text, $self->{cursor}++, 0, chr $uni;
1977 } else { 1978 } else {
2958 2959
2959 $self->{texture} ||= new_from_opengl CFPlus::Texture $W, $H, sub { 2960 $self->{texture} ||= new_from_opengl CFPlus::Texture $W, $H, sub {
2960 glClearColor 0, 0, 0, 0; 2961 glClearColor 0, 0, 0, 0;
2961 glClear GL_COLOR_BUFFER_BIT; 2962 glClear GL_COLOR_BUFFER_BIT;
2962 2963
2964 package CFPlus::UI::Base;
2965 local ($draw_x, $draw_y, $draw_w, $draw_h) =
2966 (0, 0, $self->{w}, $self->{h});
2967
2963 my $top = int $self->{children}[1]{range}[0]; 2968 my $top = int $self->{children}[1]{range}[0];
2964 2969
2965 my $paridx = 0; 2970 my $paridx = 0;
2966 my $top_paragraph; 2971 my $top_paragraph;
2967 my $top = int $self->{children}[1]{range}[0]; 2972 my $top = int $self->{children}[1]{range}[0];
3283 3288
3284package CFPlus::UI::Buttonbar; 3289package CFPlus::UI::Buttonbar;
3285 3290
3286our @ISA = CFPlus::UI::HBox::; 3291our @ISA = CFPlus::UI::HBox::;
3287 3292
3288# TODO: should actualyl wrap buttons and other goodies. 3293# TODO: should actually wrap buttons and other goodies.
3289 3294
3290############################################################################# 3295#############################################################################
3291 3296
3292package CFPlus::UI::Menu; 3297package CFPlus::UI::Menu;
3293 3298
3835 } 3840 }
3836 3841
3837 1 3842 1
3838 }; 3843 };
3839 3844
3840 my $tooltip = "$spell->{message}$TOOLTIP_ALL"; 3845 my $tooltip = (CFPlus::asxml $spell->{message}) . $TOOLTIP_ALL;
3841 3846
3842 #TODO: add path info to tooltip 3847 #TODO: add path info to tooltip
3843 #$self->add (6, $row, new CFPlus::UI::Label text => $spell->{path}); 3848 #$self->add (6, $row, new CFPlus::UI::Label text => $spell->{path});
3844 3849
3845 $self->add (0, $row, new CFPlus::UI::Face 3850 $self->add (0, $row, new CFPlus::UI::Face
4123 glLoadIdentity; 4128 glLoadIdentity;
4124 4129
4125 { 4130 {
4126 package CFPlus::UI::Base; 4131 package CFPlus::UI::Base;
4127 4132
4128 ($draw_x, $draw_y, $draw_w, $draw_h) = 4133 local ($draw_x, $draw_y, $draw_w, $draw_h) =
4129 (0, 0, $self->{w}, $self->{h}); 4134 (0, 0, $self->{w}, $self->{h});
4130 }
4131 4135
4132 $self->_draw; 4136 $self->_draw;
4137 }
4133} 4138}
4134 4139
4135############################################################################# 4140#############################################################################
4136 4141
4137package CFPlus::UI; 4142package CFPlus::UI;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines