The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

Hi,

Do you know how can I customize the PopupMenu of a OptionButton?

I tried things like option_menu.get_popup().set("font_size", 40), but nothing changes. I tried to change font size, but I would also like to change how it looks in general (background, font size and color...).

Thanks!

Godot version v4.1.stable.official [970459615]
in Engine by (255 points)

2 Answers

0 votes
Best answer

I was trying to modify it under the MenuButton in my theme. Now I realized that I have to modify PopupMenu theme instead.

by (255 points)
+1 vote

Are you specifically trying to modify it via code? While that's possible, the easiest way is probably to create a theme for it, which can be done directly in the editor. Here's a pretty good overview video on how to do that in Godot 4.x.

https://www.youtube.com/watch?v=AxFKPXko35I

by (22,674 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.