コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
    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)
コード例 #4
0
 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)
コード例 #5
0
 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)
コード例 #6
0
    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()
コード例 #7
0
    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)
コード例 #8
0
    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()