Skip to content

Commit

Permalink
Add Darwin support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Fuhr committed Jun 22, 2022
1 parent 5530647 commit daed54f
Show file tree
Hide file tree
Showing 8 changed files with 2,658 additions and 1,258 deletions.
2 changes: 2 additions & 0 deletions game_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def __init__(self):

if CURRENT_PLATFORM == 'Linux':
self.python_path = PYTHON_PATH
elif CURRENT_PLATFORM == 'Darwin':
self.python_path = PYTHON_PATH
else:
self.python_path = '"'+ CURRENT_PATH + PYTHON_PATH + '"'

Expand Down
Binary file modified images/logo_plain_sampled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions launcher_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
if CURRENT_PLATFORM == 'Linux':
BASE_FILEPATH_S = './'
RESOURCE_FILEPATH_S = './resources/'

elif CURRENT_PLATFORM == 'Darwin':
BASE_FILEPATH_S = './'
RESOURCE_FILEPATH_S = './resources/'

else:
BASE_FILEPATH_S = '.\\'
RESOURCE_FILEPATH_S = 'resources\\'
Expand Down Expand Up @@ -92,6 +97,8 @@
### Relative paths to python install ###
if CURRENT_PLATFORM == 'Linux':
PYTHON_PATH = '/usr/bin/python2'
elif CURRENT_PLATFORM == 'Darwin':
PYTHON_PATH = 'python3.10'
else:
PYTHON_PATH = '\panda3d\python\ppython.exe'

2 changes: 1 addition & 1 deletion launcher_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self):
def extractLinks(self, file_name):
# Read the YAML file
with open(file_name, 'r') as stream:
data_loaded = yaml.load(stream)
data_loaded = yaml.safe_load(stream)

for file_data in data_loaded:
link_line = (data_loaded[file_data])
Expand Down
Binary file modified qt_dev/images/logo_plain_sampled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions qt_dev/launcher_interface.ui
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ font: 14pt;</string>
<property name="styleSheet">
<string notr="true">QLabel {
background-color: rgba(249,249,249, 0);
color: black;
border-radius: 0;
border: 0px solid #ffffff;
padding: 0px;
Expand Down
3,895 changes: 2,638 additions & 1,257 deletions resources_rc.py

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions start_ui_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def __init__(self, qApp):
self.ui.launcher_status.setFont(QtGui.QFont("Anton", 14))
self.ui.pushButton.setFont(QtGui.QFont("BowlbyOneSC", 12))

# Redefine stylesheet
self.ui.launcher_state.setStyleSheet("background-color: rgba(249,249,249, 0); color: black; border-radius: 0; border: 0px solid #ffffff; padding: 0px;")
self.ui.launcher_status.setStyleSheet("background-color: rgba(249,249,249, 0); color: black; border-radius: 0; border: 0px solid #ffffff; padding: 0px;")

### UI Globals ###
self.counter = 0
self.complete_progress = 0
Expand Down Expand Up @@ -55,6 +59,11 @@ def setDefaultUI(self):
self.ui.pass_input.setDisabled(False)
self.ui.user_input.setText('')
self.ui.pass_input.setText('')

# Set stylesheet for user input
self.ui.user_input.setStyleSheet("color: black; background: white; border-radius: 8; border: 2px solid #cacaca; padding: 0px; font: 12pt")
self.ui.pass_input.setStyleSheet("color: black;background: white; border-radius: 8; border: 2px solid #cacaca; padding: 0px; font: 12pt")

self.ui.progress_bar.setValue(self.counter)
self.ui.progress_bar.setMaximum(100)

Expand Down

0 comments on commit daed54f

Please sign in to comment.