def __init__(self): #bmp = wx.Image(os.path.join("theme", "logoX3.png")).ConvertToBitmap() image = wx.Image(os.path.join("theme", "logo3D.png"), wx.BITMAP_TYPE_PNG) #image = image.Scale(500, 375, wx.IMAGE_QUALITY_HIGH) image = image.Scale(400, 300, wx.IMAGE_QUALITY_HIGH) bmp = wx.BitmapFromImage(image) memDC = wx.MemoryDC() memDC.SetFont( wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Arial')) memDC.SetTextForeground(wx.BLACK) memDC.SelectObject(bmp) #memDC.DrawText(getVersion(), 470, 10) memDC.DrawText(getVersion(), 370, 10) #memDC.DrawText(_("loading..."), 10, 355) memDC.DrawText(_("loading..."), 10, 275) memDC.SelectObject(wx.NullBitmap) # TODO : replace wx.BORDER_SIMPLE (windows only) wx.SplashScreen.__init__(self, bmp, wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, 5000, None, -1, style=wx.BORDER_SIMPLE) self.Bind(wx.EVT_CLOSE, self.OnCloseSplash) self.fc = wx.FutureCall(2000, self.ShowMain)
def __init__(self): #bmp = wx.Image(os.path.join("theme", "logoX3.png")).ConvertToBitmap() image = wx.Image(os.path.join("theme", "logo3D.png"), wx.BITMAP_TYPE_PNG) #image = image.Scale(500, 375, wx.IMAGE_QUALITY_HIGH) image = image.Scale(400, 300, wx.IMAGE_QUALITY_HIGH) bmp = wx.BitmapFromImage(image) memDC = wx.MemoryDC() memDC.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Arial')) memDC.SetTextForeground(wx.BLACK) memDC.SelectObject(bmp) #memDC.DrawText(getVersion(), 470, 10) memDC.DrawText(getVersion(), 370, 10) #memDC.DrawText(_("loading..."), 10, 355) memDC.DrawText(_("loading..."), 10, 275) memDC.SelectObject(wx.NullBitmap) # TODO : replace wx.BORDER_SIMPLE (windows only) wx.SplashScreen.__init__(self, bmp, wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT, 5000, None, -1, style=wx.BORDER_SIMPLE) self.Bind(wx.EVT_CLOSE, self.OnCloseSplash) self.fc = wx.FutureCall(2000, self.ShowMain)
def main(): try: app = MyApp() app.MainLoop() except: show_error() if __name__ == "__main__": app = wx.PySimpleApp(0) options = getOptions() if options.version == True: print "current version is " + getVersion() # pinguino_version sys.exit(1) if options.author == True: print "jean-pierre mandon" print "regis blanchot" print "yeison cardona" sys.exit(1) if options.board != False or type(options.board) == type(1): # False = 0 curBoard = boardlist[options.board] boots = {"noboot": 0, "boot2": 0x2000, "boot4": 0x0C00} if options.bootloader: bootloader = options.bootloader[0]