redesign if_failed_return_to_unblocked to if_failed_return_to_boolean
This commit is contained in:
@@ -118,7 +118,7 @@ impl GameNetworking {
|
||||
in_rule_exists || out_rule_exists
|
||||
}
|
||||
|
||||
pub fn if_failed_return_to_unblocked(&mut self) {
|
||||
pub fn if_failed_return_to_boolean(&mut self) {
|
||||
if self.blocked_status == BlockedStatus::Failed && !self.counting {
|
||||
self.counting = true;
|
||||
self.timer = Instant::now();
|
||||
@@ -128,7 +128,7 @@ impl GameNetworking {
|
||||
&& self.timer.elapsed() >= INTERVAL
|
||||
{
|
||||
self.counting = false;
|
||||
self.blocked_status = BlockedStatus::Unblocked;
|
||||
self.blocked_status = Self::is_blocked().into();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ impl App {
|
||||
.tint(self.game_networking.blocked_status.to_color32()),
|
||||
)
|
||||
.on_hover_text("This turns yellow if GTA Tools\ncannot find your game.");
|
||||
self.game_networking.if_failed_return_to_unblocked();
|
||||
self.game_networking.if_failed_return_to_boolean();
|
||||
label
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
|
||||
Reference in New Issue
Block a user