mirror of
https://github.com/csd4ni3l/aim-trainer.git
synced 2026-01-01 04:03:42 +01:00
Fix credits and settings dropdowns, add high score, fps counter
This commit is contained in:
@@ -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):
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user