@@ -160,7 +160,7 @@ def nuke():
160160def shape ():
161161 controller .press ("`" )
162162 controller .type ("f" * 500 )
163- # controller.release("`")
163+ controller .release ("`" )
164164
165165def circlecrash ():
166166 controller .press ("`" )
@@ -879,7 +879,7 @@ def __init__(self):
879879 bd = 2 ,
880880 cursor = 'hand2'
881881 )
882- self .toggle_all_btn .bind ('<Button-1>' , lambda e : self .toggle_all_macros ( ))
882+ self .toggle_all_btn .bind ('<Button-1>' , lambda e : self ._animate_button_press ( self . toggle_all_btn , self . toggle_all_macros ))
883883 self .toggle_all_btn .pack (fill = 'x' , padx = 10 , pady = 5 )
884884
885885 # Create buttons (using Labels for color support on macOS)
@@ -896,7 +896,7 @@ def __init__(self):
896896 bd = 2 ,
897897 cursor = 'hand2'
898898 )
899- btn .bind ('<Button-1>' , lambda e , f = func : f ( ))
899+ btn .bind ('<Button-1>' , lambda e , f = func , b = btn : self . _animate_button_press ( b , f ))
900900 btn .pack (fill = 'x' , padx = 10 , pady = 2 )
901901 self .buttons .append ((btn , state_var , is_boolean ))
902902
@@ -906,6 +906,18 @@ def __init__(self):
906906 # Start periodic update
907907 self .update_button_colors ()
908908
909+ def _animate_button_press (self , button , callback ):
910+ """Animate button press with sunken effect"""
911+ # Press down effect
912+ button .config (relief = 'sunken' )
913+ # Schedule release effect and callback
914+ self .root .after (100 , lambda : self ._release_button (button , callback ))
915+
916+ def _release_button (self , button , callback ):
917+ """Release button and execute callback"""
918+ button .config (relief = 'raised' )
919+ callback ()
920+
909921 def toggle_boolean_macro (self , state_var_name ):
910922 """Toggle a boolean macro on/off"""
911923 global size_automation , braindamage , randomwalld , slowcircles , engispamming , slowcircle_shift_bind , macros_enabled
0 commit comments