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.416 by root, Tue Jul 24 00:28:07 2007 UTC vs.
Revision 1.417 by root, Tue Jul 24 18:24:04 2007 UTC

2074 my $class = shift; 2074 my $class = shift;
2075 2075
2076 $class->SUPER::new ( 2076 $class->SUPER::new (
2077 fg => [1, 1, 1], 2077 fg => [1, 1, 1],
2078 bg => [0, 0, 0, 0.2], 2078 bg => [0, 0, 0, 0.2],
2079 active_bg => [1, 1, 1, 0.5], 2079 active_bg => [0, 0, 1, .2],
2080 active_fg => [0, 0, 0], 2080 active_fg => [1, 1, 1],
2081 active_outline => [1, 1, 0],
2081 can_hover => 1, 2082 can_hover => 1,
2082 can_focus => 1, 2083 can_focus => 1,
2083 valign => 0, 2084 valign => 0,
2084 can_events => 1, 2085 can_events => 1,
2085 ellipsise => 0, 2086 ellipsise => 0,
2242 2243
2243 unless (exists $self->{cur_h}) { 2244 unless (exists $self->{cur_h}) {
2244 my $text = substr $self->{text}, 0, $self->{cursor}; 2245 my $text = substr $self->{text}, 0, $self->{cursor};
2245 utf8::encode $text; 2246 utf8::encode $text;
2246 2247
2247 @$self{qw(cur_x cur_y cur_h)} = $self->{layout}->cursor_pos (length $text) 2248 @$self{qw(cur_x cur_y cur_h)} = $self->{layout}->cursor_pos (length $text);
2248 } 2249 }
2249 2250
2251 glColor_premultiply @{$self->{active_fg}};
2250 glBegin GL_LINES; 2252 glBegin GL_LINES;
2251 glVertex 0.5 + $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy}; 2253 glVertex 0.5 + $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy};
2252 glVertex 0.5 + $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy} + $self->{cur_h}; 2254 glVertex 0.5 + $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy} + $self->{cur_h};
2253 glEnd; 2255 glEnd;
2256
2257 glLineWidth 3;
2258 glColor @{$self->{active_outline}};
2259 glTranslate -.375, -.375;
2260 glBegin GL_LINE_LOOP;
2261 glVertex 0, 0;
2262 glVertex $self->{w}, 0;
2263 glVertex $self->{w}, $self->{h};
2264 glVertex 0, $self->{h};
2265 glEnd;
2266 glLineWidth 1;
2254 } 2267 }
2255} 2268}
2256 2269
2257############################################################################# 2270#############################################################################
2258 2271

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines