1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| #!/usr/bin/python
# -*- coding: cp1252 -*-
from os import chdir
chdir("C:/Fk/Programmation/Python")
import wx
class Accueil(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title)
#p=wx.Panel(self)
self.CreateStatusBar()
toolbar = self.CreateToolBar()
toolbar.Realize()
menu = wx.Menu()
J3oueurs = menu.Append(-1, "&3 Joueurs", "jeu pour 2 joueurs contrôlés par l'ordinateur et un joueur humain")
self.Bind(wx.EVT_MENU, self.OnJ3, J3oueurs)
J4oueurs = menu.Append(-1, "&4 Joueurs", "jeu pour 3 joueurs contrôlés par l'ordinateur et un joueur humain")
J5oueurs = menu.Append(-1, "&5 Joueurs", "jeu pour 4 joueurs contrôlés par l'ordinateur et un joueur humain")
menu.AppendSeparator()
exit = menu.Append(-1, "&Quitter", "quitter Zetarot")
self.Bind(wx.EVT_MENU, self.OnQuitter, exit)
menuBar=wx.MenuBar()
menuBar.Append(menu, "Menu")
self.SetMenuBar(menuBar)
imgaccueil = wx.Image("zetarot page accueil 1280-827-24bits.jpg", wx.BITMAP_TYPE_ANY)
bg=wx.StaticBitmap(wx.Panel(self),-1,wx.BitmapFromImage(imgaccueil))
self.Maximize()
self.Show(True)
def OnQuitter(self, event):
self.Close()
def OnJ3(self, event):
p=wx.Panel(Accueil)
imgplateau = wx.Image("zeplateau.gif", wx.BITMAP_TYPE_ANY)
bg0=wx.StaticBitmap(self,-1,wx.BitmapFromImage(imgplateau))
imcarte1 = wx.Image("atout n°1.gif", wx.BITMAP_TYPE_ANY)
bg1=wx.StaticBitmap(self,-1,wx.BitmapFromImage(imgplateau))
app = wx.App()
Accueil(None, -1, ' ZeTarot')
app.MainLoop() |
Partager