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.347 by root, Mon Aug 14 03:41:28 2006 UTC vs.
Revision 1.351 by root, Sun Oct 1 12:08:58 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 } 905 }
906 906
907 $self->_render; 907 $self->_render;
908 }; 908 };
1966 ++$self->{cursor} if $self->{cursor} < length $self->{text}; 1966 ++$self->{cursor} if $self->{cursor} < length $self->{text};
1967 } elsif ($sym == CFPlus::SDLK_HOME) { 1967 } elsif ($sym == CFPlus::SDLK_HOME) {
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
1972 $text = "";
1973 $self->{cursor} = 0;
1971 } elsif ($uni == 27) { 1974 } elsif ($uni == 27) {
1972 $self->emit ('escape'); 1975 $self->emit ('escape');
1973 } elsif ($uni) { 1976 } elsif ($uni) {
1974 substr $text, $self->{cursor}++, 0, chr $uni; 1977 substr $text, $self->{cursor}++, 0, chr $uni;
1975 } else { 1978 } else {
2955 my ($W, $H) = @{$self->{children}[0]}{qw(w h)}; 2958 my ($W, $H) = @{$self->{children}[0]}{qw(w h)};
2956 2959
2957 $self->{texture} ||= new_from_opengl CFPlus::Texture $W, $H, sub { 2960 $self->{texture} ||= new_from_opengl CFPlus::Texture $W, $H, sub {
2958 glClearColor 0, 0, 0, 0; 2961 glClearColor 0, 0, 0, 0;
2959 glClear GL_COLOR_BUFFER_BIT; 2962 glClear GL_COLOR_BUFFER_BIT;
2963
2964 {
2965 package CFPlus::UI::Base;
2966
2967 local ($draw_x, $draw_y, $draw_w, $draw_h) =
2968 (0, 0, $self->{w}, $self->{h});
2969 }
2960 2970
2961 my $top = int $self->{children}[1]{range}[0]; 2971 my $top = int $self->{children}[1]{range}[0];
2962 2972
2963 my $paridx = 0; 2973 my $paridx = 0;
2964 my $top_paragraph; 2974 my $top_paragraph;
3833 } 3843 }
3834 3844
3835 1 3845 1
3836 }; 3846 };
3837 3847
3838 my $tooltip = "$spell->{message}$TOOLTIP_ALL"; 3848 my $tooltip = (CFPlus::asxml $spell->{message}) . $TOOLTIP_ALL;
3839 3849
3840 #TODO: add path info to tooltip 3850 #TODO: add path info to tooltip
3841 #$self->add (6, $row, new CFPlus::UI::Label text => $spell->{path}); 3851 #$self->add (6, $row, new CFPlus::UI::Label text => $spell->{path});
3842 3852
3843 $self->add (0, $row, new CFPlus::UI::Face 3853 $self->add (0, $row, new CFPlus::UI::Face
4121 glLoadIdentity; 4131 glLoadIdentity;
4122 4132
4123 { 4133 {
4124 package CFPlus::UI::Base; 4134 package CFPlus::UI::Base;
4125 4135
4126 ($draw_x, $draw_y, $draw_w, $draw_h) = 4136 local ($draw_x, $draw_y, $draw_w, $draw_h) =
4127 (0, 0, $self->{w}, $self->{h}); 4137 (0, 0, $self->{w}, $self->{h});
4128 } 4138 }
4129 4139
4130 $self->_draw; 4140 $self->_draw;
4131} 4141}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines