mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
Compare commits
1 Commits
46ddce2443
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5a3f1e9e5 |
15
PyTaiko.py
15
PyTaiko.py
@@ -47,6 +47,7 @@ from scenes.two_player.result import TwoPlayerResultScreen
|
|||||||
from scenes.two_player.song_select import TwoPlayerSongSelectScreen
|
from scenes.two_player.song_select import TwoPlayerSongSelectScreen
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
'''
|
||||||
DISCORD_APP_ID = '1451423960401973353'
|
DISCORD_APP_ID = '1451423960401973353'
|
||||||
try:
|
try:
|
||||||
RPC = Presence(DISCORD_APP_ID)
|
RPC = Presence(DISCORD_APP_ID)
|
||||||
@@ -55,6 +56,7 @@ try:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
discord_connected = False
|
discord_connected = False
|
||||||
logger.warning(f"Could not connect to Discord: {e}")
|
logger.warning(f"Could not connect to Discord: {e}")
|
||||||
|
'''
|
||||||
|
|
||||||
class Screens:
|
class Screens:
|
||||||
TITLE = "TITLE"
|
TITLE = "TITLE"
|
||||||
@@ -279,13 +281,14 @@ def check_discord_heartbeat(current_screen):
|
|||||||
details = f"Playing Song: {global_data.session_data[global_data.player_num].song_title}"
|
details = f"Playing Song: {global_data.session_data[global_data.player_num].song_title}"
|
||||||
else:
|
else:
|
||||||
details = "Idling"
|
details = "Idling"
|
||||||
|
'''
|
||||||
RPC.update(
|
RPC.update(
|
||||||
state=f"In Screen {current_screen}",
|
state=f"In Screen {current_screen}",
|
||||||
details=details,
|
details=details,
|
||||||
large_text="PyTaiko",
|
large_text="PyTaiko",
|
||||||
start=get_current_ms()/1000,
|
start=get_current_ms()/1000,
|
||||||
buttons=[{"label": "Play Now", "url": "https://github.com/Yonokid/PyTaiko"}]
|
buttons=[{"label": "Play Now", "url": "https://github.com/Yonokid/PyTaiko"}]
|
||||||
)
|
)'''
|
||||||
|
|
||||||
def draw_fps(last_fps: int):
|
def draw_fps(last_fps: int):
|
||||||
curr_fps = ray.GetFPS()
|
curr_fps = ray.GetFPS()
|
||||||
@@ -400,9 +403,9 @@ def main():
|
|||||||
|
|
||||||
while not ray.WindowShouldClose():
|
while not ray.WindowShouldClose():
|
||||||
current_time = get_current_ms()
|
current_time = get_current_ms()
|
||||||
if discord_connected and current_time > last_discord_check + 1000:
|
#if discord_connected and current_time > last_discord_check + 1000:
|
||||||
check_discord_heartbeat(current_screen)
|
#check_discord_heartbeat(current_screen)
|
||||||
last_discord_check = current_time
|
#last_discord_check = current_time
|
||||||
|
|
||||||
if ray.IsKeyPressed(global_data.config["keys"]["fullscreen_key"]):
|
if ray.IsKeyPressed(global_data.config["keys"]["fullscreen_key"]):
|
||||||
ray.ToggleFullscreen()
|
ray.ToggleFullscreen()
|
||||||
@@ -444,8 +447,8 @@ def main():
|
|||||||
|
|
||||||
ray.CloseWindow()
|
ray.CloseWindow()
|
||||||
audio.close_audio_device()
|
audio.close_audio_device()
|
||||||
if discord_connected:
|
#if discord_connected:
|
||||||
RPC.close()
|
#RPC.close()
|
||||||
global_tex.unload_textures()
|
global_tex.unload_textures()
|
||||||
screen_mapping[current_screen].on_screen_end("LOADING")
|
screen_mapping[current_screen].on_screen_end("LOADING")
|
||||||
logger.info("Window closed and audio device shut down")
|
logger.info("Window closed and audio device shut down")
|
||||||
|
|||||||
Reference in New Issue
Block a user