windowicon = pygame.image.load( os.path.join(os.path.join('VMSYSTEM', 'GFX'), 'settings64.png')) pygame.display.set_icon(windowicon) screensurf = pygame.display.set_mode((450, 400)) screenx = 450 screeny = 400 vmui.initui(screensurf, 1) #image data sbtcvmbadge = pygame.image.load( os.path.join("VMSYSTEM", "GFX", 'SBTCVMbadge.png')).convert() #setbg=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'settingsbg2.jpg')).convert() #swon=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'switchon.png')).convert() #swoff=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'switchoff.png')).convert() swn = vmui.makeswitchbtn("ON", "OFF") swon = swn[0] swoff = swn[1] #cpubtn=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'cpuspeed.png')).convert() #mixbtn=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'mixrate.png')).convert() #fskipbtn=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'frameskip.png')).convert() #fvfilemenu=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'fvfilemenu.png')).convert() fmicon = pygame.image.load(os.path.join("VMSYSTEM", "GFX", 'filemenuicon.png')).convert_alpha() fvfilemenu = vmui.makemenubtn("FILE", icon=fmicon) cpubtn = vmui.makemenubtn("CPU SPEED", width=80) mixbtn = vmui.makemenubtn("MIXER RATE", width=80) fskipbtn = vmui.makemenubtn("FRAME SKIP", width=80) #lbtn=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "settings"), 'lbtn.png')).convert()
os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvdmp.png')).convert() fvdummy = pygame.image.load( os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvdummy.png')).convert() panefilter1 = vmui.makerotbtn("Pane 1", "Filter") panefilter2 = vmui.makerotbtn("Pane 2", "Filter") #fvfilemenu=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvfilemenu.png')).convert() fmicon = pygame.image.load(os.path.join("VMSYSTEM", "GFX", 'filemenuicon.png')).convert_alpha() fvfilemenu = vmui.makemenubtn("FILE", icon=fmicon) #fvrunsw=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvrunsw.png')).convert() #fvviewsw=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvviewsw.png')).convert() fvrunview = vmui.makeswitchbtn("RUN", "VIEW") fvrunsw = fvrunview[0] fvviewsw = fvrunview[1] #fvpane1=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvpane1.png')).convert() #fvpane2=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvpane2.png')).convert() fvpane = vmui.makeswitchbtn("1 PANE", "2 PANE") fvpane1 = fvpane[0] fvpane2 = fvpane[1] #definitions of all non-directory file types... typ_png = filetyp("png", fvimg, "img", 2) typ_jpg = filetyp("jpg", fvimg, "img", 2) typ_jpeg = filetyp("jpeg", fvimg, "img", 2) typ_gif = filetyp("gif", fvimg, "img", 2)
#file browser code below: fvstreg=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvstreg.png')) fvtrom=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvtrom.png')) fvdir=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvdir.png')) fvup=pygame.transform.scale(pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvup.png')), (20, 20)) fvimg=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvimg.png')) fvtext=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvtext.png')) fvtasm=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvtasm.png')) fvall=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvall.png')) fvlog=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvlog.png')) fvdmp=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvdmp.png')) fvdummy=pygame.image.load(os.path.join(os.path.join('VMSYSTEM', 'GFX', "fv"), 'fvdummy.png')) fvrunview=vmui.makeswitchbtn("RUN", "VIEW") fvrunsw=fvrunview[0] fvviewsw=fvrunview[1] typefilter1=vmui.makerotbtn("Type", "Filter") class filetyp: def __init__(self, ext, typeicon, qxtype, filterflg): self.ext=ext #self.typeicon=pygame.transform.scale(typeicon, (20, 20)) self.typeicon=pygame.Surface((40, 25)) self.typeicon.fill((255, 255, 255)) self.typeiconfull=typeicon self.typeicon.blit(self.typeiconfull, (0, 0)) self.qxtype=qxtype self.filterflg=filterflg typ_png=filetyp("png", fvimg, "img", 2)