|
@@ -29,15 +29,20 @@ class SpinningCursor(object):
|
|
|
self.itercycle = cycle(["/", "-", "\\", "|"])
|
|
|
self.count = 0
|
|
|
self.every = every
|
|
|
+
|
|
|
def reset(self):
|
|
|
self.itercycle = cycle(["/", "-", "\\", "|"])
|
|
|
self.count = 0
|
|
|
+
|
|
|
def click(self):
|
|
|
self.count += 1
|
|
|
return self.count % self.every == 0
|
|
|
+
|
|
|
def cycle(self):
|
|
|
return next(self.itercycle)
|
|
|
|
|
|
+ def again(self, count: int):
|
|
|
+ return self.count % count == 0
|
|
|
|
|
|
def merge(color_string):
|
|
|
""" Given a string of colorama ANSI, merge them if you can. """
|
|
@@ -297,7 +302,10 @@ class CIMWarpReport(object):
|
|
|
# This should be the CIM Report Data -- parse it
|
|
|
if self.warpcycle:
|
|
|
if self.warpcycle.click():
|
|
|
- self.queue_game.put("\b" + self.warpcycle.cycle())
|
|
|
+ self.queue_game.put("\b")
|
|
|
+ if self.warpcycle.again(1000):
|
|
|
+ self.queue_game.put(".")
|
|
|
+ self.queue_game.put(self.warpcycle.cycle())
|
|
|
|
|
|
work = line.strip()
|
|
|
parts = re.split(r"(?<=\d)\s", work)
|
|
@@ -424,7 +432,10 @@ class CIMPortReport(object):
|
|
|
# This should be the CIM Report Data -- parse it
|
|
|
if self.portcycle:
|
|
|
if self.portcycle.click():
|
|
|
- self.queue_game.put("\b" + self.portcycle.cycle())
|
|
|
+ self.queue_game.put("\b")
|
|
|
+ if self.portcycle.again(1000):
|
|
|
+ self.queue_game.put(".")
|
|
|
+ self.queue_game.put(self.portcycle.cycle())
|
|
|
|
|
|
work = line.replace("%", "")
|
|
|
|
|
@@ -2132,7 +2143,7 @@ class ProxyMenu(object):
|
|
|
|
|
|
self.queue_game.put(box.top())
|
|
|
text = self.c + "{0:^30}".format("TradeWars Proxy Active")
|
|
|
- text = text.replace('Active', BLINK + 'Active' + Style.RESET_ALL)
|
|
|
+ text = text.replace('Active', BLINK + 'Active' + Style.RESET_ALL + self.c)
|
|
|
self.queue_game.put(box.row(text))
|
|
|
self.queue_game.put(box.middle())
|
|
|
|