![]() ![]() To make our pet background from black to transparent, we need a few lines of code: nfig(highlightbackground='black') window.overrideredirect(True) window.wm_attributes('-transparentcolor','black')Īs I want her to be movable and showing animation, I assign her as a label: label = tk.Label(window,bd=0,bg='black') label.pack() window.mainloop()Īnd that’s the perpetration we need to make our program works. gif to an array idle = #idle gif, 5 frames idle_to_sleep = #idle to sleep gif, 8 frames sleep = #sleep gif, 3 frames sleep_to_idle = #sleep to idle gif, 8 frames walk_positive = #walk to left gif, 8 frames walk_negative = #walk to right gif, 8 frames gif, we have to call it from local file to our python program: #call buddy's action.
0 Comments
Leave a Reply. |