menuret = vmui.menuset(filemenu, 3, 43, reclick=0, fontsize=26) if menuret == "HELP": subprocess.Popen( ["python", "helpview.py", "launcher.xml"]) if menuret == "ABOUT2": subprocess.Popen([ "python", "MK2-TOOLS.py", "textview", "README.md" ]) if menuret == "ABOUT": vmui.aboutdiag(diagabt, (screenx // 2), (screeny // 2)) if menuret == "SETBG": vmui.settheme(3, 43) scupdate = 1 bg = (libthemeconf.bgmake(None)).convert() bg = pygame.transform.scale(bg, (screenx, screeny)) bg.blit(bgoverlay, ((screenx - 250), (screeny - 250))) redrawhud = 1 if menuret == "QUIT": qflg = 1 for wid in activewids: try: wid.hostquit() except Exception as err: errorreport(wid.title, "Host Quit", err) break #system menu
#help button if filemenux.collidepoint(event.pos) == 1 and event.button == 1: menuret = vmui.menuset(filemenu, 3, 45, reclick=0, fontsize=26) if menuret == "HELP": subprocess.Popen(["python", "helpview.py", "fileview.xml"]) if menuret == "QUIT": quitflag = 1 break if menuret == "ABOUT": if panemode == 2: vmui.aboutdiag(diagabt, (screenx // 2), (screeny // 2)) else: vmui.okdiag(diagabt, (screenx // 2), (screeny // 2)) if menuret == "SETBG": vmui.settheme(3, 45) scupdate = 1 filebg = (libthemeconf.bgmake(filehud)).convert() if menuret == "NEW": subprocess.Popen(["python", "fileview2.py"]) if panex.collidepoint(event.pos) == 1 and event.button == 1: if panemode == 1: panemode = 2 screensurf = pygame.display.set_mode((800, 600)) scupdate = 1 screenx = 800 screeny = 600 hudupdate = 1 else: panemode = 1 screensurf = pygame.display.set_mode((420, 600))
if event.type == MOUSEBUTTONDOWN: if themex.collidepoint(event.pos) == 1 and event.button == 1: curbak = curtheme curtheme = vmui.menuset(thememenu, themexy, 45, reclick=0, fontsize=26) if curtheme == None: curtheme = curbak libthemeconf.setconf("theme", "themefile", curtheme) curthemename = (libthemeconf.getthemeinfo(curtheme))[0] scupdate = 1 if bgx.collidepoint(event.pos) == 1 and event.button == 1: vmui.settheme(bgxy, 45, nosave=1) curbg = int(libthemeconf.getconf("desk", "bgtheme")) curbgname = vmui.getbgname(curbg) scupdate = 1 if fmx.collidepoint(event.pos) == 1 and event.button == 1: menuret = vmui.menuset(filemenu, fmxy, 45, reclick=0, fontsize=26) if menuret == "HELP": subprocess.Popen(["python", "helpview.py", "theme.xml"]) if menuret == "SAVE": libthemeconf.saveconf() vmui.okdiag(themenot, (screenx // 2), (screeny // 2)) if menuret == "RESET":