mirror of
https://gitlab.com/GameFeverOnline/mmm-nsf-changer.git
synced 2025-12-17 09:27:46 -04:00
added now playing text
This commit is contained in:
parent
c98316446b
commit
f38c4b3edf
1 changed files with 22 additions and 13 deletions
|
|
@ -94,7 +94,7 @@ def check_if_new_version():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
#add
|
#add
|
||||||
mmm_version = "1.8.5.2"
|
mmm_version = "1.8.5.1"
|
||||||
def check_version(version=False):
|
def check_version(version=False):
|
||||||
api_version = "https://api.megamanmaker.com/version"
|
api_version = "https://api.megamanmaker.com/version"
|
||||||
ver = requests.get(api_version)
|
ver = requests.get(api_version)
|
||||||
|
|
@ -319,8 +319,8 @@ layout = [
|
||||||
[title],
|
[title],
|
||||||
[sg.Text("Input NSF File:"), sg.Input(sg.user_settings_get_entry('-INPUT_NSF-', ''), key="-IN-"),sg.FileBrowse(file_types=(("Supported Formats",".nsf .spc .vgm .nsfe .gbs .gym .ay .hes .kss .sap"),("NSF Files", "*.nsf*"),("NSFe Files", "*.nsfe*"),("SNES Files", "*.spc*"),("Gameboy Files", "*.gbs*"), ("Sega Genesis VGM", "*.vgm*"),("Sega Genesis GYM", "*.gym*"), ("ZX Spectrum", "*.ay*"), ("TurboGrafx 16", "*.hes*"), ("MSX Home Computer", "*.kss*"), ("Atari Pokey", "*.sap*"),))],
|
[sg.Text("Input NSF File:"), sg.Input(sg.user_settings_get_entry('-INPUT_NSF-', ''), key="-IN-"),sg.FileBrowse(file_types=(("Supported Formats",".nsf .spc .vgm .nsfe .gbs .gym .ay .hes .kss .sap"),("NSF Files", "*.nsf*"),("NSFe Files", "*.nsfe*"),("SNES Files", "*.spc*"),("Gameboy Files", "*.gbs*"), ("Sega Genesis VGM", "*.vgm*"),("Sega Genesis GYM", "*.gym*"), ("ZX Spectrum", "*.ay*"), ("TurboGrafx 16", "*.hes*"), ("MSX Home Computer", "*.kss*"), ("Atari Pokey", "*.sap*"),))],
|
||||||
[sg.Text("MegaMaker Folder:"), sg.Input(sg.user_settings_get_entry('-MEGAMAKER_FOLDER-', ''), key="-OUT-"), sg.FolderBrowse()],
|
[sg.Text("MegaMaker Folder:"), sg.Input(sg.user_settings_get_entry('-MEGAMAKER_FOLDER-', ''), key="-OUT-"), sg.FolderBrowse()],
|
||||||
[sg.TabGroup([[sg.Tab("Play Now", change_all), sg.Tab("Switch a Song", change_one)]]), sg.Image(data=gif, key='_IMAGE_')],
|
[sg.TabGroup([[sg.Tab("Play Now", change_all), sg.Tab("Switch a Song", change_one)]]),],
|
||||||
[sg.Exit(),sg.Button("About")],
|
[sg.Exit(),sg.Button("About"),sg.Push(), sg.Frame('\U0001F3B5 Now Playing \U0001F3B5', [[sg.Text("Default Songs", key="-PLAYING-")]]), sg.Image(data=gif, key='_IMAGE_')],
|
||||||
]
|
]
|
||||||
|
|
||||||
how_to_use = "I made this tool to be able to change the music for any Mega Man Maker level while playing the game. It works by replacing every nsf file with a custom one, but while preserving the original folders and file names.\n\nTo use it, just choose a nsf file and then tell the program where you store the *game* folder. That is where the .exe is, not the user folder.\n\nIf you find this useful, you can check out my YouTube Channel or my blog since I will keep making tools like this. Also, if you find any bugs or errors remember to notify me at GitLab by making an Issue."
|
how_to_use = "I made this tool to be able to change the music for any Mega Man Maker level while playing the game. It works by replacing every nsf file with a custom one, but while preserving the original folders and file names.\n\nTo use it, just choose a nsf file and then tell the program where you store the *game* folder. That is where the .exe is, not the user folder.\n\nIf you find this useful, you can check out my YouTube Channel or my blog since I will keep making tools like this. Also, if you find any bugs or errors remember to notify me at GitLab by making an Issue."
|
||||||
|
|
@ -360,18 +360,25 @@ while True:
|
||||||
if event == "About":
|
if event == "About":
|
||||||
sg.popup(how_to_use)
|
sg.popup(how_to_use)
|
||||||
if event == "Mute":
|
if event == "Mute":
|
||||||
if values["-BOSS-"] == True or values["-LEVEL-"] == True:
|
if values["-ALL-"] != True:
|
||||||
if values["-BOSS-"] == True and values["-LEVEL-"] == True:
|
if values["-BOSS-"] == True:
|
||||||
whitelist = []
|
if values["-BLACKLIST-"] == True:
|
||||||
elif values["-BOSS-"] == True:
|
whitelist = whitelist_to_blacklist(boss_music())
|
||||||
whitelist = boss_music()
|
else:
|
||||||
|
whitelist = boss_music()
|
||||||
elif values["-LEVEL-"] == True:
|
elif values["-LEVEL-"] == True:
|
||||||
whitelist = level_music()
|
if values["-BLACKLIST-"] == True:
|
||||||
create_mute_file(mute_nsf)
|
whitelist = whitelist_to_blacklist(level_music())
|
||||||
|
else:
|
||||||
|
whitelist = level_music()
|
||||||
|
else:
|
||||||
|
whitelist = []
|
||||||
|
create_mute_file(mute_nsf)
|
||||||
|
if not nsf_changer(os.path.join(os.path.dirname(__file__), "mmm_nsf_changer_mute.nsf"), values["-OUT-"], whitelist=whitelist):
|
||||||
|
restore_ogmusic(values["-OUT-"])
|
||||||
if not nsf_changer(os.path.join(os.path.dirname(__file__), "mmm_nsf_changer_mute.nsf"), values["-OUT-"], whitelist=whitelist):
|
if not nsf_changer(os.path.join(os.path.dirname(__file__), "mmm_nsf_changer_mute.nsf"), values["-OUT-"], whitelist=whitelist):
|
||||||
restore_ogmusic(values["-OUT-"])
|
sg.popup_error("MegaMaker folder is not valid or definitions are out of date.")
|
||||||
if not nsf_changer(os.path.join(os.path.dirname(__file__), "mmm_nsf_changer_mute.nsf"), values["-OUT-"], whitelist=whitelist):
|
window["-PLAYING-"].update(f"MUTED")
|
||||||
sg.popup_error("MegaMaker folder is not valid or definitions are out of date.")
|
|
||||||
if event == "Replace Song":
|
if event == "Replace Song":
|
||||||
if values["-DROPDOWN-"] == "":
|
if values["-DROPDOWN-"] == "":
|
||||||
sg.popup_error('Please select which Output NSF File to replace. If not, use "Replace *All* NSF Music".')
|
sg.popup_error('Please select which Output NSF File to replace. If not, use "Replace *All* NSF Music".')
|
||||||
|
|
@ -405,10 +412,12 @@ while True:
|
||||||
restore_ogmusic(values["-OUT-"])
|
restore_ogmusic(values["-OUT-"])
|
||||||
if not nsf_changer(values["-IN-"], values["-OUT-"], whitelist=whitelist):
|
if not nsf_changer(values["-IN-"], values["-OUT-"], whitelist=whitelist):
|
||||||
sg.popup_error("MegaMaker folder is not valid or definitions out of date.")
|
sg.popup_error("MegaMaker folder is not valid or definitions out of date.")
|
||||||
|
window["-PLAYING-"].update(os.path.basename(values["-IN-"]))
|
||||||
if event == "Restore Music": # Needs testing
|
if event == "Restore Music": # Needs testing
|
||||||
# sg.popup_error("DOESNT WORK EITHER HAHAHAHAHAHAA")
|
# sg.popup_error("DOESNT WORK EITHER HAHAHAHAHAHAA")
|
||||||
if not restore_ogmusic(values["-OUT-"]):
|
if not restore_ogmusic(values["-OUT-"]):
|
||||||
sg.popup_error("Already Restored or wrong Mega Man Maker folder.")
|
sg.popup_error("Already Restored or wrong Mega Man Maker folder.")
|
||||||
|
window["-PLAYING-"].update("Default Songs")
|
||||||
if event == "Download and Restore Music":
|
if event == "Download and Restore Music":
|
||||||
sg.popup_yes_no("WARNING: This will erase all custom songs.\nDo you want to continue?", location=window.current_location())
|
sg.popup_yes_no("WARNING: This will erase all custom songs.\nDo you want to continue?", location=window.current_location())
|
||||||
window["-LAST-CHANGED-"].update("")
|
window["-LAST-CHANGED-"].update("")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue