Godot Popup Menus. Changing the Ok button text

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ender

I am trying to make a simple confirm box for my game.
I would like to change the button that says “ok” to say “Yes”. is that possible?
If i use the add_button() it adds a third button instead.
(It wont let me upload a screenshot)

1 Like
:bust_in_silhouette: Reply From: njamster

I assume you’re talking about the ConfirmationDialog, as the PopupMenu-node does not even have buttons. If so, the answer is yes, but only from code:

extends ConfirmationDialog

func _ready():
	get_ok().text = "Yes"
    get_cancel().text = "No"