Hi! I'm trying to make a stock market simulator but I want to know the best way to detect the UI button being pressed. So I can call my update function to update stock prices and the newsfeed in the game. Thanks! :)
You'll want to just connect its pressed signal to a signal handler function. The function will be called each time the button is pressed. There, you can add code to do whatever you need.
You can connect up the signal in the editor, via the Signals panel, or in code via connect method.