mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
Update PyTaiko.py
This commit is contained in:
@@ -286,14 +286,15 @@ def check_discord_heartbeat(current_screen):
|
|||||||
|
|
||||||
def draw_fps(last_fps: int):
|
def draw_fps(last_fps: int):
|
||||||
curr_fps = ray.GetFPS()
|
curr_fps = ray.GetFPS()
|
||||||
|
pos = 20 * global_tex.screen_scale
|
||||||
if curr_fps != 0 and curr_fps != last_fps:
|
if curr_fps != 0 and curr_fps != last_fps:
|
||||||
last_fps = curr_fps
|
last_fps = curr_fps
|
||||||
if last_fps < 30:
|
if last_fps < 30:
|
||||||
ray.DrawText(f'{last_fps} FPS'.encode('utf-8'), 20, 20, 20, ray.RED)
|
pyray.draw_text_ex(global_data.font, f'{last_fps} FPS', (pos, pos), pos, 1, pyray.RED)
|
||||||
elif last_fps < 60:
|
elif last_fps < 60:
|
||||||
ray.DrawText(f'{last_fps} FPS'.encode('utf-8'), 20, 20, 20, ray.YELLOW)
|
pyray.draw_text_ex(global_data.font, f'{last_fps} FPS', (pos, pos), pos, 1, pyray.YELLOW)
|
||||||
else:
|
else:
|
||||||
ray.DrawText(f'{last_fps} FPS'.encode('utf-8'), 20, 20, 20, ray.LIME)
|
pyray.draw_text_ex(global_data.font, f'{last_fps} FPS', (pos, pos), pos, 1, pyray.LIME)
|
||||||
|
|
||||||
def draw_outer_border(screen_width: int, screen_height: int, last_color: pyray.Color):
|
def draw_outer_border(screen_width: int, screen_height: int, last_color: pyray.Color):
|
||||||
pyray.draw_rectangle(-screen_width, 0, screen_width, screen_height, last_color)
|
pyray.draw_rectangle(-screen_width, 0, screen_width, screen_height, last_color)
|
||||||
|
|||||||
Reference in New Issue
Block a user