--- deliantra/Deliantra-Client/DC/UI.pm 2006/04/17 19:21:00 1.121 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/04/17 19:50:22 1.123 @@ -227,7 +227,7 @@ if ($self == $HOVER && $self->{can_hover}) { my ($x, $y) = @$self{qw(x y)}; - glColor 0, 0, 1, 0.2; + glColor 1, 0.8, 0.5, 0.2; glEnable GL_BLEND; glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; glBegin GL_QUADS; @@ -1045,17 +1045,19 @@ glColor @{$self->{fg}}; - my $x = + $self->{ox} = int ( $self->{align} < 0 ? $self->{padding} : $self->{align} > 0 ? $self->{w} - $tex->{w} - $self->{padding} - : ($self->{w} - $tex->{w}) * 0.5; + : ($self->{w} - $tex->{w}) * 0.5 + ); - my $y = + $self->{oy} = int ( $self->{valign} < 0 ? $self->{padding} : $self->{valign} > 0 ? $self->{h} - $tex->{h} - $self->{padding} - : ($self->{h} - $tex->{h}) * 0.5; + : ($self->{h} - $tex->{h}) * 0.5 + ); - $tex->draw_quad (int $x, int $y); + $tex->draw_quad ($self->{ox}, $self->{oy}); glDisable GL_TEXTURE_2D; glDisable GL_BLEND; @@ -1226,8 +1228,8 @@ glColor @{$self->{fg}}; glBegin GL_LINES; - glVertex $self->{cur_x}, $self->{cur_y}; - glVertex $self->{cur_x}, $self->{cur_y} + $self->{cur_h}; + glVertex $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy}; + glVertex $self->{cur_x} + $self->{ox}, $self->{cur_y} + $self->{oy} + $self->{cur_h}; glEnd; } } @@ -1274,7 +1276,7 @@ padding => 4, fg => [1, 1, 1], bg => [1, 1, 1, 0.2], - active_fg => [1, 1, 0], + active_fg => [0, 0, 1], can_hover => 1, @_ ) @@ -1886,9 +1888,9 @@ my $sym = $ev->key_sym; if ($sym == SDLK_KP5) { - $::CONN->user_send ("command stay fire"); + $::CONN->user_send ("stay fire"); } elsif ($sym == SDLK_a) { - $::CONN->user_send ("command apply"); + $::CONN->user_send ("apply"); } elsif ($sym == SDLK_QUOTE) { $self->emit ('activate_console'); } elsif ($sym == SDLK_SLASH) { @@ -1896,12 +1898,12 @@ } elsif (exists $DIR{$sym}) { if ($mod & KMOD_SHIFT) { $self->{shft}++; - $::CONN->user_send ("command fire $DIR{$sym}[0]"); + $::CONN->user_send ("fire $DIR{$sym}[0]"); } elsif ($mod & KMOD_CTRL) { $self->{ctrl}++; - $::CONN->user_send ("command run $DIR{$sym}[0]"); + $::CONN->user_send ("run $DIR{$sym}[0]"); } else { - $::CONN->user_send ("command $DIR{$sym}[1]"); + $::CONN->user_send ("$DIR{$sym}[1]"); } } } @@ -1913,10 +1915,10 @@ my $sym = $ev->key_sym; if (!($mod & KMOD_SHIFT) && delete $self->{shft}) { - $::CONN->user_send ("command fire_stop"); + $::CONN->user_send ("fire_stop"); } if (!($mod & KMOD_CTRL ) && delete $self->{ctrl}) { - $::CONN->user_send ("command run_stop"); + $::CONN->user_send ("run_stop"); } }