def reac_func_restart(event): if event.what == constants.LAUNCH_DONE: w, h = varset.get_value("screen_w"), varset.get_value("screen_h") mdm = MetaDataManager() mdm.read_data(fn) mdm.data["screen_w"] = w mdm.data["screen_h"] = h mdm.data["fullscreen"] = varset.get_value("fullscreen") ## print("writing", mdm.data, fn) mdm.write_data(fn) #restart script python = sys.executable os.execl(python, python, *sys.argv)
def reac_func(event): font = event.value mdm = MetaDataManager() mdm.read_data(fn) mdm.data["font"] = font mdm.write_data(fn) #restart script python = sys.executable os.execl(python, python, *sys.argv)
def reac_func_restart(event): if event.what == constants.LAUNCH_DONE: w,h = varset.get_value("screen_w"), varset.get_value("screen_h") mdm = MetaDataManager() mdm.read_data(fn) mdm.data["screen_w"] = w mdm.data["screen_h"] = h mdm.data["fullscreen"] = varset.get_value("fullscreen") ## print("writing", mdm.data, fn) mdm.write_data(fn) #restart script python = sys.executable os.execl(python, python, * sys.argv)
def reac_func(event): if event.what == constants.LAUNCH_DONE: font_size = varset.get_value("fontsize") font_name = varset.get_value("fontname") ## print("font_name=", font_name) mdm = MetaDataManager() mdm.read_data(fn) mdm.data["font_size"] = font_size mdm.data["font"] = font_name ## print("writing", mdm.data, fn) mdm.write_data(fn) #restart script python = sys.executable os.execl(python, python, *sys.argv)
def reac_func(event): font = event.value mdm = MetaDataManager() mdm.read_data(fn) mdm.data["font"] = font mdm.write_data(fn) #restart script python = sys.executable os.execl(python, python, * sys.argv)
def reac_func_norestart(event): if event.what == constants.LAUNCH_DONE: w,h = varset.get_value("screen_w"), varset.get_value("screen_h") mdm = MetaDataManager() mdm.read_data(fn) mdm.data["screen_w"] = w mdm.data["screen_h"] = h mdm.data["fullscreen"] = varset.get_value("fullscreen") ## print("writing", mdm.data, fn) mdm.write_data(fn) #restart script flags = functions.get_screen().get_flags() if varset.get_value("fullscreen"): flags |= pygame.FULLSCREEN else: flags = 0 pygame.display.set_mode((w,h), flags) functions.get_current_menu()._elements[0].get_oldest_ancester().unblit_and_reblit() button.launched.blit() button.launched.update()
def reac_func(event): if event.what == constants.LAUNCH_DONE: font_size = varset.get_value("fontsize") font_name = varset.get_value("fontname") ## print("font_name=", font_name) mdm = MetaDataManager() mdm.read_data(fn) mdm.data["font_size"] = font_size mdm.data["font"] = font_name ## print("writing", mdm.data, fn) mdm.write_data(fn) #restart script python = sys.executable os.execl(python, python, * sys.argv)