diff --git a/requirements.txt b/requirements.txt index 43ef307..b99b4ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,5 +6,5 @@ rlbot==1.* pip gevent -eel +eel==0.9.* PyQt5 diff --git a/rlbot_gui/gui.py b/rlbot_gui/gui.py index 15b367b..3ac3592 100644 --- a/rlbot_gui/gui.py +++ b/rlbot_gui/gui.py @@ -1,6 +1,4 @@ import os -import time -from datetime import datetime import eel from PyQt5.QtCore import QSettings @@ -38,21 +36,9 @@ def __init__(self): self.game_interface.load_interface() self.game_tick_packet = game_data_struct.GameTickPacket() - - # self.rate_limit = rate_limiter.RateLimiter(GAME_TICK_PACKET_REFRESHES_PER_SECOND) - self.last_call_real_time = datetime.now() # When we last called the Agent - def get_packet(self): - - now = datetime.now() - # self.rate_limit.acquire(now - self.last_call_real_time) - self.last_call_real_time = now - - self.pull_data_from_game() - return self.game_tick_packet - - def pull_data_from_game(self): self.game_interface.update_live_data_packet(self.game_tick_packet) + return self.game_tick_packet @eel.expose @@ -247,7 +233,7 @@ def on_websocket_close(page, sockets): def is_chrome_installed(): - return eel.browsers.chm.get_instance_path() is not None + return getattr(eel.browsers, "chm", getattr(eel.browsers, "chr", None)).get_instance_path() is not None def start(): @@ -256,7 +242,7 @@ def start(): packet_reader = GameTickReader() - options = {} + options = {"chromeFlags": ["--autoplay-policy=no-user-gesture-required"]} if not is_chrome_installed(): options = {'mode': 'system-default'} # Use the system default browser if the user doesn't have chrome. diff --git a/rlbot_gui/gui/imgs/frame.webm b/rlbot_gui/gui/imgs/frame.webm index b4ba369..40b93d0 100644 Binary files a/rlbot_gui/gui/imgs/frame.webm and b/rlbot_gui/gui/imgs/frame.webm differ diff --git a/rlbot_gui/gui/imgs/socials.png b/rlbot_gui/gui/imgs/socials.png new file mode 100644 index 0000000..1fe51c9 Binary files /dev/null and b/rlbot_gui/gui/imgs/socials.png differ diff --git a/rlbot_gui/gui/imgs/votes.png b/rlbot_gui/gui/imgs/votes.png new file mode 100644 index 0000000..1d13517 Binary files /dev/null and b/rlbot_gui/gui/imgs/votes.png differ diff --git a/rlbot_gui/gui/overlay.html b/rlbot_gui/gui/overlay.html index f7897b6..df646f6 100644 --- a/rlbot_gui/gui/overlay.html +++ b/rlbot_gui/gui/overlay.html @@ -51,6 +51,10 @@ z-index: -5; } + #goal-splash { + z-index: 7; + } + #footer > img { margin-left: auto; margin-right: auto; @@ -71,6 +75,33 @@ right: 7% !important; } + #votes { + align: center; + padding-top: 1%; + display: flex; + } + + #votes > div { + flex: 1; + position: absolute; + height: 3px; + width: 311px; + border-style: solid; + border-width: 7px; + } + + #votes-blue { + border-color: blue; + background-color: blue; + left: 149px; + } + + #votes-orange { + border-color: orange; + background-color: orange; + right: 147px; + } + .fade-in { visibility: visible; opacity: 1; @@ -86,11 +117,8 @@
- - + @@ -100,45 +128,93 @@