Fix credits and settings dropdowns, add high score, fps counter

This commit is contained in:
csd4ni3l
2025-06-17 15:08:24 +02:00
parent da650a5bda
commit ab11d92e3a
7 changed files with 79 additions and 26 deletions

View File

@@ -1,4 +1,5 @@
from panda3d.core import GraphicsPipeSelection
from ursina.prefabs.dropdown_menu import DropdownMenu
def get_closest_resolution():
allowed_resolutions = [(1366, 768), (1440, 900), (1600,900), (1920,1080), (2560,1440), (3840,2160)]
@@ -24,6 +25,25 @@ def get_closest_resolution():
)
return closest_resolution
class Dropdown(DropdownMenu):
def __init__(self, text='', buttons = None, **kwargs):
super().__init__(text, buttons, **kwargs)
self.scale = (.4,.04)
def on_mouse_enter(self):
...
def input(self, key):
super().input(key)
if key == 'left mouse down' and self.hovered:
if not self.buttons[0].enabled:
self.open()
else:
self.close()
class FakePyPresence():
def __init__(self):
...