2024-04-27 02:17:37 发布
网友
有办法吗
WoodInt = GatherWood(WoodInt)
在tkinter按钮上?你知道吗
BWood = tk.Button(Top, text ="Gather Wood", command = GatherWood)
我想做的是,每次按下按钮,WoodInt就会上升20。你知道吗
WoodInt
目前还不清楚GatherWood是怎么做的,但是,一种方法是将您的按钮链接到一个WoodInt递增20的命令:
GatherWood
def increment_woodint_by_20(): global WoodInt Woodint += 20 WoodInt = GatherWood(WoodInt) BWood = tk.Button(Top, text ="Gather Wood", command=increment_woodint_by_20) ...
目前还不清楚
GatherWood
是怎么做的,但是,一种方法是将您的按钮链接到一个WoodInt
递增20的命令:相关问题 更多 >
编程相关推荐