You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Initial editor accessibility.
This commit is contained in:
@@ -87,12 +87,13 @@ private:
|
||||
MessageType type;
|
||||
Button *toggle_button = nullptr;
|
||||
|
||||
void initialize_button(const String &p_tooltip, Callable p_toggled_callback) {
|
||||
void initialize_button(const String &p_name, const String &p_tooltip, Callable p_toggled_callback) {
|
||||
toggle_button = memnew(Button);
|
||||
toggle_button->set_toggle_mode(true);
|
||||
toggle_button->set_pressed(true);
|
||||
toggle_button->set_text(itos(message_count));
|
||||
toggle_button->set_tooltip_text(TTR(p_tooltip));
|
||||
toggle_button->set_accessibility_name(TTRGET(p_name));
|
||||
toggle_button->set_tooltip_text(TTRGET(p_tooltip));
|
||||
toggle_button->set_focus_mode(FOCUS_NONE);
|
||||
// When toggled call the callback and pass the MessageType this button is for.
|
||||
toggle_button->connect(SceneStringName(toggled), p_toggled_callback.bind(type));
|
||||
|
||||
Reference in New Issue
Block a user