--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/17 15:18:57 1.25 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/05/19 18:39:08 1.30 @@ -81,6 +81,9 @@ sub draw { my ($self) = @_; + return + unless $CFClient::UI::FOCUS == $self || !$::FAST; + if (delete $self->{need_update}) { glNewList $self->{list}; @@ -114,6 +117,7 @@ glEnable GL_CONVOLUTION_2D; } + undef $self->{fow_texture};#d# remove $self->{fow_texture} = new CFClient::Texture w => $w, h => $h, @@ -145,17 +149,18 @@ glCallList $self->{list}; glPopMatrix; + # TNT2 emulates logops in software (or worse :) if ($CFClient::UI::FOCUS != $self) { - glColor 64/255, 64/255, 64/255; - glLogicOp GL_AND; - glEnable GL_COLOR_LOGIC_OP; + glColor 0.4, 0.2, 0.2, 0.9; + glEnable GL_BLEND; + glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; glBegin GL_QUADS; glVertex 0, 0; glVertex 0, $::HEIGHT; glVertex $::WIDTH, $::HEIGHT; glVertex $::WIDTH, 0; glEnd; - glDisable GL_COLOR_LOGIC_OP; + glDisable GL_BLEND; } } @@ -188,8 +193,12 @@ $::CONN->user_send ("stay fire"); } elsif ($uni == ord ",") { $::CONN->user_send ("take"); - } elsif ($uni == ord "\t") { + } elsif ($uni == ord "\t" or $uni == ord " ") { $::CONN->user_send ("apply"); + } elsif ($sym == CFClient::SDLK_KP_PLUS || $uni == ord "+") { + $::CONN->user_send ("rotateshoottype +"); + } elsif ($sym == CFClient::SDLK_KP_MINUS || $uni == ord "-") { + $::CONN->user_send ("rotateshoottype -"); } elsif ($uni == ord "'") { $self->emit ('activate_console'); } elsif ($uni == ord "/") { @@ -251,7 +260,7 @@ $tooltip =~ s/\s+$//; - $self->{command}{$command} = [$data, $tooltip, $widget, $cb]; + $self->{command}{$command} = [$data, $tooltip, $widget, $cb, ++$self->{command_id}]; } sub clr_commands { @@ -364,7 +373,7 @@ can_events => 1, tooltip_width => 0.33, fontsize => $_, - ), (0.8) x 6 + ), (0.8) x 16 ]; $self->{entry} = new CFClient::UI::Entry @@ -448,7 +457,7 @@ @match = map $self->{command}{$_->[0]}, sort { $a->[1] <=> $b->[1] - or (length $a->[0]) <=> (length $b->[0]) + or $self->{command}{$a->[0]}[4] <=> $self->{command}{$b->[0]}[4] } @match; $self->{last_search} = $cmd;