[UPDATE] GeoXY review for wheel
This commit is contained in:
parent
94bf7170b5
commit
cd6d1bad76
BIN
media/nowheelemu.png
Normal file
BIN
media/nowheelemu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
59
start.py
59
start.py
@ -34,22 +34,27 @@ import os
|
|||||||
|
|
||||||
def ViewRom(EmuName):
|
def ViewRom(EmuName):
|
||||||
|
|
||||||
WheelEmu="./data/roms/"+str(EmuName)+"/media/wheel/" + str(EmuName) + "_wheel.png"
|
|
||||||
NfL = IsImgExist(NfL,"emu")
|
|
||||||
|
|
||||||
OpenNfL=Image.open(NfL)
|
|
||||||
PhotoNfL=OpenNfL.resize((Square,Square))
|
|
||||||
TkNfL=ImageTk.PhotoImage(PhotoNfL)
|
WheelEmu="./data/roms/"+str(EmuName)+"/media/wheel/" + str(EmuName) + "_wheel.png"
|
||||||
LabelPNfL=Label(arkadeus, image=TkNfL)
|
IsWheelEmu = IsImgExist(WheelEmu,"wheelemu")
|
||||||
LabelPNfL.TkNfL = TkNfL
|
|
||||||
|
OpenWheelEmu=Image.open(IsWheelEmu)
|
||||||
|
ResizeOpenWheelEmu=OpenWheelEmu.resize((RomUpSquareSizeX,RomUpSquareSizeY))
|
||||||
|
TkOpenWheelEmu=ImageTk.PhotoImage(ResizeOpenWheelEmu)
|
||||||
|
LabelResizeOpenWheelEmu=Label(arkadeus, image=TkOpenWheelEmu)
|
||||||
|
LabelResizeOpenWheelEmu.TkOpenWheelEmu = TkOpenWheelEmu
|
||||||
|
print("AHHHHHHHHHHHHHHHHHH : " + str(IsWheelEmu))
|
||||||
|
|
||||||
Cnv.pack(fill = "both", expand = True)
|
Cnv.pack(fill = "both", expand = True)
|
||||||
# for IdCanvas in Cnv.find_all():
|
# for IdCanvas in Cnv.find_all():
|
||||||
# if IdCanvas != 1:
|
# if IdCanvas != 1:
|
||||||
# Cnv.delete(IdCanvas)
|
# Cnv.delete(IdCanvas)
|
||||||
|
|
||||||
Cnv.create_image(xL, yL, image=TkNfL)
|
Cnv.create_image(RomUpSquareX, RomUpSquareY, image=TkOpenWheelEmu)
|
||||||
print("Curent Emu : " + str(EmuRes[cM]))
|
print(str(RomUpSquareX) + " : " + str(RomUpSquareY) + "(" + str(RomUpSquareSizeX) + ":" + str(RomUpSquareSizeY) +")")
|
||||||
|
print("Curent Emu : " + str(EmuRes[RomCpt]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -97,6 +102,7 @@ def BackgroundEmu():
|
|||||||
def EnterEmu(GetEmuMod):
|
def EnterEmu(GetEmuMod):
|
||||||
global EmuMod
|
global EmuMod
|
||||||
global cpt
|
global cpt
|
||||||
|
if EmuMod == 0:
|
||||||
EmuMod=1
|
EmuMod=1
|
||||||
runMcpt = cpt + 1
|
runMcpt = cpt + 1
|
||||||
if runMcpt > EmuCpt:
|
if runMcpt > EmuCpt:
|
||||||
@ -139,6 +145,7 @@ def ViewEmu(cL,xL,yL,cM,xM,yM,cR,xR,yR):
|
|||||||
if IdCanvas != 1:
|
if IdCanvas != 1:
|
||||||
Cnv.delete(IdCanvas)
|
Cnv.delete(IdCanvas)
|
||||||
|
|
||||||
|
print (str(xL) + ":" + str(yL))
|
||||||
Cnv.create_image(xL, yL, image=TkNfL)
|
Cnv.create_image(xL, yL, image=TkNfL)
|
||||||
Cnv.create_image(xM, yM, image=TkNfM)
|
Cnv.create_image(xM, yM, image=TkNfM)
|
||||||
Cnv.create_image(xR, yR, image=TkNfR)
|
Cnv.create_image(xR, yR, image=TkNfR)
|
||||||
@ -161,8 +168,9 @@ def leftKey(GetEmuMod):
|
|||||||
print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt))
|
print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt))
|
||||||
ViewEmu(Lcpt,EmuLeftSquareX, EmuLeftSquareY,Mcpt,EmuMiddleSquareX, EmuMiddleSquareY,Rcpt,EmuRightSquareX, EmuRightSquareY)
|
ViewEmu(Lcpt,EmuLeftSquareX, EmuLeftSquareY,Mcpt,EmuMiddleSquareX, EmuMiddleSquareY,Rcpt,EmuRightSquareX, EmuRightSquareY)
|
||||||
if GetEmuMod == 1:
|
if GetEmuMod == 1:
|
||||||
|
global RomCpt
|
||||||
print ("get in ")
|
print ("get in ")
|
||||||
ViewRom(EmuRes[Mcpt])
|
ViewRom(EmuRes[RomCpt])
|
||||||
|
|
||||||
def rightKey(GetEmuMod):
|
def rightKey(GetEmuMod):
|
||||||
|
|
||||||
@ -181,6 +189,11 @@ def rightKey(GetEmuMod):
|
|||||||
Rcpt = 0
|
Rcpt = 0
|
||||||
print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt))
|
print("DEBUG : " + str(EmuMod) + " Emu : " + str(cpt))
|
||||||
ViewEmu(Lcpt,EmuLeftSquareX, EmuLeftSquareY,Mcpt,EmuMiddleSquareX, EmuMiddleSquareY,Rcpt,EmuRightSquareX, EmuRightSquareY)
|
ViewEmu(Lcpt,EmuLeftSquareX, EmuLeftSquareY,Mcpt,EmuMiddleSquareX, EmuMiddleSquareY,Rcpt,EmuRightSquareX, EmuRightSquareY)
|
||||||
|
if GetEmuMod == 1:
|
||||||
|
global RomCpt
|
||||||
|
print ("get in ")
|
||||||
|
ViewRom(EmuRes[RomCpt])
|
||||||
|
|
||||||
|
|
||||||
def Escape(GetEmuMod):
|
def Escape(GetEmuMod):
|
||||||
if GetEmuMod == 0:
|
if GetEmuMod == 0:
|
||||||
@ -307,11 +320,13 @@ RomIndiceY = RomIndice
|
|||||||
|
|
||||||
RomUpSquareX=RomIndiceX
|
RomUpSquareX=RomIndiceX
|
||||||
RomUpSquareY=RomIndiceY
|
RomUpSquareY=RomIndiceY
|
||||||
#RomUpSquareSizeX=round((Xsize/2)-(RomIndiceX/2)-RomIndiceX)
|
|
||||||
#RomUpSquareSizeY=round((Ysize/3)-(RomIndiceY*4))
|
|
||||||
|
|
||||||
RomUpSquareSizeX=((Xsize-(RomIndiceX*3))/2)
|
RomUpSquareSizeX=round(((Xsize-(RomIndiceX*3))/2))
|
||||||
RomUpSquareSizeY=(Ysize-(RomIndiceY))
|
RomUpSquareSizeY=round(((Ysize-(RomIndiceY*4))/3))
|
||||||
|
RomUpSquareX=round(RomIndiceX + RomUpSquareSizeX/2)
|
||||||
|
RomUpSquareY=round(RomIndiceY + RomUpSquareSizeY/2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RomMiddleSquareX=RomIndiceX
|
RomMiddleSquareX=RomIndiceX
|
||||||
RomMiddleSquareY=(RomIndiceY*2) + RomUpSquareSizeY
|
RomMiddleSquareY=(RomIndiceY*2) + RomUpSquareSizeY
|
||||||
@ -325,8 +340,11 @@ RomBottomSquareSizeY=RomUpSquareSizeY
|
|||||||
|
|
||||||
RomLeftSquareX=(RomIndiceX*2) + RomUpSquareSizeX
|
RomLeftSquareX=(RomIndiceX*2) + RomUpSquareSizeX
|
||||||
RomLeftSquareY=RomIndiceY
|
RomLeftSquareY=RomIndiceY
|
||||||
RomLeftSquareSizeX=RomUpSquareSizeX - RomIndiceX
|
RomLeftSquareSizeX=round(((Xsize-(RomIndiceX*3))/2))
|
||||||
RomLeftSquareSizeY=(RomIndiceY*2) + (RomUpSquareSizeY*3)
|
RomLeftSquareSizeY=round((Ysize-(RomIndiceY*2)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("RomIndice :" + str(RomIndice))
|
print("RomIndice :" + str(RomIndice))
|
||||||
print("RomIndiceX :" + str(RomIndiceX))
|
print("RomIndiceX :" + str(RomIndiceX))
|
||||||
@ -358,8 +376,13 @@ print("RomLeftSquareSizeY :" + str(RomLeftSquareSizeY))
|
|||||||
Cnv = Canvas( arkadeus, width = Ysize , height = Xsize)
|
Cnv = Canvas( arkadeus, width = Ysize , height = Xsize)
|
||||||
Cnv.pack(fill = "both", expand = True)
|
Cnv.pack(fill = "both", expand = True)
|
||||||
|
|
||||||
BackgroundEmu()
|
if EmuMod == 0:
|
||||||
ViewEmu(cpt,EmuLeftSquareX, EmuLeftSquareY,cpt+1,EmuMiddleSquareX, EmuMiddleSquareY,cpt+2,EmuRightSquareX, EmuRightSquareY)
|
BackgroundEmu()
|
||||||
|
ViewEmu(cpt,EmuLeftSquareX, EmuLeftSquareY,cpt+1,EmuMiddleSquareX, EmuMiddleSquareY,cpt+2,EmuRightSquareX, EmuRightSquareY)
|
||||||
|
|
||||||
|
if EmuMod == 1:
|
||||||
|
ViewEmu(cpt,EmuLeftSquareX, EmuLeftSquareY,cpt+1,EmuMiddleSquareX, EmuMiddleSquareY,cpt+2,EmuRightSquareX, EmuRightSquareY)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
arkadeus.bind("<Left>", lambda event: leftKey(EmuMod))
|
arkadeus.bind("<Left>", lambda event: leftKey(EmuMod))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user