How do I get button nodes to display their "button pressed" image upon receiving a signal?

Godot Version

v4.1.2.stable.official [399c9dc39]

Question

hello all. I’m trying to get my game through the prototype phase and I’ve made a small onscreen keyboard out of button nodes. It displays the WASD keys and arrow keys. Each one of these nodes receives a signal while its coresponding keys are being pressed. My problem is that I haven’t figured out how to get these button nodes to display the “button pressed” visual while the signal is being received.

Here’s my code for the W_Button,

I know this is probably extremely simple, but I’m new to code and kinda spinning my wheels here.

Enable BaseButton.toggle_mode and change the BaseButton.button_pressed property.

That’s what I needed! Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.