Skip to content

Commit

Permalink
Unattached pygame
Browse files Browse the repository at this point in the history
  • Loading branch information
OfficialAhmed committed Jan 30, 2023
1 parent 34d5173 commit 94ea0e8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ test.txt
Data/Cache/pronunciation.xml
upload performance.log
Interface/New web-based UI.zip
verrsrc.h
icon.ico
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ ________________________________________
## _Credits_
* Special thanks to [@Lapy](https://twitter.com/Lapy05575948) for the help.
* Special thanks to [@DEFAULTDNB](https://github.com/DEFAULTDNB) AKA [@KiiWii](https://twitter.com/DefaultDNB) for the Database
* Sound Effects from [Pixabay](https://pixabay.com/).

### _Testers_:
* [@laz305](https://twitter.com/laz305)
Expand Down
12 changes: 0 additions & 12 deletions environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
html: class holds repeated html tags and styling for the UI
constant: class holds constant vars. Only getters
"""
import pygame
import os, datetime
from ftplib import FTP

Expand Down Expand Up @@ -103,7 +102,6 @@ def __init__(self) -> None:
self.logging = self.html.internal_log_msg("ps4", self.IP, 12, "font-weight:600; font-style:italic;")

self.update_pref()
pygame.mixer.init()

def get_window(self):
return Common.window
Expand Down Expand Up @@ -229,16 +227,6 @@ def set_user_pref(self, ip, port, font, i_path, d_path, hb):
Common.userIPath = i_path
Common.userDPath = d_path

def play_sound(self, location, loop=False) -> None:
try:
pygame.mixer.music.load(location)
if loop:
pygame.mixer.music.play(loops=-1)
else:
pygame.mixer.music.play()
except Exception as e:
self.logs("Cannot run music and sounds", str(e))

def logs(self, description, Type):
try:
error_file = open("Logs.txt", "a")
Expand Down
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
app = QtWidgets.QApplication(sys.argv)
screen_res = app.desktop().screenGeometry()
env = Common()
env.play_sound(f"{env.pref_path}bgm/home.@OfficialAhmed0", True)
env.set_screen_size(screen_res.width(), screen_res.height())

window = QtWidgets.QMainWindow()
Expand Down
Binary file modified requirements.txt
Binary file not shown.

0 comments on commit 94ea0e8

Please sign in to comment.