I'm trying to make a game, and have the start screen have a button that you can click to start playing the game.
I tried the clickPoint=getMouse()
but I am unsure how to incorporate it. Can I use the while True
statement or would I have to use something else?
Theoretically
zella graphics
is created usingtkinter
which hastkinter.Button(..., command=function)
butzella graphics
works different thantkinter
and it can make problem to usetkinter.Button()
directly withzella graphics
.At this moment the only idea is to use
while True
withgetMouse()
(orcheckMouse()
) and check if you clicked inside button's rectangle.If you have many buttons then you could create new class
Button
(using `Rectangle) with function which checks if it was clicked.or shorter
and now
if
needs shorter code