mirror of
https://github.com/csd4ni3l/aim-trainer.git
synced 2026-01-01 04:03:42 +01:00
Added option to customize enemy image path, and customize weapons
This commit is contained in:
@@ -18,6 +18,10 @@ weapons = {
|
||||
discord_presence_id = 1380237183352311838
|
||||
|
||||
settings = {
|
||||
"Gameplay": {
|
||||
"Enemy Image Directory": {"type": "directory_select", "config_key": "enemy_image_directory", "default": "assets/graphics/enemy"}
|
||||
},
|
||||
"Weapons": {"default": weapons},
|
||||
"Graphics": {
|
||||
"Window Mode": {"type": "option", "options": ["Windowed", "Fullscreen", "Borderless"], "config_key": "window_mode", "default": "Windowed"},
|
||||
"Resolution": {"type": "option", "options": ["1366x768", "1440x900", "1600x900", "1920x1080", "2560x1440", "3840x2160"], "config_key": "resolution"},
|
||||
@@ -33,7 +37,7 @@ settings = {
|
||||
"Miscellaneous": {
|
||||
"Discord RPC": {"type": "bool", "config_key": "discord_rpc", "default": True},
|
||||
},
|
||||
"Credits": {}
|
||||
"Credits": None
|
||||
}
|
||||
|
||||
settings_start_category = "Graphics"
|
||||
settings_start_category = "Gameplay"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from panda3d.core import GraphicsPipeSelection
|
||||
from ursina.prefabs.dropdown_menu import DropdownMenu
|
||||
from ursina.prefabs.file_browser import FileBrowser
|
||||
|
||||
def get_closest_resolution():
|
||||
allowed_resolutions = [(1366, 768), (1440, 900), (1600,900), (1920,1080), (2560,1440), (3840,2160)]
|
||||
@@ -44,6 +45,24 @@ class Dropdown(DropdownMenu):
|
||||
else:
|
||||
self.close()
|
||||
|
||||
class FileManager(FileBrowser):
|
||||
def open(self, path=None):
|
||||
if not self.selection:
|
||||
return
|
||||
|
||||
if not self.return_folders:
|
||||
if self.selection[0].is_dir():
|
||||
self.path = self.selection[0]
|
||||
return
|
||||
|
||||
elif not self.selection[0].is_dir():
|
||||
return
|
||||
|
||||
if hasattr(self, 'on_submit'):
|
||||
self.on_submit(self.selection)
|
||||
|
||||
self.close()
|
||||
|
||||
class FakePyPresence():
|
||||
def __init__(self):
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user