Closed hubertyang88 closed 1 year ago
while trying to fix color , I fixed Connected status
To show connected info in bottom :
add $self->status_update();
in sub updateHook
sub updateHook {
my $hookname = shift;
my $r_args = shift;
my $self = shift;
return unless defined $self->{mw};
$self->updatePos();
$self->{mw}->update();
$self->setAiText("@ai_seq");
$self->status_update();
#if ($field->baseName eq $config{lockMap} || !$config{lockMap}) {
# $self->status_update("On Map: " . $field->baseName);
#} else {
# $self->status_update("On Map: " . $field->baseName . " | LockMap: " . $config{lockMap});
#}
}
and modify sub status_update (copied from tk.pm )
sub status_update {
my $self = shift;
my $Text = shift;
my $oldStatText = $Text || '';
if (!$conState) {
$Text = "Initializing...";
} elsif ($conState == 1) {
$Text = "Not connected";
} elsif ($conState > 1 && $conState < 5) {
$Text = "Connecting...";
} else {
$Text = "Connected";
}
if($oldStatText ne $Text) {
$self->{status_gen}->configure( -text => $Text);
}
}
bug is located , comment this line out return unless $colors_loaded;
in sub resetColors , now color works in Vx
------------------ Openkore Issues Template ------------------