I have attached an image. 1 is the main menu. When I click on options button the options menu opens. But like in 2, the audio button remains in normal state. How do I set the button in active state when options menu opens by code? Like in 3.
Set button active on ready?
Asked Answered
You should add something along the lines of $"AudioButton.grab_focus()"
in the code where you open the options menu. Or if there isn't any, add a small function that gets ran when the options button is pressed.
Actually I am already using grab_focus. But it does not work If I add more sub menu of audio or video etc. But, just after this post I found out that I need to select the button pressed option from the inspector. Thank you for your reply.
Edit: Just found out that there is a button_pressed function to set a button active on ready or when set visible.
© 2022 - 2024 — McMap. All rights reserved.