Initial editor accessibility.
This commit is contained in:
parent
4310cb82b8
commit
302fa831cc
137 changed files with 1544 additions and 93 deletions
|
|
@ -737,18 +737,21 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
|
|||
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_create->set_accessibility_name(TTRC("Create Polygon Points"));
|
||||
add_child(button_create);
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->set_toggle_mode(true);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_edit->set_accessibility_name(TTRC("Edit Polygon Points"));
|
||||
add_child(button_edit);
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->set_toggle_mode(true);
|
||||
|
||||
button_delete = memnew(Button);
|
||||
button_delete->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_delete->set_accessibility_name(TTRC("Delete Polygon Points"));
|
||||
add_child(button_delete);
|
||||
button_delete->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_DELETE));
|
||||
button_delete->set_toggle_mode(true);
|
||||
|
|
|
|||
|
|
@ -667,6 +667,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
top_hb->add_child(tool_blend);
|
||||
tool_blend->set_pressed(true);
|
||||
tool_blend->set_tooltip_text(TTR("Set the blending position within the space"));
|
||||
tool_blend->set_accessibility_name(TTRC("Set Blending Position"));
|
||||
tool_blend->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(3));
|
||||
|
||||
tool_select = memnew(Button);
|
||||
|
|
@ -675,6 +676,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
tool_select->set_tooltip_text(TTR("Select and move points, create points with RMB."));
|
||||
tool_select->set_accessibility_name(TTRC("Edit Points"));
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(0));
|
||||
|
||||
tool_create = memnew(Button);
|
||||
|
|
@ -683,6 +685,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
tool_create->set_tooltip_text(TTR("Create points."));
|
||||
tool_create->set_accessibility_name(TTRC("Create Points"));
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(1));
|
||||
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
|
|
@ -691,6 +694,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
tool_erase->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(tool_erase);
|
||||
tool_erase->set_tooltip_text(TTR("Erase points."));
|
||||
tool_erase->set_accessibility_name(TTRC("Erase Points"));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected));
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
|
@ -701,6 +705,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
snap->set_tooltip_text(TTR("Enable snap and show grid."));
|
||||
snap->set_accessibility_name(TTRC("Snap to Grid"));
|
||||
snap->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_snap_toggled));
|
||||
|
||||
snap_value = memnew(SpinBox);
|
||||
|
|
@ -708,6 +713,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
snap_value->set_min(0.01);
|
||||
snap_value->set_step(0.01);
|
||||
snap_value->set_max(1000);
|
||||
snap_value->set_accessibility_name(TTRC("Grid Step"));
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
top_hb->add_child(memnew(Label(TTR("Sync:"))));
|
||||
|
|
@ -732,6 +738,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
edit_value->set_min(-1000);
|
||||
edit_value->set_max(1000);
|
||||
edit_value->set_step(0.01);
|
||||
edit_value->set_accessibility_name(TTRC("Blend Value"));
|
||||
edit_value->connect(SceneStringName(value_changed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_edit_point_pos));
|
||||
|
||||
open_editor = memnew(Button);
|
||||
|
|
@ -768,14 +775,17 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
|||
min_value->set_min(-10000);
|
||||
min_value->set_max(0);
|
||||
min_value->set_step(0.01);
|
||||
min_value->set_accessibility_name(TTRC("Min"));
|
||||
|
||||
max_value = memnew(SpinBox);
|
||||
max_value->set_min(0.01);
|
||||
max_value->set_max(10000);
|
||||
max_value->set_step(0.01);
|
||||
max_value->set_accessibility_name(TTRC("Max"));
|
||||
|
||||
label_value = memnew(LineEdit);
|
||||
label_value->set_expand_to_text_length_enabled(true);
|
||||
label_value->set_accessibility_name(TTRC("Value"));
|
||||
|
||||
// now add
|
||||
|
||||
|
|
|
|||
|
|
@ -886,6 +886,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
top_hb->add_child(tool_blend);
|
||||
tool_blend->set_pressed(true);
|
||||
tool_blend->set_tooltip_text(TTR("Set the blending position within the space"));
|
||||
tool_blend->set_accessibility_name(TTRC("Set Blending Position"));
|
||||
tool_blend->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(3));
|
||||
|
||||
tool_select = memnew(Button);
|
||||
|
|
@ -894,6 +895,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
tool_select->set_tooltip_text(TTR("Select and move points, create points with RMB."));
|
||||
tool_select->set_accessibility_name(TTRC("Edit Points"));
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(0));
|
||||
|
||||
tool_create = memnew(Button);
|
||||
|
|
@ -902,6 +904,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
tool_create->set_tooltip_text(TTR("Create points."));
|
||||
tool_create->set_accessibility_name(TTRC("Create Points"));
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(1));
|
||||
|
||||
tool_triangle = memnew(Button);
|
||||
|
|
@ -910,6 +913,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
tool_triangle->set_button_group(bg);
|
||||
top_hb->add_child(tool_triangle);
|
||||
tool_triangle->set_tooltip_text(TTR("Create triangles by connecting points."));
|
||||
tool_triangle->set_accessibility_name(TTRC("Create Triangles"));
|
||||
tool_triangle->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(2));
|
||||
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
|
|
@ -918,6 +922,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
tool_erase->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(tool_erase);
|
||||
tool_erase->set_tooltip_text(TTR("Erase points and triangles."));
|
||||
tool_erase->set_accessibility_name(TTRC("Erase Points"));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_erase_selected));
|
||||
tool_erase->set_disabled(true);
|
||||
|
||||
|
|
@ -929,6 +934,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
auto_triangles->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled));
|
||||
auto_triangles->set_toggle_mode(true);
|
||||
auto_triangles->set_tooltip_text(TTR("Generate blend triangles automatically (instead of manually)"));
|
||||
auto_triangles->set_accessibility_name(TTRC("Generate Triangles"));
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -938,6 +944,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
snap->set_tooltip_text(TTR("Enable snap and show grid."));
|
||||
snap->set_accessibility_name(TTRC("Snap to Grid"));
|
||||
snap->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_snap_toggled));
|
||||
|
||||
snap_x = memnew(SpinBox);
|
||||
|
|
@ -946,6 +953,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
snap_x->set_min(0.01);
|
||||
snap_x->set_step(0.01);
|
||||
snap_x->set_max(1000);
|
||||
snap_x->set_accessibility_name(TTRC("Grid X Step"));
|
||||
|
||||
snap_y = memnew(SpinBox);
|
||||
top_hb->add_child(snap_y);
|
||||
|
|
@ -953,6 +961,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
snap_y->set_min(0.01);
|
||||
snap_y->set_step(0.01);
|
||||
snap_y->set_max(1000);
|
||||
snap_y->set_accessibility_name(TTRC("Grid Y Step"));
|
||||
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -977,12 +986,14 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
edit_x->set_min(-1000);
|
||||
edit_x->set_step(0.01);
|
||||
edit_x->set_max(1000);
|
||||
edit_x->set_accessibility_name(TTRC("Blend X Value"));
|
||||
edit_x->connect(SceneStringName(value_changed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_edit_point_pos));
|
||||
edit_y = memnew(SpinBox);
|
||||
edit_hb->add_child(edit_y);
|
||||
edit_y->set_min(-1000);
|
||||
edit_y->set_step(0.01);
|
||||
edit_y->set_max(1000);
|
||||
edit_y->set_accessibility_name(TTRC("Blend X Value"));
|
||||
edit_y->connect(SceneStringName(value_changed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_edit_point_pos));
|
||||
open_editor = memnew(Button);
|
||||
edit_hb->add_child(open_editor);
|
||||
|
|
@ -1004,13 +1015,16 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
main_grid->add_child(left_vbox);
|
||||
left_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
max_y_value = memnew(SpinBox);
|
||||
max_y_value->set_accessibility_name(TTRC("Max Y"));
|
||||
left_vbox->add_child(max_y_value);
|
||||
left_vbox->add_spacer();
|
||||
label_y = memnew(LineEdit);
|
||||
label_y->set_accessibility_name(TTRC("Y Value"));
|
||||
left_vbox->add_child(label_y);
|
||||
label_y->set_expand_to_text_length_enabled(true);
|
||||
left_vbox->add_spacer();
|
||||
min_y_value = memnew(SpinBox);
|
||||
min_y_value->set_accessibility_name(TTRC("Min Y"));
|
||||
left_vbox->add_child(min_y_value);
|
||||
|
||||
max_y_value->set_max(10000);
|
||||
|
|
@ -1040,13 +1054,16 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
|||
main_grid->add_child(bottom_vbox);
|
||||
bottom_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
min_x_value = memnew(SpinBox);
|
||||
min_x_value->set_accessibility_name(TTRC("Min X"));
|
||||
bottom_vbox->add_child(min_x_value);
|
||||
bottom_vbox->add_spacer();
|
||||
label_x = memnew(LineEdit);
|
||||
label_y->set_accessibility_name(TTRC("X Value"));
|
||||
bottom_vbox->add_child(label_x);
|
||||
label_x->set_expand_to_text_length_enabled(true);
|
||||
bottom_vbox->add_spacer();
|
||||
max_x_value = memnew(SpinBox);
|
||||
max_x_value->set_accessibility_name(TTRC("Max Y"));
|
||||
bottom_vbox->add_child(max_x_value);
|
||||
|
||||
max_x_value->set_max(10000);
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
|
|||
delete_button->set_flat(true);
|
||||
delete_button->set_focus_mode(FOCUS_NONE);
|
||||
delete_button->set_button_icon(get_editor_theme_icon(SNAME("Close")));
|
||||
delete_button->set_accessibility_name(TTRC("Delete"));
|
||||
delete_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_node_request).bind(E), CONNECT_DEFERRED);
|
||||
node->get_titlebar_hbox()->add_child(delete_button);
|
||||
}
|
||||
|
|
@ -1406,6 +1407,7 @@ AnimationNodeAnimationEditorDialog::AnimationNodeAnimationEditorDialog() {
|
|||
label_start->set_stretch_ratio(1);
|
||||
select_start = memnew(OptionButton);
|
||||
select_start->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
select_start->set_accessibility_name(TTRC("Start Marker"));
|
||||
grid->add_child(select_start);
|
||||
select_start->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
select_start->set_stretch_ratio(2);
|
||||
|
|
@ -1416,6 +1418,7 @@ AnimationNodeAnimationEditorDialog::AnimationNodeAnimationEditorDialog() {
|
|||
label_end->set_stretch_ratio(1);
|
||||
select_end = memnew(OptionButton);
|
||||
select_end->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
select_end->set_accessibility_name(TTRC("End Marker"));
|
||||
grid->add_child(select_end);
|
||||
select_end->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
select_end->set_stretch_ratio(2);
|
||||
|
|
|
|||
|
|
@ -2019,26 +2019,31 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
play_bw_from = memnew(Button);
|
||||
play_bw_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw_from->set_tooltip_text(TTR("Play Animation Backwards"));
|
||||
play_bw_from->set_accessibility_name(TTRC("Play Backwards"));
|
||||
playback_container->add_child(play_bw_from);
|
||||
|
||||
play_bw = memnew(Button);
|
||||
play_bw->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw->set_tooltip_text(TTR("Play Animation Backwards from End"));
|
||||
play_bw->set_accessibility_name(TTRC("Play Backwards from End"));
|
||||
playback_container->add_child(play_bw);
|
||||
|
||||
stop = memnew(Button);
|
||||
stop->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
stop->set_tooltip_text(TTR("Pause/Stop Animation"));
|
||||
stop->set_accessibility_name(TTRC("Pause/Stop"));
|
||||
playback_container->add_child(stop);
|
||||
|
||||
play = memnew(Button);
|
||||
play->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play->set_tooltip_text(TTR("Play Animation from Start"));
|
||||
play->set_accessibility_name(TTRC("Play from Start"));
|
||||
playback_container->add_child(play);
|
||||
|
||||
play_from = memnew(Button);
|
||||
play_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_from->set_tooltip_text(TTR("Play Animation"));
|
||||
play_from->set_accessibility_name(TTRC("Play"));
|
||||
playback_container->add_child(play_from);
|
||||
|
||||
frame = memnew(SpinBox);
|
||||
|
|
@ -2047,6 +2052,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
frame->set_stretch_ratio(2);
|
||||
frame->set_step(0.0001);
|
||||
frame->set_tooltip_text(TTR("Animation position (in seconds)."));
|
||||
frame->set_accessibility_name(TTRC("Frame"));
|
||||
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -2055,6 +2061,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
scale->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
scale->set_stretch_ratio(1);
|
||||
scale->set_tooltip_text(TTR("Scale animation playback globally for the node."));
|
||||
scale->set_accessibility_name(TTRC("Scale"));
|
||||
scale->hide();
|
||||
|
||||
delete_dialog = memnew(ConfirmationDialog);
|
||||
|
|
@ -2082,6 +2089,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
|
||||
animation = memnew(OptionButton);
|
||||
hb->add_child(animation);
|
||||
animation->set_accessibility_name(TTRC("Animation"));
|
||||
animation->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
animation->set_tooltip_text(TTR("Display list of animations in player."));
|
||||
animation->set_clip_text(true);
|
||||
|
|
@ -2091,6 +2099,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
autoplay->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hb->add_child(autoplay);
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
autoplay->set_accessibility_name(TTRC("Autoplay on Load"));
|
||||
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -2103,10 +2112,12 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
onion_toggle->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
onion_toggle->set_toggle_mode(true);
|
||||
onion_toggle->set_tooltip_text(TTR("Enable Onion Skinning"));
|
||||
onion_toggle->set_accessibility_name(TTRC("Onion Skinning"));
|
||||
onion_toggle->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu).bind(ONION_SKINNING_ENABLE));
|
||||
hb->add_child(onion_toggle);
|
||||
|
||||
onion_skinning = memnew(MenuButton);
|
||||
onion_skinning->set_accessibility_name(TTRC("Onion Skinning Options"));
|
||||
onion_skinning->set_flat(false);
|
||||
onion_skinning->set_theme_type_variation("FlatMenuButton");
|
||||
onion_skinning->set_tooltip_text(TTR("Onion Skinning Options"));
|
||||
|
|
@ -2133,6 +2144,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
|||
pin->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pin->set_toggle_mode(true);
|
||||
pin->set_tooltip_text(TTR("Pin AnimationPlayer"));
|
||||
pin->set_accessibility_name(TTRC("Pin AnimationPlayer"));
|
||||
hb->add_child(pin);
|
||||
pin->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_pin_pressed));
|
||||
|
||||
|
|
|
|||
|
|
@ -1814,6 +1814,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||
tool_select->set_button_group(bg);
|
||||
tool_select->set_pressed(true);
|
||||
tool_select->set_tooltip_text(TTR("Select and move nodes.\nRMB: Add node at position clicked.\nShift+LMB+Drag: Connects the selected node with another node or creates a new node if you select an area without nodes."));
|
||||
tool_select->set_accessibility_name(TTRC("Edit Nodes"));
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
tool_create = memnew(Button);
|
||||
|
|
@ -1822,6 +1823,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||
tool_create->set_toggle_mode(true);
|
||||
tool_create->set_button_group(bg);
|
||||
tool_create->set_tooltip_text(TTR("Create new nodes."));
|
||||
tool_create->set_accessibility_name(TTRC("Create Nodes"));
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
tool_connect = memnew(Button);
|
||||
|
|
@ -1830,6 +1832,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||
tool_connect->set_toggle_mode(true);
|
||||
tool_connect->set_button_group(bg);
|
||||
tool_connect->set_tooltip_text(TTR("Connect nodes."));
|
||||
tool_connect->set_accessibility_name(TTRC("Connect Nodes"));
|
||||
tool_connect->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
// Context-sensitive selection tools:
|
||||
|
|
@ -1842,6 +1845,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||
tool_erase->set_tooltip_text(TTR("Remove selected node or transition."));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_erase_selected).bind(false));
|
||||
tool_erase->set_disabled(true);
|
||||
tool_erase->set_accessibility_name(TTRC("Erase"));
|
||||
selection_tools_hb->add_child(tool_erase);
|
||||
|
||||
transition_tools_hb = memnew(HBoxContainer);
|
||||
|
|
@ -1857,6 +1861,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
|||
auto_advance->set_tooltip_text(TTR("New Transitions Should Auto Advance"));
|
||||
auto_advance->set_toggle_mode(true);
|
||||
auto_advance->set_pressed(true);
|
||||
auto_advance->set_accessibility_name(TTRC("Transitions Auto Advance"));
|
||||
transition_tools_hb->add_child(auto_advance);
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
|
|||
add_child(hb);
|
||||
|
||||
icon = memnew(TextureButton);
|
||||
icon->set_accessibility_name(TTRC("Open asset details"));
|
||||
icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE);
|
||||
hb->add_child(icon);
|
||||
|
||||
|
|
@ -145,11 +146,13 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
|
|||
vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
title = memnew(LinkButton);
|
||||
title->set_accessibility_name(TTRC("Title"));
|
||||
title->set_auto_translate_mode(AutoTranslateMode::AUTO_TRANSLATE_MODE_DISABLED);
|
||||
title->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
|
||||
vb->add_child(title);
|
||||
|
||||
category = memnew(LinkButton);
|
||||
category->set_accessibility_name(TTRC("Category"));
|
||||
category->set_underline_mode(LinkButton::UNDERLINE_MODE_ON_HOVER);
|
||||
vb->add_child(category);
|
||||
|
||||
|
|
@ -159,6 +162,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
|
|||
|
||||
author = memnew(LinkButton);
|
||||
author->set_tooltip_text(TTR("Author"));
|
||||
author->set_accessibility_name(TTRC("Author"));
|
||||
author_price_hbox->add_child(author);
|
||||
|
||||
author_price_hbox->add_child(memnew(HSeparator));
|
||||
|
|
@ -184,6 +188,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem(bool p_clickable) {
|
|||
price = memnew(Label);
|
||||
price->add_theme_style_override(CoreStringName(normal), label_margin);
|
||||
price->set_tooltip_text(TTR("License"));
|
||||
price->set_accessibility_name(TTRC("License"));
|
||||
price->set_mouse_filter(MOUSE_FILTER_PASS);
|
||||
|
||||
author_price_hbox->add_child(price);
|
||||
|
|
@ -579,6 +584,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
|
|||
|
||||
dismiss_button = memnew(TextureButton);
|
||||
dismiss_button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDownload::_close));
|
||||
dismiss_button->set_accessibility_name(TTRC("Close"));
|
||||
title_hb->add_child(dismiss_button);
|
||||
|
||||
title->set_clip_text(true);
|
||||
|
|
|
|||
|
|
@ -246,12 +246,14 @@ AudioStreamEditor::AudioStreamEditor() {
|
|||
_play_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_play_button->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamEditor::_play));
|
||||
_play_button->set_shortcut(ED_SHORTCUT("audio_stream_editor/audio_preview_play_pause", TTRC("Audio Preview Play/Pause"), Key::SPACE));
|
||||
_play_button->set_accessibility_name(TTRC("Play"));
|
||||
|
||||
_stop_button = memnew(Button);
|
||||
hbox->add_child(_stop_button);
|
||||
_stop_button->set_flat(true);
|
||||
_stop_button->set_focus_mode(Control::FOCUS_NONE);
|
||||
_stop_button->connect(SceneStringName(pressed), callable_mp(this, &AudioStreamEditor::_stop));
|
||||
_stop_button->set_accessibility_name(TTRC("Stop"));
|
||||
|
||||
_current_label = memnew(Label);
|
||||
_current_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@ void BoneMapper::create_editor() {
|
|||
clear_mapping_button = memnew(Button);
|
||||
clear_mapping_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
clear_mapping_button->set_tooltip_text(TTR("Clear mappings in current group."));
|
||||
clear_mapping_button->set_accessibility_name(TTRC("Clear Mappings"));
|
||||
clear_mapping_button->connect(SceneStringName(pressed), callable_mp(this, &BoneMapper::_clear_mapping_current_group));
|
||||
group_hbox->add_child(clear_mapping_button);
|
||||
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ public:
|
|||
grid_offset_x->set_suffix("px");
|
||||
grid_offset_x->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid_offset_x->set_select_all_on_focus(true);
|
||||
grid_offset_x->set_accessibility_name(TTRC("X Offset"));
|
||||
child_container->add_child(grid_offset_x);
|
||||
|
||||
grid_offset_y = memnew(SpinBox);
|
||||
|
|
@ -128,6 +129,7 @@ public:
|
|||
grid_offset_y->set_suffix("px");
|
||||
grid_offset_y->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid_offset_y->set_select_all_on_focus(true);
|
||||
grid_offset_y->set_accessibility_name(TTRC("Y Offset"));
|
||||
child_container->add_child(grid_offset_y);
|
||||
|
||||
label = memnew(Label);
|
||||
|
|
@ -142,6 +144,7 @@ public:
|
|||
grid_step_x->set_suffix("px");
|
||||
grid_step_x->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid_step_x->set_select_all_on_focus(true);
|
||||
grid_step_x->set_accessibility_name(TTRC("X Step"));
|
||||
child_container->add_child(grid_step_x);
|
||||
|
||||
grid_step_y = memnew(SpinBox);
|
||||
|
|
@ -151,6 +154,7 @@ public:
|
|||
grid_step_y->set_suffix("px");
|
||||
grid_step_y->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid_step_y->set_select_all_on_focus(true);
|
||||
grid_step_y->set_accessibility_name(TTRC("X Step"));
|
||||
child_container->add_child(grid_step_y);
|
||||
|
||||
label = memnew(Label);
|
||||
|
|
@ -166,6 +170,7 @@ public:
|
|||
primary_grid_step_x->set_suffix("steps");
|
||||
primary_grid_step_x->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
primary_grid_step_x->set_select_all_on_focus(true);
|
||||
primary_grid_step_x->set_accessibility_name(TTRC("X Primary Step"));
|
||||
child_container->add_child(primary_grid_step_x);
|
||||
|
||||
primary_grid_step_y = memnew(SpinBox);
|
||||
|
|
@ -176,6 +181,7 @@ public:
|
|||
primary_grid_step_y->set_suffix("steps");
|
||||
primary_grid_step_y->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
primary_grid_step_y->set_select_all_on_focus(true);
|
||||
primary_grid_step_y->set_accessibility_name(TTRC("Y Primary Step"));
|
||||
child_container->add_child(primary_grid_step_y);
|
||||
|
||||
container->add_child(memnew(HSeparator));
|
||||
|
|
@ -197,6 +203,7 @@ public:
|
|||
rotation_offset->set_suffix("deg");
|
||||
rotation_offset->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
rotation_offset->set_select_all_on_focus(true);
|
||||
rotation_offset->set_accessibility_name(TTRC("Rotation Offset"));
|
||||
child_container->add_child(rotation_offset);
|
||||
|
||||
label = memnew(Label);
|
||||
|
|
@ -210,6 +217,7 @@ public:
|
|||
rotation_step->set_suffix("deg");
|
||||
rotation_step->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
rotation_step->set_select_all_on_focus(true);
|
||||
rotation_step->set_accessibility_name(TTRC("Rotation Step"));
|
||||
child_container->add_child(rotation_step);
|
||||
|
||||
container->add_child(memnew(HSeparator));
|
||||
|
|
@ -229,6 +237,7 @@ public:
|
|||
scale_step->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
scale_step->set_step(0.01f);
|
||||
scale_step->set_select_all_on_focus(true);
|
||||
scale_step->set_accessibility_name(TTRC("Scale Step"));
|
||||
child_container->add_child(scale_step);
|
||||
}
|
||||
|
||||
|
|
@ -4128,6 +4137,15 @@ void CanvasItemEditor::_notification(int p_what) {
|
|||
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &CanvasItemEditor::_project_settings_changed));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
|
||||
RID ae = get_accessibility_element();
|
||||
ERR_FAIL_COND(ae.is_null());
|
||||
|
||||
//TODO
|
||||
DisplayServer::get_singleton()->accessibility_update_set_role(ae, DisplayServer::AccessibilityRole::ROLE_STATIC_TEXT);
|
||||
DisplayServer::get_singleton()->accessibility_update_set_value(ae, TTR(vformat("The %s is not accessible at this time.", "Canvas item editor")));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_PROCESS: {
|
||||
// Update the viewport if the canvas_item changes
|
||||
List<CanvasItem *> selection = _get_edited_canvas_items(true);
|
||||
|
|
@ -5360,6 +5378,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
controls_hb->add_child(button_center_view);
|
||||
button_center_view->set_flat(true);
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
button_center_view->set_accessibility_name(TTRC("Center View"));
|
||||
button_center_view->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(VIEW_CENTER_TO_SELECTION));
|
||||
|
||||
zoom_widget = memnew(EditorZoomWidget);
|
||||
|
|
@ -5402,6 +5421,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
select_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/select_mode", TTRC("Select Mode"), Key::Q));
|
||||
select_button->set_shortcut_context(this);
|
||||
select_button->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+Drag: Move selected node.") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Alt+Drag: Scale selected node.") + "\n" + TTR("V: Set selected node's pivot position.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.") + "\n" + TTR("(Available in all modes.)") + "\n" + TTR("RMB: Add node at position clicked."));
|
||||
select_button->set_accessibility_name(TTRC("Select Mode"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -5413,6 +5433,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
move_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/move_mode", TTRC("Move Mode"), Key::W));
|
||||
move_button->set_shortcut_context(this);
|
||||
move_button->set_tooltip_text(TTRC("Move Mode"));
|
||||
move_button->set_accessibility_name(TTRC("Move Mode"));
|
||||
|
||||
rotate_button = memnew(Button);
|
||||
rotate_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
|
@ -5422,6 +5443,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
rotate_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/rotate_mode", TTRC("Rotate Mode"), Key::E));
|
||||
rotate_button->set_shortcut_context(this);
|
||||
rotate_button->set_tooltip_text(TTRC("Rotate Mode"));
|
||||
rotate_button->set_accessibility_name(TTRC("Rotate Mode"));
|
||||
|
||||
scale_button = memnew(Button);
|
||||
scale_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
|
@ -5431,6 +5453,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
scale_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/scale_mode", TTRC("Scale Mode"), Key::S));
|
||||
scale_button->set_shortcut_context(this);
|
||||
scale_button->set_tooltip_text(TTRC("Shift: Scale proportionally."));
|
||||
scale_button->set_accessibility_name(TTRC("Scale Mode"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -5440,6 +5463,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
list_select_button->set_toggle_mode(true);
|
||||
list_select_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_LIST_SELECT));
|
||||
list_select_button->set_tooltip_text(TTR("Show list of selectable nodes at position clicked."));
|
||||
list_select_button->set_accessibility_name(TTRC("List Selectable Nodes"));
|
||||
|
||||
pivot_button = memnew(Button);
|
||||
pivot_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
|
@ -5447,6 +5471,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
pivot_button->set_toggle_mode(true);
|
||||
pivot_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_EDIT_PIVOT));
|
||||
pivot_button->set_tooltip_text(TTR("Click to change object's pivot.") + "\n" + TTR("Shift: Set temporary pivot.") + "\n" + TTR("Click this button while holding Shift to put the temporary pivot in the center of the selected nodes."));
|
||||
pivot_button->set_accessibility_name(TTRC("Change Pivot"));
|
||||
|
||||
pan_button = memnew(Button);
|
||||
pan_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
|
@ -5456,6 +5481,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
pan_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/pan_mode", TTRC("Pan Mode"), Key::G));
|
||||
pan_button->set_shortcut_context(this);
|
||||
pan_button->set_tooltip_text(TTRC("You can also use Pan View shortcut (Space by default) to pan in any mode."));
|
||||
pan_button->set_accessibility_name(TTRC("Pan View"));
|
||||
|
||||
ruler_button = memnew(Button);
|
||||
ruler_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
|
@ -5465,6 +5491,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
ruler_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/ruler_mode", TTRC("Ruler Mode"), Key::R));
|
||||
ruler_button->set_shortcut_context(this);
|
||||
ruler_button->set_tooltip_text(TTRC("Ruler Mode"));
|
||||
ruler_button->set_accessibility_name(TTRC("Ruler Mode"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -5476,6 +5503,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
smart_snap_button->set_tooltip_text(TTRC("Toggle smart snapping."));
|
||||
smart_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_smart_snap", TTRC("Use Smart Snap"), KeyModifierMask::SHIFT | Key::S));
|
||||
smart_snap_button->set_shortcut_context(this);
|
||||
smart_snap_button->set_accessibility_name(TTRC("Smart Snap"));
|
||||
|
||||
grid_snap_button = memnew(Button);
|
||||
grid_snap_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
|
@ -5485,6 +5513,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
grid_snap_button->set_tooltip_text(TTRC("Toggle grid snapping."));
|
||||
grid_snap_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/use_grid_snap", TTRC("Use Grid Snap"), KeyModifierMask::SHIFT | Key::G));
|
||||
grid_snap_button->set_shortcut_context(this);
|
||||
grid_snap_button->set_accessibility_name(TTRC("Grid Snap"));
|
||||
|
||||
snap_config_menu = memnew(MenuButton);
|
||||
snap_config_menu->set_flat(false);
|
||||
|
|
@ -5494,6 +5523,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
snap_config_menu->set_h_size_flags(SIZE_SHRINK_END);
|
||||
snap_config_menu->set_tooltip_text(TTR("Snapping Options"));
|
||||
snap_config_menu->set_switch_on_hover(true);
|
||||
snap_config_menu->set_accessibility_name(TTRC("Snapping Options"));
|
||||
|
||||
PopupMenu *p = snap_config_menu->get_popup();
|
||||
p->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||
|
|
@ -5521,6 +5551,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
|
||||
lock_button = memnew(Button);
|
||||
lock_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
lock_button->set_accessibility_name(TTRC("Lock"));
|
||||
main_menu_hbox->add_child(lock_button);
|
||||
|
||||
lock_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(LOCK_SELECTED));
|
||||
|
|
@ -5529,6 +5560,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
lock_button->set_shortcut(ED_GET_SHORTCUT("editor/lock_selected_nodes"));
|
||||
|
||||
unlock_button = memnew(Button);
|
||||
unlock_button->set_accessibility_name(TTRC("Unlock"));
|
||||
unlock_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(unlock_button);
|
||||
unlock_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNLOCK_SELECTED));
|
||||
|
|
@ -5537,6 +5569,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
unlock_button->set_shortcut(ED_GET_SHORTCUT("editor/unlock_selected_nodes"));
|
||||
|
||||
group_button = memnew(Button);
|
||||
group_button->set_accessibility_name(TTRC("Group"));
|
||||
group_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(group_button);
|
||||
group_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(GROUP_SELECTED));
|
||||
|
|
@ -5545,6 +5578,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
group_button->set_shortcut(ED_GET_SHORTCUT("editor/group_selected_nodes"));
|
||||
|
||||
ungroup_button = memnew(Button);
|
||||
ungroup_button->set_accessibility_name(TTRC("Ungroup"));
|
||||
ungroup_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(ungroup_button);
|
||||
ungroup_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(UNGROUP_SELECTED));
|
||||
|
|
@ -5561,6 +5595,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
main_menu_hbox->add_child(skeleton_menu);
|
||||
skeleton_menu->set_tooltip_text(TTR("Skeleton Options"));
|
||||
skeleton_menu->set_switch_on_hover(true);
|
||||
skeleton_menu->set_accessibility_name(TTRC("Skeleton Options"));
|
||||
|
||||
p = skeleton_menu->get_popup();
|
||||
p->set_hide_on_checkable_item_selection(false);
|
||||
|
|
@ -5652,6 +5687,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
key_loc_button->set_focus_mode(FOCUS_NONE);
|
||||
key_loc_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_POS));
|
||||
key_loc_button->set_tooltip_text(TTR("Translation mask for inserting keys."));
|
||||
key_loc_button->set_accessibility_name(TTRC("Translation Mask"));
|
||||
animation_hb->add_child(key_loc_button);
|
||||
|
||||
key_rot_button = memnew(Button);
|
||||
|
|
@ -5661,6 +5697,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
key_rot_button->set_focus_mode(FOCUS_NONE);
|
||||
key_rot_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_ROT));
|
||||
key_rot_button->set_tooltip_text(TTR("Rotation mask for inserting keys."));
|
||||
key_rot_button->set_accessibility_name(TTRC("Rotation Mask"));
|
||||
animation_hb->add_child(key_rot_button);
|
||||
|
||||
key_scale_button = memnew(Button);
|
||||
|
|
@ -5669,6 +5706,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
key_scale_button->set_focus_mode(FOCUS_NONE);
|
||||
key_scale_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_SCALE));
|
||||
key_scale_button->set_tooltip_text(TTR("Scale mask for inserting keys."));
|
||||
key_scale_button->set_accessibility_name(TTRC("Scale Mask"));
|
||||
animation_hb->add_child(key_scale_button);
|
||||
|
||||
key_insert_button = memnew(Button);
|
||||
|
|
@ -5677,6 +5715,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
key_insert_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_KEY));
|
||||
key_insert_button->set_tooltip_text(TTRC("Insert keys (based on mask)."));
|
||||
key_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_insert_key", TTRC("Insert Key"), Key::INSERT));
|
||||
key_insert_button->set_accessibility_name(TTRC("Insert Keys"));
|
||||
key_insert_button->set_shortcut_context(this);
|
||||
animation_hb->add_child(key_insert_button);
|
||||
|
||||
|
|
@ -5686,6 +5725,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
key_auto_insert_button->set_focus_mode(FOCUS_NONE);
|
||||
key_auto_insert_button->set_tooltip_text(TTRC("Auto insert keys when objects are translated, rotated or scaled (based on mask).\nKeys are only added to existing tracks, no new tracks will be created.\nKeys must be inserted manually for the first time."));
|
||||
key_auto_insert_button->set_shortcut(ED_SHORTCUT("canvas_item_editor/anim_auto_insert_key", TTRC("Auto Insert Key")));
|
||||
key_auto_insert_button->set_accessibility_name(TTRC("Auto Insert Keys"));
|
||||
key_auto_insert_button->set_shortcut_context(this);
|
||||
animation_hb->add_child(key_auto_insert_button);
|
||||
|
||||
|
|
@ -5694,6 +5734,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
|||
animation_menu->set_theme_type_variation("FlatMenuButton");
|
||||
animation_menu->set_shortcut_context(this);
|
||||
animation_menu->set_tooltip_text(TTR("Animation Key and Pose Options"));
|
||||
animation_menu->set_accessibility_name(TTRC("Animation Key and Pose"));
|
||||
animation_hb->add_child(animation_menu);
|
||||
animation_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
|
||||
animation_menu->set_switch_on_hover(true);
|
||||
|
|
@ -6134,6 +6175,9 @@ void CanvasItemEditorViewport::_perform_drop_data() {
|
|||
}
|
||||
|
||||
bool CanvasItemEditorViewport::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
return false;
|
||||
}
|
||||
Dictionary d = p_data;
|
||||
if (!d.has("type") || (String(d["type"]) != "files")) {
|
||||
label->hide();
|
||||
|
|
@ -6265,6 +6309,9 @@ bool CanvasItemEditorViewport::_is_any_texture_selected() const {
|
|||
}
|
||||
|
||||
void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p_data) {
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
return;
|
||||
}
|
||||
bool is_shift = Input::get_singleton()->is_key_pressed(Key::SHIFT);
|
||||
bool is_alt = Input::get_singleton()->is_key_pressed(Key::ALT);
|
||||
|
||||
|
|
|
|||
|
|
@ -552,6 +552,7 @@ void ControlEditorPresetPicker::_add_row_button(HBoxContainer *p_row, const int
|
|||
b->set_custom_minimum_size(Size2i(36, 36) * EDSCALE);
|
||||
b->set_icon_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
||||
b->set_tooltip_text(p_name);
|
||||
b->set_accessibility_name(p_name);
|
||||
b->set_flat(true);
|
||||
p_row->add_child(b);
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &ControlEditorPresetPicker::_preset_button_pressed).bind(p_preset));
|
||||
|
|
@ -1085,6 +1086,7 @@ ControlEditorToolbar::ControlEditorToolbar() {
|
|||
anchor_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
anchor_mode_button->set_toggle_mode(true);
|
||||
anchor_mode_button->set_tooltip_text(TTR("When active, moving Control nodes changes their anchors instead of their offsets."));
|
||||
anchor_mode_button->set_accessibility_name(TTRC("Change Anchors"));
|
||||
add_child(anchor_mode_button);
|
||||
anchor_mode_button->connect(SceneStringName(toggled), callable_mp(this, &ControlEditorToolbar::_anchor_mode_toggled));
|
||||
|
||||
|
|
|
|||
|
|
@ -128,6 +128,14 @@ void CurveEdit::_notification(int p_what) {
|
|||
tangent_hover_radius = Math::round(BASE_TANGENT_HOVER_RADIUS * get_theme_default_base_scale() * gizmo_scale);
|
||||
tangent_length = Math::round(BASE_TANGENT_LENGTH * get_theme_default_base_scale());
|
||||
} break;
|
||||
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
|
||||
RID ae = get_accessibility_element();
|
||||
ERR_FAIL_COND(ae.is_null());
|
||||
|
||||
//TODO
|
||||
DisplayServer::get_singleton()->accessibility_update_set_role(ae, DisplayServer::AccessibilityRole::ROLE_STATIC_TEXT);
|
||||
DisplayServer::get_singleton()->accessibility_update_set_value(ae, TTR(vformat("The %s is not accessible at this time.", "Curve editor")));
|
||||
} break;
|
||||
case NOTIFICATION_DRAW: {
|
||||
_redraw();
|
||||
} break;
|
||||
|
|
@ -989,6 +997,7 @@ CurveEditor::CurveEditor() {
|
|||
|
||||
snap_button = memnew(Button);
|
||||
snap_button->set_tooltip_text(TTR("Toggle Grid Snap"));
|
||||
snap_button->set_accessibility_name(TTRC("Grid Snap"));
|
||||
snap_button->set_toggle_mode(true);
|
||||
toolbar->add_child(snap_button);
|
||||
snap_button->connect(SceneStringName(toggled), callable_mp(this, &CurveEditor::_set_snap_enabled));
|
||||
|
|
@ -998,6 +1007,7 @@ CurveEditor::CurveEditor() {
|
|||
snap_count_edit = memnew(EditorSpinSlider);
|
||||
snap_count_edit->set_min(2);
|
||||
snap_count_edit->set_max(100);
|
||||
snap_count_edit->set_accessibility_name(TTRC("Snap Step"));
|
||||
snap_count_edit->set_value(DEFAULT_SNAP);
|
||||
snap_count_edit->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
|
||||
toolbar->add_child(snap_count_edit);
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ void EditorPropertyFontMetaOverride::update_property() {
|
|||
hbox->add_child(prop);
|
||||
prop->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
Button *remove = memnew(Button);
|
||||
remove->set_accessibility_name(TTRC("Remove"));
|
||||
remove->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
hbox->add_child(remove);
|
||||
remove->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_remove).bind(remove, name));
|
||||
|
|
@ -349,6 +350,7 @@ EditorPropertyFontMetaOverride::EditorPropertyFontMetaOverride(bool p_script) {
|
|||
page_length = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
|
||||
|
||||
edit = memnew(Button);
|
||||
edit->set_accessibility_name(TTRC("Edit"));
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_edit_pressed));
|
||||
|
|
@ -535,6 +537,7 @@ EditorPropertyOTVariation::EditorPropertyOTVariation() {
|
|||
page_length = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
|
||||
|
||||
edit = memnew(Button);
|
||||
edit->set_accessibility_name(TTRC("Edit"));
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTVariation::_edit_pressed));
|
||||
|
|
@ -789,6 +792,7 @@ void EditorPropertyOTFeatures::update_property() {
|
|||
hbox->add_child(prop);
|
||||
prop->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
Button *remove = memnew(Button);
|
||||
remove->set_accessibility_name(TTRC("Remove"));
|
||||
remove->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
hbox->add_child(remove);
|
||||
remove->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_remove).bind(remove, name_tag));
|
||||
|
|
@ -838,6 +842,7 @@ EditorPropertyOTFeatures::EditorPropertyOTFeatures() {
|
|||
page_length = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
|
||||
|
||||
edit = memnew(Button);
|
||||
edit->set_accessibility_name(TTRC("Edit"));
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit->set_clip_text(true);
|
||||
edit->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_edit_pressed));
|
||||
|
|
|
|||
|
|
@ -926,12 +926,14 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
suspend_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
suspend_button->connect(SceneStringName(toggled), callable_mp(this, &GameView::_suspend_button_toggled));
|
||||
suspend_button->set_tooltip_text(TTR("Suspend"));
|
||||
suspend_button->set_accessibility_name(TTRC("Suspend"));
|
||||
|
||||
next_frame_button = memnew(Button);
|
||||
main_menu_hbox->add_child(next_frame_button);
|
||||
next_frame_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
next_frame_button->connect(SceneStringName(pressed), callable_mp(*debugger, &GameViewDebugger::next_frame));
|
||||
next_frame_button->set_tooltip_text(TTR("Next Frame"));
|
||||
next_frame_button->set_accessibility_name(TTRC("Next Frame"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -968,6 +970,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
hide_selection->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hide_selection->connect(SceneStringName(toggled), callable_mp(this, &GameView::_hide_selection_toggled));
|
||||
hide_selection->set_tooltip_text(TTR("Toggle Selection Visibility"));
|
||||
hide_selection->set_accessibility_name(TTRC("Selection Visibility"));
|
||||
hide_selection->set_pressed(EditorSettings::get_singleton()->get_project_metadata("game_view", "hide_selection", false));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
|
@ -1006,6 +1009,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
camera_override_button->set_toggle_mode(true);
|
||||
camera_override_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
camera_override_button->set_tooltip_text(TTR("Override the in-game camera."));
|
||||
camera_override_button->set_accessibility_name(TTRC("Override In-game Camera"));
|
||||
camera_override_button->connect(SceneStringName(toggled), callable_mp(this, &GameView::_camera_override_button_toggled));
|
||||
|
||||
camera_override_menu = memnew(MenuButton);
|
||||
|
|
@ -1014,6 +1018,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
camera_override_menu->set_theme_type_variation("FlatMenuButton");
|
||||
camera_override_menu->set_h_size_flags(SIZE_SHRINK_END);
|
||||
camera_override_menu->set_tooltip_text(TTR("Camera Override Options"));
|
||||
camera_override_menu->set_accessibility_name(TTRC("Camera Override Options"));
|
||||
_camera_override_menu_id_pressed(EditorSettings::get_singleton()->get_project_metadata("game_view", "camera_override_mode", 0));
|
||||
|
||||
PopupMenu *menu = camera_override_menu->get_popup();
|
||||
|
|
@ -1033,6 +1038,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
fixed_size_button->set_toggle_mode(true);
|
||||
fixed_size_button->set_theme_type_variation("FlatButton");
|
||||
fixed_size_button->set_tooltip_text(TTR("Embedded game size is based on project settings.\nThe 'Keep Aspect' mode is used when the Game Workspace is smaller than the desired size."));
|
||||
fixed_size_button->set_accessibility_name(TTRC("Fixed Size"));
|
||||
fixed_size_button->connect(SceneStringName(pressed), callable_mp(this, &GameView::_size_mode_button_pressed).bind(SIZE_MODE_FIXED));
|
||||
|
||||
keep_aspect_button = memnew(Button);
|
||||
|
|
@ -1040,6 +1046,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
keep_aspect_button->set_toggle_mode(true);
|
||||
keep_aspect_button->set_theme_type_variation("FlatButton");
|
||||
keep_aspect_button->set_tooltip_text(TTR("Keep the aspect ratio of the embedded game."));
|
||||
keep_aspect_button->set_accessibility_name(TTRC("Keep Aspect Ratio"));
|
||||
keep_aspect_button->connect(SceneStringName(pressed), callable_mp(this, &GameView::_size_mode_button_pressed).bind(SIZE_MODE_KEEP_ASPECT));
|
||||
|
||||
stretch_button = memnew(Button);
|
||||
|
|
@ -1047,6 +1054,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
stretch_button->set_toggle_mode(true);
|
||||
stretch_button->set_theme_type_variation("FlatButton");
|
||||
stretch_button->set_tooltip_text(TTR("Embedded game size stretches to fit the Game Workspace."));
|
||||
stretch_button->set_accessibility_name(TTRC("Stretch"));
|
||||
stretch_button->connect(SceneStringName(pressed), callable_mp(this, &GameView::_size_mode_button_pressed).bind(SIZE_MODE_STRETCH));
|
||||
|
||||
embed_options_menu = memnew(MenuButton);
|
||||
|
|
@ -1055,6 +1063,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
|||
embed_options_menu->set_theme_type_variation("FlatMenuButton");
|
||||
embed_options_menu->set_h_size_flags(SIZE_SHRINK_END);
|
||||
embed_options_menu->set_tooltip_text(TTR("Embedding Options"));
|
||||
embed_options_menu->set_accessibility_name(TTRC("Embedding Options"));
|
||||
|
||||
menu = embed_options_menu->get_popup();
|
||||
menu->connect(SceneStringName(id_pressed), callable_mp(this, &GameView::_embed_options_menu_menu_id_pressed));
|
||||
|
|
|
|||
|
|
@ -544,6 +544,14 @@ void GradientEdit::_notification(int p_what) {
|
|||
draw_spacing = BASE_SPACING * get_theme_default_base_scale();
|
||||
handle_width = BASE_HANDLE_WIDTH * get_theme_default_base_scale();
|
||||
} break;
|
||||
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
|
||||
RID ae = get_accessibility_element();
|
||||
ERR_FAIL_COND(ae.is_null());
|
||||
|
||||
//TODO
|
||||
DisplayServer::get_singleton()->accessibility_update_set_role(ae, DisplayServer::AccessibilityRole::ROLE_STATIC_TEXT);
|
||||
DisplayServer::get_singleton()->accessibility_update_set_value(ae, TTR(vformat("The %s is not accessible at this time.", "Gradient editor")));
|
||||
} break;
|
||||
case NOTIFICATION_DRAW: {
|
||||
_redraw();
|
||||
} break;
|
||||
|
|
@ -630,6 +638,7 @@ GradientEditor::GradientEditor() {
|
|||
|
||||
snap_button = memnew(Button);
|
||||
snap_button->set_tooltip_text(TTR("Toggle Grid Snap"));
|
||||
snap_button->set_accessibility_name(TTRC("Snap to Grid"));
|
||||
snap_button->set_toggle_mode(true);
|
||||
toolbar->add_child(snap_button);
|
||||
snap_button->connect(SceneStringName(toggled), callable_mp(this, &GradientEditor::_set_snap_enabled));
|
||||
|
|
@ -637,6 +646,7 @@ GradientEditor::GradientEditor() {
|
|||
snap_count_edit = memnew(EditorSpinSlider);
|
||||
snap_count_edit->set_min(2);
|
||||
snap_count_edit->set_max(100);
|
||||
snap_count_edit->set_accessibility_name(TTRC("Grid Step"));
|
||||
snap_count_edit->set_value(DEFAULT_SNAP);
|
||||
snap_count_edit->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
|
||||
toolbar->add_child(snap_count_edit);
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@ GradientTexture2DEditor::GradientTexture2DEditor() {
|
|||
|
||||
reverse_button = memnew(Button);
|
||||
reverse_button->set_tooltip_text(TTR("Swap Gradient Fill Points"));
|
||||
reverse_button->set_accessibility_name(TTRC("Swap Gradient Fill Points"));
|
||||
toolbar->add_child(reverse_button);
|
||||
reverse_button->connect(SceneStringName(pressed), callable_mp(this, &GradientTexture2DEditor::_reverse_button_pressed));
|
||||
|
||||
|
|
@ -286,6 +287,7 @@ GradientTexture2DEditor::GradientTexture2DEditor() {
|
|||
|
||||
snap_button = memnew(Button);
|
||||
snap_button->set_tooltip_text(TTR("Toggle Grid Snap"));
|
||||
snap_button->set_accessibility_name(TTRC("Snap to Grid"));
|
||||
snap_button->set_toggle_mode(true);
|
||||
toolbar->add_child(snap_button);
|
||||
snap_button->connect(SceneStringName(toggled), callable_mp(this, &GradientTexture2DEditor::_set_snap_enabled));
|
||||
|
|
@ -294,6 +296,7 @@ GradientTexture2DEditor::GradientTexture2DEditor() {
|
|||
snap_count_edit->set_min(2);
|
||||
snap_count_edit->set_max(100);
|
||||
snap_count_edit->set_value(DEFAULT_SNAP);
|
||||
snap_count_edit->set_accessibility_name(TTRC("Grid Step"));
|
||||
snap_count_edit->set_custom_minimum_size(Size2(65 * EDSCALE, 0));
|
||||
toolbar->add_child(snap_count_edit);
|
||||
snap_count_edit->connect(SceneStringName(value_changed), callable_mp(this, &GradientTexture2DEditor::_set_snap_count));
|
||||
|
|
|
|||
|
|
@ -310,18 +310,21 @@ MaterialEditor::MaterialEditor() {
|
|||
sphere_switch = memnew(Button);
|
||||
sphere_switch->set_theme_type_variation("PreviewLightButton");
|
||||
sphere_switch->set_toggle_mode(true);
|
||||
sphere_switch->set_accessibility_name(TTRC("Sphere"));
|
||||
vb_shape->add_child(sphere_switch);
|
||||
sphere_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_sphere_switch_pressed));
|
||||
|
||||
box_switch = memnew(Button);
|
||||
box_switch->set_theme_type_variation("PreviewLightButton");
|
||||
box_switch->set_toggle_mode(true);
|
||||
box_switch->set_accessibility_name(TTRC("Box"));
|
||||
vb_shape->add_child(box_switch);
|
||||
box_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_box_switch_pressed));
|
||||
|
||||
quad_switch = memnew(Button);
|
||||
quad_switch->set_theme_type_variation("PreviewLightButton");
|
||||
quad_switch->set_toggle_mode(true);
|
||||
quad_switch->set_accessibility_name(TTRC("Quad"));
|
||||
vb_shape->add_child(quad_switch);
|
||||
quad_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_quad_switch_pressed));
|
||||
|
||||
|
|
@ -334,6 +337,7 @@ MaterialEditor::MaterialEditor() {
|
|||
light_1_switch->set_theme_type_variation("PreviewLightButton");
|
||||
light_1_switch->set_toggle_mode(true);
|
||||
light_1_switch->set_pressed(true);
|
||||
light_1_switch->set_accessibility_name(TTRC("First Light"));
|
||||
vb_light->add_child(light_1_switch);
|
||||
light_1_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_light_1_switch_pressed));
|
||||
|
||||
|
|
@ -341,6 +345,7 @@ MaterialEditor::MaterialEditor() {
|
|||
light_2_switch->set_theme_type_variation("PreviewLightButton");
|
||||
light_2_switch->set_toggle_mode(true);
|
||||
light_2_switch->set_pressed(true);
|
||||
light_2_switch->set_accessibility_name(TTRC("Second Light"));
|
||||
vb_light->add_child(light_2_switch);
|
||||
light_2_switch->connect(SceneStringName(pressed), callable_mp(this, &MaterialEditor::_on_light_2_switch_pressed));
|
||||
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ MeshEditor::MeshEditor() {
|
|||
light_1_switch->set_theme_type_variation("PreviewLightButton");
|
||||
light_1_switch->set_toggle_mode(true);
|
||||
light_1_switch->set_pressed(true);
|
||||
light_1_switch->set_accessibility_name(TTRC("First Light"));
|
||||
vb_light->add_child(light_1_switch);
|
||||
light_1_switch->connect(SceneStringName(pressed), callable_mp(this, &MeshEditor::_on_light_1_switch_pressed));
|
||||
|
||||
|
|
@ -156,6 +157,7 @@ MeshEditor::MeshEditor() {
|
|||
light_2_switch->set_theme_type_variation("PreviewLightButton");
|
||||
light_2_switch->set_toggle_mode(true);
|
||||
light_2_switch->set_pressed(true);
|
||||
light_2_switch->set_accessibility_name(TTRC("Second Light"));
|
||||
vb_light->add_child(light_2_switch);
|
||||
light_2_switch->connect(SceneStringName(pressed), callable_mp(this, &MeshEditor::_on_light_2_switch_pressed));
|
||||
|
||||
|
|
|
|||
|
|
@ -593,6 +593,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
|
|||
//outline_dialog->set_child_rect(outline_dialog_vbc);
|
||||
|
||||
outline_size = memnew(SpinBox);
|
||||
outline_size->set_accessibility_name(TTRC("Outline Size"));
|
||||
outline_size->set_min(0.001);
|
||||
outline_size->set_max(1024);
|
||||
outline_size->set_step(0.001);
|
||||
|
|
@ -610,10 +611,11 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
|
|||
shape_dialog->add_child(shape_dialog_vbc);
|
||||
|
||||
Label *l = memnew(Label);
|
||||
l->set_text(TTR("Collision Shape placement"));
|
||||
l->set_text(TTR("Collision Shape Placement"));
|
||||
shape_dialog_vbc->add_child(l);
|
||||
|
||||
shape_placement = memnew(OptionButton);
|
||||
shape_placement->set_accessibility_name(TTRC("Collision Shape Placement"));
|
||||
shape_placement->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
shape_placement->add_item(TTR("Sibling"), SHAPE_PLACEMENT_SIBLING);
|
||||
shape_placement->set_item_tooltip(-1, TTR("Creates collision shapes as Sibling."));
|
||||
|
|
@ -626,6 +628,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
|
|||
shape_dialog_vbc->add_child(l);
|
||||
|
||||
shape_type = memnew(OptionButton);
|
||||
shape_type->set_accessibility_name(TTRC("Collision Shape Type"));
|
||||
shape_type->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
shape_type->add_item(TTR("Trimesh"), SHAPE_TYPE_TRIMESH);
|
||||
shape_type->set_item_tooltip(-1, TTR("Creates a polygon-based collision shape.\nThis is the most accurate (but slowest) option for collision detection."));
|
||||
|
|
|
|||
|
|
@ -290,8 +290,10 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
surface_source = memnew(LineEdit);
|
||||
hbc->add_child(surface_source);
|
||||
surface_source->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
surface_source->set_accessibility_name(TTRC("Surface Source"));
|
||||
Button *b = memnew(Button);
|
||||
hbc->add_child(b);
|
||||
b->set_accessibility_name(TTRC("Browse"));
|
||||
b->set_text("..");
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_browse).bind(false));
|
||||
|
||||
|
|
@ -301,13 +303,16 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
mesh_source = memnew(LineEdit);
|
||||
hbc->add_child(mesh_source);
|
||||
mesh_source->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
mesh_source->set_accessibility_name(TTRC("Mesh Source"));
|
||||
b = memnew(Button);
|
||||
hbc->add_child(b);
|
||||
b->set_accessibility_name(TTRC("Browse"));
|
||||
b->set_text("..");
|
||||
vbc->add_margin_child(TTR("Source Mesh:"), hbc);
|
||||
b->connect(SceneStringName(pressed), callable_mp(this, &MultiMeshEditor::_browse).bind(true));
|
||||
|
||||
populate_axis = memnew(OptionButton);
|
||||
populate_axis->set_accessibility_name(TTRC("Up Axis"));
|
||||
populate_axis->add_item(TTR("X-Axis"));
|
||||
populate_axis->add_item(TTR("Y-Axis"));
|
||||
populate_axis->add_item(TTR("Z-Axis"));
|
||||
|
|
@ -317,11 +322,13 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_rotate_random = memnew(HSlider);
|
||||
populate_rotate_random->set_max(1);
|
||||
populate_rotate_random->set_step(0.01);
|
||||
populate_rotate_random->set_accessibility_name(TTRC("Random Rotation"));
|
||||
vbc->add_margin_child(TTR("Random Rotation:"), populate_rotate_random);
|
||||
|
||||
populate_tilt_random = memnew(HSlider);
|
||||
populate_tilt_random->set_max(1);
|
||||
populate_tilt_random->set_step(0.01);
|
||||
populate_tilt_random->set_accessibility_name(TTRC("Random Tilt"));
|
||||
vbc->add_margin_child(TTR("Random Tilt:"), populate_tilt_random);
|
||||
|
||||
populate_scale_random = memnew(SpinBox);
|
||||
|
|
@ -329,7 +336,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_scale_random->set_max(1);
|
||||
populate_scale_random->set_value(0);
|
||||
populate_scale_random->set_step(0.01);
|
||||
|
||||
populate_scale_random->set_accessibility_name(TTRC("Random Scale"));
|
||||
vbc->add_margin_child(TTR("Random Scale:"), populate_scale_random);
|
||||
|
||||
populate_scale = memnew(SpinBox);
|
||||
|
|
@ -337,7 +344,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_scale->set_max(4096);
|
||||
populate_scale->set_value(1);
|
||||
populate_scale->set_step(0.01);
|
||||
|
||||
populate_scale->set_accessibility_name(TTRC("Scale"));
|
||||
vbc->add_margin_child(TTR("Scale:"), populate_scale);
|
||||
|
||||
populate_amount = memnew(SpinBox);
|
||||
|
|
@ -347,6 +354,7 @@ MultiMeshEditor::MultiMeshEditor() {
|
|||
populate_amount->set_min(1);
|
||||
populate_amount->set_max(65536);
|
||||
populate_amount->set_value(128);
|
||||
populate_amount->set_accessibility_name(TTRC("Amount"));
|
||||
vbc->add_margin_child(TTR("Amount:"), populate_amount);
|
||||
|
||||
populate_dialog->set_ok_button_text(TTR("Populate"));
|
||||
|
|
|
|||
|
|
@ -830,12 +830,14 @@ NavigationObstacle3DEditorPlugin::NavigationObstacle3DEditorPlugin() {
|
|||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
obstacle_editor->add_child(button_create);
|
||||
button_create->set_tooltip_text(TTR("Add Vertex"));
|
||||
button_create->set_accessibility_name(TTRC("Add Vertex"));
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditorPlugin::set_mode).bind(NavigationObstacle3DEditorPlugin::MODE_CREATE));
|
||||
button_create->set_toggle_mode(true);
|
||||
button_create->set_button_group(bg);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_edit->set_accessibility_name(TTRC("Edit"));
|
||||
obstacle_editor->add_child(button_edit);
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditorPlugin::set_mode).bind(NavigationObstacle3DEditorPlugin::MODE_EDIT));
|
||||
button_edit->set_toggle_mode(true);
|
||||
|
|
@ -843,6 +845,7 @@ NavigationObstacle3DEditorPlugin::NavigationObstacle3DEditorPlugin() {
|
|||
|
||||
button_delete = memnew(Button);
|
||||
button_delete->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_delete->set_accessibility_name(TTRC("Delete"));
|
||||
obstacle_editor->add_child(button_delete);
|
||||
button_delete->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditorPlugin::set_mode).bind(NavigationObstacle3DEditorPlugin::MODE_DELETE));
|
||||
button_delete->set_toggle_mode(true);
|
||||
|
|
@ -850,12 +853,14 @@ NavigationObstacle3DEditorPlugin::NavigationObstacle3DEditorPlugin() {
|
|||
|
||||
button_flip = memnew(Button);
|
||||
button_flip->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_flip->set_accessibility_name(TTRC("Flip"));
|
||||
obstacle_editor->add_child(button_flip);
|
||||
button_flip->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditorPlugin::set_mode).bind(NavigationObstacle3DEditorPlugin::ACTION_FLIP));
|
||||
button_flip->set_toggle_mode(true);
|
||||
|
||||
button_clear = memnew(Button);
|
||||
button_clear->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_clear->set_accessibility_name(TTRC("Clear"));
|
||||
obstacle_editor->add_child(button_clear);
|
||||
button_clear->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditorPlugin::set_mode).bind(NavigationObstacle3DEditorPlugin::ACTION_CLEAR));
|
||||
button_clear->set_toggle_mode(true);
|
||||
|
|
|
|||
|
|
@ -4909,6 +4909,9 @@ void Node3DEditorViewport::_perform_drop_data() {
|
|||
}
|
||||
|
||||
bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
return false;
|
||||
}
|
||||
preview_node_viewport_pos = p_point;
|
||||
|
||||
bool can_instantiate = false;
|
||||
|
|
@ -5587,6 +5590,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
|
|||
view_display_menu->set_flat(false);
|
||||
view_display_menu->set_h_size_flags(0);
|
||||
view_display_menu->set_shortcut_context(this);
|
||||
view_display_menu->set_accessibility_name(TTRC("View"));
|
||||
vbox->add_child(view_display_menu);
|
||||
|
||||
view_display_menu->get_popup()->set_hide_on_checkable_item_selection(false);
|
||||
|
|
@ -8305,6 +8309,15 @@ void Node3DEditor::_notification(int p_what) {
|
|||
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &Node3DEditor::update_all_gizmos).bind(Variant()));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_ACCESSIBILITY_UPDATE: {
|
||||
RID ae = get_accessibility_element();
|
||||
ERR_FAIL_COND(ae.is_null());
|
||||
|
||||
//TODO
|
||||
DisplayServer::get_singleton()->accessibility_update_set_role(ae, DisplayServer::AccessibilityRole::ROLE_STATIC_TEXT);
|
||||
DisplayServer::get_singleton()->accessibility_update_set_value(ae, TTR(vformat("The %s is not accessible at this time.", "3D editor")));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
_update_theme();
|
||||
_register_all_gizmos();
|
||||
|
|
@ -8823,7 +8836,7 @@ void Node3DEditor::_load_default_preview_settings() {
|
|||
environ_sky_color->set_pick_color(Color(0.385, 0.454, 0.55));
|
||||
environ_ground_color->set_pick_color(Color(0.2, 0.169, 0.133));
|
||||
environ_energy->set_value_no_signal(1.0);
|
||||
if (OS::get_singleton()->get_current_rendering_method() != "gl_compatibility") {
|
||||
if (OS::get_singleton()->get_current_rendering_method() != "gl_compatibility" && OS::get_singleton()->get_current_rendering_method() != "dummy") {
|
||||
environ_glow_button->set_pressed_no_signal(true);
|
||||
}
|
||||
environ_tonemap_button->set_pressed_no_signal(true);
|
||||
|
|
@ -9099,6 +9112,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTRC("Select Mode"), Key::Q, true));
|
||||
tool_button[TOOL_MODE_SELECT]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_SELECT]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Rotate selected node around pivot.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked.") + "\n" + TTR("(Available in all modes.)"));
|
||||
tool_button[TOOL_MODE_SELECT]->set_accessibility_name(TTRC("Select Mode"));
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
tool_button[TOOL_MODE_MOVE] = memnew(Button);
|
||||
|
|
@ -9110,6 +9124,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTRC("Move Mode"), Key::W, true));
|
||||
tool_button[TOOL_MODE_MOVE]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_MOVE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
tool_button[TOOL_MODE_MOVE]->set_accessibility_name(TTRC("Move Mode"));
|
||||
|
||||
tool_button[TOOL_MODE_ROTATE] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_ROTATE]);
|
||||
|
|
@ -9119,6 +9134,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTRC("Rotate Mode"), Key::E, true));
|
||||
tool_button[TOOL_MODE_ROTATE]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_ROTATE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
tool_button[TOOL_MODE_ROTATE]->set_accessibility_name(TTRC("Rotate Mode"));
|
||||
|
||||
tool_button[TOOL_MODE_SCALE] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_SCALE]);
|
||||
|
|
@ -9128,6 +9144,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTRC("Scale Mode"), Key::R, true));
|
||||
tool_button[TOOL_MODE_SCALE]->set_shortcut_context(this);
|
||||
tool_button[TOOL_MODE_SCALE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
|
||||
tool_button[TOOL_MODE_SCALE]->set_accessibility_name(TTRC("Scale Mode"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -9137,6 +9154,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_MODE_LIST_SELECT]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_LIST_SELECT));
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_tooltip_text(TTR("Show list of selectable nodes at position clicked."));
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_accessibility_name(TTRC("Show List of Selectable Nodes"));
|
||||
|
||||
tool_button[TOOL_LOCK_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_LOCK_SELECTED]);
|
||||
|
|
@ -9145,6 +9163,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_LOCK_SELECTED]->set_tooltip_text(TTRC("Lock selected node, preventing selection and movement."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_shortcut(ED_GET_SHORTCUT("editor/lock_selected_nodes"));
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_accessibility_name(TTRC("Lock"));
|
||||
|
||||
tool_button[TOOL_UNLOCK_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_UNLOCK_SELECTED]);
|
||||
|
|
@ -9153,6 +9172,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip_text(TTRC("Unlock selected node, allowing selection and movement."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_shortcut(ED_GET_SHORTCUT("editor/unlock_selected_nodes"));
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_accessibility_name(TTRC("Unlock"));
|
||||
|
||||
tool_button[TOOL_GROUP_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_GROUP_SELECTED]);
|
||||
|
|
@ -9161,6 +9181,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_GROUP_SELECTED]->set_tooltip_text(TTRC("Groups the selected node with its children. This selects the parent when any child node is clicked in 2D and 3D view."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_shortcut(ED_GET_SHORTCUT("editor/group_selected_nodes"));
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_accessibility_name(TTRC("Group"));
|
||||
|
||||
tool_button[TOOL_UNGROUP_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
|
||||
|
|
@ -9169,6 +9190,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip_text(TTRC("Ungroups the selected node from its children. Child nodes will be individual items in 2D and 3D view."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_shortcut(ED_GET_SHORTCUT("editor/ungroup_selected_nodes"));
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_accessibility_name(TTRC("Ungroup"));
|
||||
|
||||
tool_button[TOOL_RULER] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_RULER]);
|
||||
|
|
@ -9178,6 +9200,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_button[TOOL_RULER]->set_tooltip_text(TTRC("LMB+Drag: Measure the distance between two points in 3D space."));
|
||||
// Define the shortcut globally (without a context) so that it works if the Scene tree dock is currently focused.
|
||||
tool_button[TOOL_RULER]->set_shortcut(ED_SHORTCUT("spatial_editor/measure", TTRC("Ruler Mode"), Key::M));
|
||||
tool_button[TOOL_RULER]->set_accessibility_name(TTRC("Ruler Mode"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
|
@ -9188,6 +9211,7 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->connect(SceneStringName(toggled), callable_mp(this, &Node3DEditor::_menu_item_toggled).bind(MENU_TOOL_LOCAL_COORDS));
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut(ED_SHORTCUT("spatial_editor/local_coords", TTRC("Use Local Space"), Key::T));
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut_context(this);
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_accessibility_name(TTRC("Use Local Space"));
|
||||
|
||||
tool_option_button[TOOL_OPT_USE_SNAP] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_option_button[TOOL_OPT_USE_SNAP]);
|
||||
|
|
@ -9196,11 +9220,13 @@ Node3DEditor::Node3DEditor() {
|
|||
tool_option_button[TOOL_OPT_USE_SNAP]->connect(SceneStringName(toggled), callable_mp(this, &Node3DEditor::_menu_item_toggled).bind(MENU_TOOL_USE_SNAP));
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut(ED_SHORTCUT("spatial_editor/snap", TTRC("Use Snap"), Key::Y));
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut_context(this);
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_accessibility_name(TTRC("Use Snap"));
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
sun_button = memnew(Button);
|
||||
sun_button->set_tooltip_text(TTR("Toggle preview sunlight.\nIf a DirectionalLight3D node is added to the scene, preview sunlight is disabled."));
|
||||
sun_button->set_toggle_mode(true);
|
||||
sun_button->set_accessibility_name(TTRC("Preview Sunlight"));
|
||||
sun_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
sun_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
|
||||
// Preview is enabled by default - ensure this applies on editor startup when there is no state yet.
|
||||
|
|
@ -9211,6 +9237,7 @@ Node3DEditor::Node3DEditor() {
|
|||
environ_button = memnew(Button);
|
||||
environ_button->set_tooltip_text(TTR("Toggle preview environment.\nIf a WorldEnvironment node is added to the scene, preview environment is disabled."));
|
||||
environ_button->set_toggle_mode(true);
|
||||
environ_button->set_accessibility_name(TTRC("Preview Environment"));
|
||||
environ_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
environ_button->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_update_preview_environment), CONNECT_DEFERRED);
|
||||
// Preview is enabled by default - ensure this applies on editor startup when there is no state yet.
|
||||
|
|
@ -9221,6 +9248,7 @@ Node3DEditor::Node3DEditor() {
|
|||
sun_environ_settings = memnew(Button);
|
||||
sun_environ_settings->set_tooltip_text(TTR("Edit Sun and Environment settings."));
|
||||
sun_environ_settings->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
sun_environ_settings->set_accessibility_name(TTRC("Edit Sun and Environment"));
|
||||
sun_environ_settings->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_sun_environ_settings_pressed));
|
||||
|
||||
main_menu_hbox->add_child(sun_environ_settings);
|
||||
|
|
@ -9363,14 +9391,17 @@ Node3DEditor::Node3DEditor() {
|
|||
|
||||
snap_translate = memnew(LineEdit);
|
||||
snap_translate->set_select_all_on_focus(true);
|
||||
snap_translate->set_accessibility_name(TTRC("Translate Snap"));
|
||||
snap_dialog_vbc->add_margin_child(TTR("Translate Snap:"), snap_translate);
|
||||
|
||||
snap_rotate = memnew(LineEdit);
|
||||
snap_rotate->set_select_all_on_focus(true);
|
||||
snap_rotate->set_accessibility_name(TTRC("Rotate Snap"));
|
||||
snap_dialog_vbc->add_margin_child(TTR("Rotate Snap (deg.):"), snap_rotate);
|
||||
|
||||
snap_scale = memnew(LineEdit);
|
||||
snap_scale->set_select_all_on_focus(true);
|
||||
snap_scale->set_accessibility_name(TTRC("Scale Snap"));
|
||||
snap_dialog_vbc->add_margin_child(TTR("Scale Snap (%):"), snap_scale);
|
||||
|
||||
/* SETTINGS DIALOG */
|
||||
|
|
@ -9389,12 +9420,14 @@ Node3DEditor::Node3DEditor() {
|
|||
settings_fov->set_value(EDITOR_GET("editors/3d/default_fov"));
|
||||
settings_fov->set_select_all_on_focus(true);
|
||||
settings_fov->set_tooltip_text(TTR("FOV is defined as a vertical value, as the editor camera always uses the Keep Height aspect mode."));
|
||||
settings_fov->set_accessibility_name(TTRC("Perspective VFOV"));
|
||||
settings_vbc->add_margin_child(TTR("Perspective VFOV (deg.):"), settings_fov);
|
||||
|
||||
settings_znear = memnew(SpinBox);
|
||||
settings_znear->set_max(MAX_Z);
|
||||
settings_znear->set_min(MIN_Z);
|
||||
settings_znear->set_step(0.01);
|
||||
settings_znear->set_accessibility_name(TTRC("View Z-Near"));
|
||||
settings_znear->set_value(EDITOR_GET("editors/3d/default_z_near"));
|
||||
settings_znear->set_select_all_on_focus(true);
|
||||
settings_vbc->add_margin_child(TTR("View Z-Near:"), settings_znear);
|
||||
|
|
@ -9403,6 +9436,7 @@ Node3DEditor::Node3DEditor() {
|
|||
settings_zfar->set_max(MAX_Z);
|
||||
settings_zfar->set_min(MIN_Z);
|
||||
settings_zfar->set_step(0.1);
|
||||
settings_zfar->set_accessibility_name(TTRC("View Z-Far"));
|
||||
settings_zfar->set_value(EDITOR_GET("editors/3d/default_z_far"));
|
||||
settings_zfar->set_select_all_on_focus(true);
|
||||
settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar);
|
||||
|
|
@ -9468,6 +9502,7 @@ Node3DEditor::Node3DEditor() {
|
|||
|
||||
xform_type = memnew(OptionButton);
|
||||
xform_type->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
xform_type->set_accessibility_name(TTRC("Transform Type"));
|
||||
xform_type->add_item(TTR("Pre"));
|
||||
xform_type->add_item(TTR("Post"));
|
||||
xform_vbc->add_child(xform_type);
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ ParticleProcessMaterialMinMaxPropertyEditor::ParticleProcessMaterialMinMaxProper
|
|||
toggle_mode_button = memnew(Button);
|
||||
toggle_mode_button->set_toggle_mode(true);
|
||||
toggle_mode_button->set_tooltip_text(TTR("Toggle between minimum/maximum and base value/spread modes."));
|
||||
toggle_mode_button->set_accessibility_name(TTRC("Spread mode"));
|
||||
hb->add_child(toggle_mode_button);
|
||||
toggle_mode_button->connect(SceneStringName(toggled), callable_mp(this, &ParticleProcessMaterialMinMaxPropertyEditor::_toggle_mode));
|
||||
|
||||
|
|
|
|||
|
|
@ -826,6 +826,7 @@ Particles3DEditorPlugin::Particles3DEditorPlugin() {
|
|||
generate_aabb->add_child(genvb);
|
||||
|
||||
generate_seconds = memnew(SpinBox);
|
||||
generate_seconds->set_accessibility_name(TTRC("Generation Time"));
|
||||
generate_seconds->set_min(0.1);
|
||||
generate_seconds->set_max(25);
|
||||
generate_seconds->set_value(2);
|
||||
|
|
@ -850,12 +851,14 @@ Particles3DEditorPlugin::Particles3DEditorPlugin() {
|
|||
emission_dialog->add_child(emd_vb);
|
||||
|
||||
emission_amount = memnew(SpinBox);
|
||||
emission_amount->set_accessibility_name(TTRC("Emission Points"));
|
||||
emission_amount->set_min(1);
|
||||
emission_amount->set_max(100000);
|
||||
emission_amount->set_value(512);
|
||||
emd_vb->add_margin_child(TTR("Emission Points:"), emission_amount);
|
||||
|
||||
emission_fill = memnew(OptionButton);
|
||||
emission_fill->set_accessibility_name(TTRC("Emission Source"));
|
||||
emission_fill->add_item(TTR("Surface Points"));
|
||||
emission_fill->add_item(TTR("Surface Points+Normal (Directed)"));
|
||||
emission_fill->add_item(TTR("Volume"));
|
||||
|
|
|
|||
|
|
@ -722,6 +722,7 @@ Path2DEditor::Path2DEditor() {
|
|||
curve_edit->set_pressed(true);
|
||||
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit->set_tooltip_text(TTR("Select Points") + "\n" + TTR("Shift+Drag: Select Control Points") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Click: Add Point") + "\n" + TTR("Left Click: Split Segment (in curve)") + "\n" + TTR("Right Click: Delete Point"));
|
||||
curve_edit->set_accessibility_name(TTRC("Select Points"));
|
||||
curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT));
|
||||
toolbar->add_child(curve_edit);
|
||||
|
||||
|
|
@ -730,6 +731,7 @@ Path2DEditor::Path2DEditor() {
|
|||
curve_edit_curve->set_toggle_mode(true);
|
||||
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit_curve->set_tooltip_text(TTR("Select Control Points (Shift+Drag)"));
|
||||
curve_edit_curve->set_accessibility_name(TTRC("Select Control Points"));
|
||||
curve_edit_curve->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_EDIT_CURVE));
|
||||
toolbar->add_child(curve_edit_curve);
|
||||
|
||||
|
|
@ -738,6 +740,7 @@ Path2DEditor::Path2DEditor() {
|
|||
curve_create->set_toggle_mode(true);
|
||||
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_create->set_tooltip_text(TTR("Add Point (in empty space)") + "\n" + TTR("Right Click: Delete Point"));
|
||||
curve_create->set_accessibility_name(TTRC("Add Point"));
|
||||
curve_create->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CREATE));
|
||||
toolbar->add_child(curve_create);
|
||||
|
||||
|
|
@ -746,6 +749,7 @@ Path2DEditor::Path2DEditor() {
|
|||
curve_del->set_toggle_mode(true);
|
||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_del->set_tooltip_text(TTR("Delete Point"));
|
||||
curve_del->set_accessibility_name(TTRC("Delete Point"));
|
||||
curve_del->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_DELETE));
|
||||
toolbar->add_child(curve_del);
|
||||
|
||||
|
|
@ -753,6 +757,7 @@ Path2DEditor::Path2DEditor() {
|
|||
curve_close->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_close->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_close->set_tooltip_text(TTR("Close Curve"));
|
||||
curve_close->set_accessibility_name(TTRC("Close Curve"));
|
||||
curve_close->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CLOSE));
|
||||
toolbar->add_child(curve_close);
|
||||
|
||||
|
|
@ -760,6 +765,7 @@ Path2DEditor::Path2DEditor() {
|
|||
curve_clear_points->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_clear_points->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_clear_points->set_tooltip_text(TTR("Clear Points"));
|
||||
curve_clear_points->set_accessibility_name(TTRC("Clear Points"));
|
||||
curve_clear_points->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_confirm_clear_points));
|
||||
toolbar->add_child(curve_clear_points);
|
||||
|
||||
|
|
|
|||
|
|
@ -919,6 +919,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_edit->set_toggle_mode(true);
|
||||
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit->set_tooltip_text(TTR("Select Points") + "\n" + TTR("Shift+Click: Select multiple Points") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Click: Add Point") + "\n" + TTR("Right Click: Delete Point"));
|
||||
curve_edit->set_accessibility_name(TTRC("Select Points"));
|
||||
toolbar->add_child(curve_edit);
|
||||
curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT));
|
||||
|
||||
|
|
@ -927,6 +928,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_edit_curve->set_toggle_mode(true);
|
||||
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit_curve->set_tooltip_text(TTR("Select Control Points") + "\n" + TTR("Shift+Click: Drag out Control Points"));
|
||||
curve_edit_curve->set_accessibility_name(TTRC("Select Control Points"));
|
||||
toolbar->add_child(curve_edit_curve);
|
||||
curve_edit_curve->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_CURVE));
|
||||
|
||||
|
|
@ -935,6 +937,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_edit_tilt->set_toggle_mode(true);
|
||||
curve_edit_tilt->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_edit_tilt->set_tooltip_text(TTR("Select Tilt Handles"));
|
||||
curve_edit_tilt->set_accessibility_name(TTRC("Select Tilt Handles"));
|
||||
toolbar->add_child(curve_edit_tilt);
|
||||
curve_edit_tilt->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_TILT));
|
||||
|
||||
|
|
@ -943,6 +946,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_create->set_toggle_mode(true);
|
||||
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_create->set_tooltip_text(TTR("Add Point (in empty space)") + "\n" + TTR("Split Segment (in curve)"));
|
||||
curve_create->set_accessibility_name(TTRC("Add Point"));
|
||||
toolbar->add_child(curve_create);
|
||||
curve_create->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_CREATE));
|
||||
|
||||
|
|
@ -951,6 +955,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_del->set_toggle_mode(true);
|
||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_del->set_tooltip_text(TTR("Delete Point"));
|
||||
curve_del->set_accessibility_name(TTRC("Delete Point"));
|
||||
toolbar->add_child(curve_del);
|
||||
curve_del->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_DELETE));
|
||||
|
||||
|
|
@ -958,6 +963,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_closed->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_closed->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_closed->set_tooltip_text(TTR("Close Curve"));
|
||||
curve_closed->set_accessibility_name(TTRC("Close Curve"));
|
||||
toolbar->add_child(curve_closed);
|
||||
curve_closed->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_toggle_closed_curve));
|
||||
|
||||
|
|
@ -965,6 +971,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
|||
curve_clear_points->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_clear_points->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_clear_points->set_tooltip_text(TTR("Clear Points"));
|
||||
curve_clear_points->set_accessibility_name(TTRC("Clear Points"));
|
||||
curve_clear_points->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_confirm_clear_points));
|
||||
toolbar->add_child(curve_clear_points);
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
name_edit = memnew(LineEdit);
|
||||
name_edit->set_placeholder("MyPlugin");
|
||||
name_edit->set_tooltip_text(TTR("Required. This name will be displayed in the list of plugins."));
|
||||
name_edit->set_accessibility_name(TTRC("Name"));
|
||||
name_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid->add_child(name_edit);
|
||||
|
||||
|
|
@ -237,6 +238,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
subfolder_edit = memnew(LineEdit);
|
||||
subfolder_edit->set_placeholder("\"my_plugin\" -> res://addons/my_plugin");
|
||||
subfolder_edit->set_tooltip_text(TTR("Optional. The folder name should generally use `snake_case` naming (avoid spaces and special characters).\nIf left empty, the folder will be named after the plugin name converted to `snake_case`."));
|
||||
subfolder_edit->set_accessibility_name(TTRC("Subfolder"));
|
||||
subfolder_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid->add_child(subfolder_edit);
|
||||
plugin_edit_hidden_controls.push_back(subfolder_edit);
|
||||
|
|
@ -249,6 +251,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
|
||||
desc_edit = memnew(TextEdit);
|
||||
desc_edit->set_tooltip_text(TTR("Optional. This description should be kept relatively short (up to 5 lines).\nIt will display when hovering the plugin in the list of plugins."));
|
||||
desc_edit->set_accessibility_name(TTRC("Description"));
|
||||
desc_edit->set_custom_minimum_size(Size2(400, 80) * EDSCALE);
|
||||
desc_edit->set_line_wrapping_mode(TextEdit::LineWrappingMode::LINE_WRAPPING_BOUNDARY);
|
||||
desc_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
|
@ -263,6 +266,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
|
||||
author_edit = memnew(LineEdit);
|
||||
author_edit->set_placeholder("Godette");
|
||||
author_edit->set_accessibility_name(TTRC("Author"));
|
||||
author_edit->set_tooltip_text(TTR("Optional. The author's username, full name, or organization name."));
|
||||
author_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid->add_child(author_edit);
|
||||
|
|
@ -276,6 +280,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
version_edit = memnew(LineEdit);
|
||||
version_edit->set_tooltip_text(TTR("Optional. A human-readable version identifier used for informational purposes only."));
|
||||
version_edit->set_placeholder("1.0");
|
||||
version_edit->set_accessibility_name(TTRC("Version"));
|
||||
version_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid->add_child(version_edit);
|
||||
|
||||
|
|
@ -287,6 +292,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
|
||||
script_option_edit = memnew(OptionButton);
|
||||
script_option_edit->set_tooltip_text(TTR("Required. The scripting language to use for the script.\nNote that a plugin may use several languages at once by adding more scripts to the plugin."));
|
||||
script_option_edit->set_accessibility_name(TTRC("Scripting Language"));
|
||||
int default_lang = 0;
|
||||
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
|
||||
ScriptLanguage *lang = ScriptServer::get_language(i);
|
||||
|
|
@ -307,6 +313,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
script_edit = memnew(LineEdit);
|
||||
script_edit->set_tooltip_text(TTR("Optional. The name of the script file. If left empty, will default to the subfolder name."));
|
||||
script_edit->set_placeholder("\"plugin.gd\" -> res://addons/my_plugin/plugin.gd");
|
||||
script_edit->set_accessibility_name(TTRC("Script"));
|
||||
script_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
grid->add_child(script_edit);
|
||||
|
||||
|
|
@ -319,6 +326,7 @@ PluginConfigDialog::PluginConfigDialog() {
|
|||
|
||||
active_edit = memnew(CheckBox);
|
||||
active_edit->set_pressed(true);
|
||||
active_edit->set_accessibility_name(TTRC("Active"));
|
||||
grid->add_child(active_edit);
|
||||
plugin_edit_hidden_controls.push_back(active_edit);
|
||||
|
||||
|
|
|
|||
|
|
@ -1319,6 +1319,18 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
action_buttons[ACTION_PAINT_WEIGHT]->set_tooltip_text(TTR("Paint weights with specified intensity."));
|
||||
action_buttons[ACTION_CLEAR_WEIGHT]->set_tooltip_text(TTR("Unpaint weights with specified intensity."));
|
||||
|
||||
action_buttons[ACTION_CREATE]->set_accessibility_name(TTRC("Create Polygon"));
|
||||
action_buttons[ACTION_CREATE_INTERNAL]->set_accessibility_name(TTRC("Create Internal Vertex"));
|
||||
action_buttons[ACTION_REMOVE_INTERNAL]->set_accessibility_name(TTRC("Remove Internal Vertex"));
|
||||
action_buttons[ACTION_EDIT_POINT]->set_accessibility_name(TTRC("Move Points"));
|
||||
action_buttons[ACTION_MOVE]->set_accessibility_name(TTRC("Move Polygon"));
|
||||
action_buttons[ACTION_ROTATE]->set_accessibility_name(TTRC("Rotate Polygon"));
|
||||
action_buttons[ACTION_SCALE]->set_accessibility_name(TTRC("Scale Polygon"));
|
||||
action_buttons[ACTION_ADD_POLYGON]->set_accessibility_name(TTRC("Create Custom Polygon"));
|
||||
action_buttons[ACTION_REMOVE_POLYGON]->set_accessibility_name(TTRC("Remove Custom Polygon"));
|
||||
action_buttons[ACTION_PAINT_WEIGHT]->set_accessibility_name(TTRC("Paint Weights"));
|
||||
action_buttons[ACTION_CLEAR_WEIGHT]->set_accessibility_name(TTRC("Unpaint Weights"));
|
||||
|
||||
bone_paint_strength = memnew(HSlider);
|
||||
toolbar->add_child(bone_paint_strength);
|
||||
bone_paint_strength->set_custom_minimum_size(Size2(75 * EDSCALE, 0));
|
||||
|
|
@ -1327,6 +1339,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
bone_paint_strength->set_max(1);
|
||||
bone_paint_strength->set_step(0.01);
|
||||
bone_paint_strength->set_value(0.5);
|
||||
bone_paint_strength->set_accessibility_name(TTRC("Strength"));
|
||||
|
||||
bone_paint_radius_label = memnew(Label(TTR("Radius:")));
|
||||
toolbar->add_child(bone_paint_radius_label);
|
||||
|
|
@ -1337,6 +1350,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
bone_paint_radius->set_max(100);
|
||||
bone_paint_radius->set_step(1);
|
||||
bone_paint_radius->set_value(32);
|
||||
bone_paint_radius->set_accessibility_name(TTRC("Radius"));
|
||||
|
||||
HSplitContainer *uv_main_hsc = memnew(HSplitContainer);
|
||||
polygon_edit->add_child(uv_main_hsc);
|
||||
|
|
@ -1407,6 +1421,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
sb_off_x->set_value(snap_offset.x);
|
||||
sb_off_x->set_suffix("px");
|
||||
sb_off_x->connect(SceneStringName(value_changed), callable_mp(this, &Polygon2DEditor::_set_snap_off_x));
|
||||
sb_off_x->set_accessibility_name(TTRC("Grid Offset X"));
|
||||
grid_settings_vb->add_margin_child(TTR("Grid Offset X:"), sb_off_x);
|
||||
|
||||
SpinBox *sb_off_y = memnew(SpinBox);
|
||||
|
|
@ -1416,6 +1431,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
sb_off_y->set_value(snap_offset.y);
|
||||
sb_off_y->set_suffix("px");
|
||||
sb_off_y->connect(SceneStringName(value_changed), callable_mp(this, &Polygon2DEditor::_set_snap_off_y));
|
||||
sb_off_y->set_accessibility_name(TTRC("Grid Offset Y"));
|
||||
grid_settings_vb->add_margin_child(TTR("Grid Offset Y:"), sb_off_y);
|
||||
|
||||
SpinBox *sb_step_x = memnew(SpinBox);
|
||||
|
|
@ -1425,6 +1441,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
sb_step_x->set_value(snap_step.x);
|
||||
sb_step_x->set_suffix("px");
|
||||
sb_step_x->connect(SceneStringName(value_changed), callable_mp(this, &Polygon2DEditor::_set_snap_step_x));
|
||||
sb_step_x->set_accessibility_name(TTRC("Grid Step X"));
|
||||
grid_settings_vb->add_margin_child(TTR("Grid Step X:"), sb_step_x);
|
||||
|
||||
SpinBox *sb_step_y = memnew(SpinBox);
|
||||
|
|
@ -1434,6 +1451,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
|||
sb_step_y->set_value(snap_step.y);
|
||||
sb_step_y->set_suffix("px");
|
||||
sb_step_y->connect(SceneStringName(value_changed), callable_mp(this, &Polygon2DEditor::_set_snap_step_y));
|
||||
sb_step_y->set_accessibility_name(TTRC("Grid Step Y"));
|
||||
grid_settings_vb->add_margin_child(TTR("Grid Step Y:"), sb_step_y);
|
||||
|
||||
zoom_widget = memnew(EditorZoomWidget);
|
||||
|
|
|
|||
|
|
@ -533,6 +533,7 @@ Polygon3DEditor::Polygon3DEditor() {
|
|||
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_create->set_accessibility_name(TTRC("Create Polygon"));
|
||||
button_create->set_tooltip_text(TTRC("Create Polygon"));
|
||||
add_child(button_create);
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_CREATE));
|
||||
|
|
@ -540,6 +541,7 @@ Polygon3DEditor::Polygon3DEditor() {
|
|||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_edit->set_accessibility_name(TTRC("Edit Polygon"));
|
||||
button_edit->set_tooltip_text(TTRC("Edit Polygon"));
|
||||
add_child(button_edit);
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_EDIT));
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ void ResourcePreloaderEditor::edit(ResourcePreloader *p_preloader) {
|
|||
}
|
||||
|
||||
Variant ResourcePreloaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
||||
TreeItem *ti = tree->get_item_at_position(p_point);
|
||||
TreeItem *ti = (p_point == Vector2(INFINITY, INFINITY)) ? tree->get_selected() : tree->get_item_at_position(p_point);
|
||||
if (!ti) {
|
||||
return Variant();
|
||||
}
|
||||
|
|
@ -356,6 +356,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
|
|||
vbc->add_child(hbc);
|
||||
|
||||
load = memnew(Button);
|
||||
load->set_accessibility_name(TTRC("Load Resource"));
|
||||
load->set_tooltip_text(TTR("Load Resource"));
|
||||
hbc->add_child(load);
|
||||
|
||||
|
|
|
|||
|
|
@ -196,12 +196,14 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
|
|||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
add_child(hbc);
|
||||
assign = memnew(Button);
|
||||
assign->set_accessibility_name(TTRC("Assign"));
|
||||
assign->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
assign->set_clip_text(true);
|
||||
assign->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyRootMotion::_node_assign));
|
||||
hbc->add_child(assign);
|
||||
|
||||
clear = memnew(Button);
|
||||
clear->set_accessibility_name(TTRC("Clear"));
|
||||
clear->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyRootMotion::_node_clear));
|
||||
hbc->add_child(clear);
|
||||
|
||||
|
|
|
|||
|
|
@ -3272,7 +3272,15 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
|
|||
if (se || eh) {
|
||||
int new_index = 0;
|
||||
if (script_list->get_item_count() > 0) {
|
||||
new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point));
|
||||
int pos = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (script_list->is_anything_selected()) {
|
||||
pos = script_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
pos = script_list->get_item_at_position(p_point);
|
||||
}
|
||||
new_index = script_list->get_item_metadata(pos);
|
||||
}
|
||||
tab_container->move_child(node, new_index);
|
||||
tab_container->set_current_tab(new_index);
|
||||
|
|
@ -3292,7 +3300,15 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
|
|||
if (se || eh) {
|
||||
int new_index = 0;
|
||||
if (script_list->get_item_count() > 0) {
|
||||
new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point));
|
||||
int pos = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (script_list->is_anything_selected()) {
|
||||
pos = script_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
pos = script_list->get_item_at_position(p_point);
|
||||
}
|
||||
new_index = script_list->get_item_metadata(pos);
|
||||
}
|
||||
tab_container->move_child(node, new_index);
|
||||
tab_container->set_current_tab(new_index);
|
||||
|
|
@ -3305,7 +3321,15 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
|
|||
|
||||
int new_index = 0;
|
||||
if (script_list->get_item_count() > 0) {
|
||||
new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point));
|
||||
int pos = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (script_list->is_anything_selected()) {
|
||||
pos = script_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
pos = script_list->get_item_at_position(p_point);
|
||||
}
|
||||
new_index = script_list->get_item_metadata(pos);
|
||||
}
|
||||
int num_tabs_before = tab_container->get_tab_count();
|
||||
for (int i = 0; i < files.size(); i++) {
|
||||
|
|
@ -4172,6 +4196,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
|
||||
filter_scripts = memnew(LineEdit);
|
||||
filter_scripts->set_placeholder(TTR("Filter Scripts"));
|
||||
filter_scripts->set_accessibility_name(TTRC("Filter Scripts"));
|
||||
filter_scripts->set_clear_button_enabled(true);
|
||||
filter_scripts->connect(SceneStringName(text_changed), callable_mp(this, &ScriptEditor::_filter_scripts_text_changed));
|
||||
scripts_vbox->add_child(filter_scripts);
|
||||
|
|
@ -4211,6 +4236,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
|
||||
members_overview_alphabeta_sort_button = memnew(Button);
|
||||
members_overview_alphabeta_sort_button->set_flat(true);
|
||||
members_overview_alphabeta_sort_button->set_accessibility_name(TTRC("Alphabetical Sorting"));
|
||||
members_overview_alphabeta_sort_button->set_tooltip_text(TTR("Toggle alphabetical sorting of the method list."));
|
||||
members_overview_alphabeta_sort_button->set_toggle_mode(true);
|
||||
members_overview_alphabeta_sort_button->set_pressed(EDITOR_GET("text_editor/script_list/sort_members_outline_alphabetically"));
|
||||
|
|
@ -4220,6 +4246,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
|
||||
filter_methods = memnew(LineEdit);
|
||||
filter_methods->set_placeholder(TTR("Filter Methods"));
|
||||
filter_methods->set_accessibility_name(TTRC("Filter Methods"));
|
||||
filter_methods->set_clear_button_enabled(true);
|
||||
filter_methods->connect(SceneStringName(text_changed), callable_mp(this, &ScriptEditor::_filter_methods_text_changed));
|
||||
overview_vbox->add_child(filter_methods);
|
||||
|
|
@ -4366,6 +4393,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
menu_hb->add_spacer();
|
||||
|
||||
site_search = memnew(Button);
|
||||
site_search->set_accessibility_name(TTRC("Site Search"));
|
||||
site_search->set_flat(true);
|
||||
site_search->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_menu_option).bind(SEARCH_WEBSITE));
|
||||
menu_hb->add_child(site_search);
|
||||
|
|
@ -4380,6 +4408,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
menu_hb->add_child(memnew(VSeparator));
|
||||
|
||||
script_back = memnew(Button);
|
||||
script_back->set_accessibility_name(TTRC("Previous"));
|
||||
script_back->set_flat(true);
|
||||
script_back->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_back));
|
||||
menu_hb->add_child(script_back);
|
||||
|
|
@ -4387,6 +4416,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
|
|||
script_back->set_tooltip_text(TTR("Go to previous edited document."));
|
||||
|
||||
script_forward = memnew(Button);
|
||||
script_forward->set_accessibility_name(TTRC("Next"));
|
||||
script_forward->set_flat(true);
|
||||
script_forward->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditor::_history_forward));
|
||||
menu_hb->add_child(script_forward);
|
||||
|
|
|
|||
|
|
@ -1958,7 +1958,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
|
|||
Dictionary d = p_data;
|
||||
|
||||
CodeEdit *te = code_editor->get_text_editor();
|
||||
Point2i pos = te->get_line_column_at_pos(p_point);
|
||||
Point2i pos = (p_point == Vector2(INFINITY, INFINITY)) ? Point2i(te->get_caret_line(0), te->get_caret_column(0)) : te->get_line_column_at_pos(p_point);
|
||||
int drop_at_line = pos.y;
|
||||
int drop_at_column = pos.x;
|
||||
int selection_index = te->get_selection_at_line_column(drop_at_line, drop_at_column);
|
||||
|
|
|
|||
|
|
@ -641,7 +641,14 @@ Variant ShaderEditorPlugin::get_drag_data_fw(const Point2 &p_point, Control *p_f
|
|||
return Variant();
|
||||
}
|
||||
|
||||
int idx = shader_list->get_item_at_position(p_point);
|
||||
int idx = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (shader_list->is_anything_selected()) {
|
||||
idx = shader_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
idx = shader_list->get_item_at_position(p_point);
|
||||
}
|
||||
if (idx < 0) {
|
||||
return Variant();
|
||||
}
|
||||
|
|
@ -718,7 +725,14 @@ void ShaderEditorPlugin::drop_data_fw(const Point2 &p_point, const Variant &p_da
|
|||
|
||||
if (String(d["type"]) == "shader_list_element") {
|
||||
int idx = d["shader_list_element"];
|
||||
int new_idx = shader_list->get_item_at_position(p_point);
|
||||
int new_idx = 0;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (shader_list->is_anything_selected()) {
|
||||
new_idx = shader_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
new_idx = shader_list->get_item_at_position(p_point);
|
||||
}
|
||||
_move_shader_tab(idx, new_idx);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -701,7 +701,7 @@ Variant Skeleton3DEditor::get_drag_data_fw(const Point2 &p_point, Control *p_fro
|
|||
}
|
||||
|
||||
bool Skeleton3DEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
|
||||
TreeItem *target = joint_tree->get_item_at_position(p_point);
|
||||
TreeItem *target = (p_point == Vector2(INFINITY, INFINITY)) ? joint_tree->get_selected() : joint_tree->get_item_at_position(p_point);
|
||||
if (!target) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -729,7 +729,7 @@ void Skeleton3DEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
|
|||
return;
|
||||
}
|
||||
|
||||
TreeItem *target = joint_tree->get_item_at_position(p_point);
|
||||
TreeItem *target = (p_point == Vector2(INFINITY, INFINITY)) ? joint_tree->get_selected() : joint_tree->get_item_at_position(p_point);
|
||||
TreeItem *selected = Object::cast_to<TreeItem>(Dictionary(p_data)["node"]);
|
||||
|
||||
const BoneId target_boneidx = String(target->get_metadata(0)).get_slicec('/', 1).to_int();
|
||||
|
|
@ -1026,6 +1026,7 @@ void Skeleton3DEditor::create_editors() {
|
|||
edit_mode_button->set_toggle_mode(true);
|
||||
edit_mode_button->set_focus_mode(FOCUS_NONE);
|
||||
edit_mode_button->set_tooltip_text(TTR("Edit Mode\nShow buttons on joints."));
|
||||
edit_mode_button->set_accessibility_name(TTRC("Edit Mode"));
|
||||
edit_mode_button->connect(SceneStringName(toggled), callable_mp(this, &Skeleton3DEditor::edit_mode_toggled));
|
||||
|
||||
edit_mode = false;
|
||||
|
|
@ -1047,6 +1048,7 @@ void Skeleton3DEditor::create_editors() {
|
|||
key_loc_button->set_pressed(false);
|
||||
key_loc_button->set_focus_mode(FOCUS_NONE);
|
||||
key_loc_button->set_tooltip_text(TTR("Translation mask for inserting keys."));
|
||||
key_loc_button->set_accessibility_name(TTRC("Translation Mask"));
|
||||
animation_hb->add_child(key_loc_button);
|
||||
|
||||
key_rot_button = memnew(Button);
|
||||
|
|
@ -1055,6 +1057,7 @@ void Skeleton3DEditor::create_editors() {
|
|||
key_rot_button->set_pressed(true);
|
||||
key_rot_button->set_focus_mode(FOCUS_NONE);
|
||||
key_rot_button->set_tooltip_text(TTR("Rotation mask for inserting keys."));
|
||||
key_rot_button->set_accessibility_name(TTRC("Rotation Mask"));
|
||||
animation_hb->add_child(key_rot_button);
|
||||
|
||||
key_scale_button = memnew(Button);
|
||||
|
|
@ -1063,6 +1066,7 @@ void Skeleton3DEditor::create_editors() {
|
|||
key_scale_button->set_pressed(false);
|
||||
key_scale_button->set_focus_mode(FOCUS_NONE);
|
||||
key_scale_button->set_tooltip_text(TTR("Scale mask for inserting keys."));
|
||||
key_scale_button->set_accessibility_name(TTRC("Scale Mask"));
|
||||
animation_hb->add_child(key_scale_button);
|
||||
|
||||
key_insert_button = memnew(Button);
|
||||
|
|
@ -1071,6 +1075,7 @@ void Skeleton3DEditor::create_editors() {
|
|||
key_insert_button->connect(SceneStringName(pressed), callable_mp(this, &Skeleton3DEditor::insert_keys).bind(false));
|
||||
key_insert_button->set_tooltip_text(TTRC("Insert key (based on mask) for bones with an existing track."));
|
||||
key_insert_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_to_existing_tracks", TTRC("Insert Key (Existing Tracks)"), Key::INSERT));
|
||||
key_insert_button->set_accessibility_name(TTRC("Insert Key"));
|
||||
animation_hb->add_child(key_insert_button);
|
||||
|
||||
key_insert_all_button = memnew(Button);
|
||||
|
|
@ -1078,6 +1083,7 @@ void Skeleton3DEditor::create_editors() {
|
|||
key_insert_all_button->set_focus_mode(FOCUS_NONE);
|
||||
key_insert_all_button->connect(SceneStringName(pressed), callable_mp(this, &Skeleton3DEditor::insert_keys).bind(true));
|
||||
key_insert_all_button->set_tooltip_text(TTRC("Insert key (based on mask) for all bones."));
|
||||
key_insert_all_button->set_accessibility_name(TTRC("Insert Key for All Bones"));
|
||||
key_insert_all_button->set_shortcut(ED_SHORTCUT("skeleton_3d_editor/insert_key_of_all_bones", TTRC("Insert Key (All Bones)"), KeyModifierMask::CMD_OR_CTRL + Key::INSERT));
|
||||
animation_hb->add_child(key_insert_all_button);
|
||||
|
||||
|
|
|
|||
|
|
@ -633,6 +633,7 @@ Sprite2DEditor::Sprite2DEditor() {
|
|||
simplification->set_max(10.00);
|
||||
simplification->set_step(0.01);
|
||||
simplification->set_value(2);
|
||||
simplification->set_accessibility_name(TTRC("Simplification"));
|
||||
hb->add_child(simplification);
|
||||
hb->add_spacer();
|
||||
hb->add_child(memnew(Label(TTR("Shrink (Pixels):"))));
|
||||
|
|
@ -641,6 +642,7 @@ Sprite2DEditor::Sprite2DEditor() {
|
|||
shrink_pixels->set_max(10);
|
||||
shrink_pixels->set_step(1);
|
||||
shrink_pixels->set_value(0);
|
||||
shrink_pixels->set_accessibility_name(TTRC("Shrink"));
|
||||
hb->add_child(shrink_pixels);
|
||||
hb->add_spacer();
|
||||
hb->add_child(memnew(Label(TTR("Grow (Pixels):"))));
|
||||
|
|
@ -649,6 +651,7 @@ Sprite2DEditor::Sprite2DEditor() {
|
|||
grow_pixels->set_max(10);
|
||||
grow_pixels->set_step(1);
|
||||
grow_pixels->set_value(2);
|
||||
grow_pixels->set_accessibility_name(TTRC("Grow"));
|
||||
hb->add_child(grow_pixels);
|
||||
hb->add_spacer();
|
||||
update_preview = memnew(Button);
|
||||
|
|
|
|||
|
|
@ -1653,7 +1653,14 @@ Variant SpriteFramesEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
|
|||
return false;
|
||||
}
|
||||
|
||||
int idx = frame_list->get_item_at_position(p_point, true);
|
||||
int idx = -1;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (frame_list->is_anything_selected()) {
|
||||
idx = frame_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
idx = frame_list->get_item_at_position(p_point, true);
|
||||
}
|
||||
|
||||
if (idx < 0 || idx >= frames->get_frame_count(edited_anim)) {
|
||||
return Variant();
|
||||
|
|
@ -1728,7 +1735,14 @@ void SpriteFramesEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
|
|||
return;
|
||||
}
|
||||
|
||||
int at_pos = frame_list->get_item_at_position(p_point, true);
|
||||
int at_pos = -1;
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
if (frame_list->is_anything_selected()) {
|
||||
at_pos = frame_list->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
at_pos = frame_list->get_item_at_position(p_point, true);
|
||||
}
|
||||
|
||||
if (String(d["type"]) == "resource" && d.has("resource")) {
|
||||
Ref<Resource> r = d["resource"];
|
||||
|
|
@ -1946,16 +1960,19 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
|
||||
add_anim = memnew(Button);
|
||||
add_anim->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
add_anim->set_accessibility_name(TTRC("Add Animation"));
|
||||
hbc_animlist->add_child(add_anim);
|
||||
add_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_add));
|
||||
|
||||
duplicate_anim = memnew(Button);
|
||||
duplicate_anim->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
duplicate_anim->set_accessibility_name(TTRC("Duplicate Animation"));
|
||||
hbc_animlist->add_child(duplicate_anim);
|
||||
duplicate_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_duplicate));
|
||||
|
||||
delete_anim = memnew(Button);
|
||||
delete_anim->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
delete_anim->set_accessibility_name(TTRC("Delete Animation"));
|
||||
hbc_animlist->add_child(delete_anim);
|
||||
delete_anim->set_disabled(true);
|
||||
delete_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_remove));
|
||||
|
|
@ -1967,6 +1984,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
autoplay->set_accessibility_name(TTRC("Autoplay on Load"));
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
autoplay_container->add_child(autoplay);
|
||||
|
||||
|
|
@ -1975,6 +1993,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
anim_loop = memnew(Button);
|
||||
anim_loop->set_toggle_mode(true);
|
||||
anim_loop->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
anim_loop->set_accessibility_name(TTRC("Animation Looping"));
|
||||
anim_loop->set_tooltip_text(TTR("Animation Looping"));
|
||||
anim_loop->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_loop_changed));
|
||||
hbc_animlist->add_child(anim_loop);
|
||||
|
|
@ -1986,6 +2005,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
anim_speed->set_step(0.01);
|
||||
anim_speed->set_custom_arrow_step(1);
|
||||
anim_speed->set_tooltip_text(TTR("Animation Speed"));
|
||||
anim_speed->set_accessibility_name(TTRC("Animation Speed"));
|
||||
anim_speed->get_line_edit()->set_expand_to_text_length_enabled(true);
|
||||
anim_speed->get_line_edit()->connect(SceneStringName(resized), callable_mp(this, &SpriteFramesEditor::_animation_speed_resized));
|
||||
anim_speed->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_animation_speed_changed));
|
||||
|
|
@ -1995,6 +2015,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
sub_vb->add_child(anim_search_box);
|
||||
anim_search_box->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
anim_search_box->set_placeholder(TTR("Filter Animations"));
|
||||
anim_search_box->set_accessibility_name(TTRC("Filter Animations"));
|
||||
anim_search_box->set_clear_button_enabled(true);
|
||||
anim_search_box->connect(SceneStringName(text_changed), callable_mp(this, &SpriteFramesEditor::_animation_search_text_changed));
|
||||
|
||||
|
|
@ -2042,26 +2063,31 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
play_bw_from = memnew(Button);
|
||||
play_bw_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw_from->set_tooltip_text(TTR("Play selected animation backwards from current pos. (A)"));
|
||||
play_bw_from->set_accessibility_name(TTRC("Play Backwards"));
|
||||
playback_container->add_child(play_bw_from);
|
||||
|
||||
play_bw = memnew(Button);
|
||||
play_bw->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw->set_tooltip_text(TTR("Play selected animation backwards from end. (Shift+A)"));
|
||||
play_bw->set_accessibility_name(TTRC("Play Backwards from End"));
|
||||
playback_container->add_child(play_bw);
|
||||
|
||||
stop = memnew(Button);
|
||||
stop->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
stop->set_tooltip_text(TTR("Pause/stop animation playback. (S)"));
|
||||
stop->set_accessibility_name(TTRC("Pause/Stop"));
|
||||
playback_container->add_child(stop);
|
||||
|
||||
play = memnew(Button);
|
||||
play->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play->set_tooltip_text(TTR("Play selected animation from start. (Shift+D)"));
|
||||
play->set_accessibility_name(TTRC("Play from Start"));
|
||||
playback_container->add_child(play);
|
||||
|
||||
play_from = memnew(Button);
|
||||
play_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_from->set_tooltip_text(TTR("Play selected animation from current pos. (D)"));
|
||||
play_from->set_accessibility_name(TTRC("Play"));
|
||||
playback_container->add_child(play_from);
|
||||
|
||||
hfc->add_child(memnew(VSeparator));
|
||||
|
|
@ -2078,44 +2104,53 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
hfc->add_child(hbc_actions);
|
||||
|
||||
load = memnew(Button);
|
||||
load->set_accessibility_name(TTRC("Load"));
|
||||
load->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(load);
|
||||
|
||||
load_sheet = memnew(Button);
|
||||
load_sheet->set_accessibility_name(TTRC("Load Sheet"));
|
||||
load_sheet->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(load_sheet);
|
||||
|
||||
hbc_actions->add_child(memnew(VSeparator));
|
||||
|
||||
copy = memnew(Button);
|
||||
copy->set_accessibility_name(TTRC("Copy"));
|
||||
copy->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(copy);
|
||||
|
||||
paste = memnew(Button);
|
||||
paste->set_accessibility_name(TTRC("Paste"));
|
||||
paste->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(paste);
|
||||
|
||||
hbc_actions->add_child(memnew(VSeparator));
|
||||
|
||||
empty_before = memnew(Button);
|
||||
empty_before->set_accessibility_name(TTRC("Empty Before"));
|
||||
empty_before->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(empty_before);
|
||||
|
||||
empty_after = memnew(Button);
|
||||
empty_after->set_accessibility_name(TTRC("Empty After"));
|
||||
empty_after->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(empty_after);
|
||||
|
||||
hbc_actions->add_child(memnew(VSeparator));
|
||||
|
||||
move_up = memnew(Button);
|
||||
move_up->set_accessibility_name(TTRC("Move Up"));
|
||||
move_up->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(move_up);
|
||||
|
||||
move_down = memnew(Button);
|
||||
move_down->set_accessibility_name(TTRC("Move Down"));
|
||||
move_down->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(move_down);
|
||||
|
||||
delete_frame = memnew(Button);
|
||||
delete_frame->set_accessibility_name(TTRC("Delete Frame"));
|
||||
delete_frame->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(delete_frame);
|
||||
|
||||
|
|
@ -2137,6 +2172,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
frame_duration->set_allow_lesser(false);
|
||||
frame_duration->set_allow_greater(true);
|
||||
frame_duration->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_frame_duration_changed));
|
||||
frame_duration->set_accessibility_name(TTRC("Frame Duration"));
|
||||
hbc_frame_duration->add_child(frame_duration);
|
||||
|
||||
// Wide empty separation control. (like BoxContainer::add_spacer())
|
||||
|
|
@ -2152,18 +2188,21 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
zoom_out->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_zoom_out));
|
||||
zoom_out->set_flat(true);
|
||||
zoom_out->set_tooltip_text(TTRC("Zoom Out"));
|
||||
zoom_out->set_accessibility_name(TTRC("Zoom Out"));
|
||||
hbc_zoom->add_child(zoom_out);
|
||||
|
||||
zoom_reset = memnew(Button);
|
||||
zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_zoom_reset));
|
||||
zoom_reset->set_flat(true);
|
||||
zoom_reset->set_tooltip_text(TTRC("Zoom Reset"));
|
||||
zoom_reset->set_accessibility_name(TTRC("Reset Zoom"));
|
||||
hbc_zoom->add_child(zoom_reset);
|
||||
|
||||
zoom_in = memnew(Button);
|
||||
zoom_in->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_zoom_in));
|
||||
zoom_in->set_flat(true);
|
||||
zoom_in->set_tooltip_text(TTRC("Zoom In"));
|
||||
zoom_in->set_accessibility_name(TTRC("Zoom In"));
|
||||
hbc_zoom->add_child(zoom_in);
|
||||
|
||||
file = memnew(EditorFileDialog);
|
||||
|
|
@ -2286,6 +2325,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
toggle_settings_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
toggle_settings_button->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_toggle_show_settings));
|
||||
toggle_settings_button->set_tooltip_text(TTR("Toggle Settings Panel"));
|
||||
toggle_settings_button->set_accessibility_name(TTRC("Settings Panel"));
|
||||
split_sheet_menu_hb->add_child(toggle_settings_button);
|
||||
|
||||
split_sheet_vb->add_child(split_sheet_menu_hb);
|
||||
|
|
@ -2324,6 +2364,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_zoom_out->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
split_sheet_zoom_out->set_focus_mode(FOCUS_NONE);
|
||||
split_sheet_zoom_out->set_tooltip_text(TTR("Zoom Out"));
|
||||
split_sheet_zoom_out->set_accessibility_name(TTRC("Zoom Out"));
|
||||
split_sheet_zoom_out->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_out));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_out);
|
||||
|
||||
|
|
@ -2331,6 +2372,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_zoom_reset->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
split_sheet_zoom_reset->set_focus_mode(FOCUS_NONE);
|
||||
split_sheet_zoom_reset->set_tooltip_text(TTR("Zoom Reset"));
|
||||
split_sheet_zoom_reset->set_accessibility_name(TTRC("Reset Zoom"));
|
||||
split_sheet_zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_reset));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_reset);
|
||||
|
||||
|
|
@ -2338,6 +2380,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_zoom_in->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
split_sheet_zoom_in->set_focus_mode(FOCUS_NONE);
|
||||
split_sheet_zoom_in->set_tooltip_text(TTR("Zoom In"));
|
||||
split_sheet_zoom_in->set_accessibility_name(TTRC("Zoom In"));
|
||||
split_sheet_zoom_in->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_in));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_in);
|
||||
|
||||
|
|
@ -2357,6 +2400,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_h->set_max(128);
|
||||
split_sheet_h->set_step(1);
|
||||
split_sheet_h->set_select_all_on_focus(true);
|
||||
split_sheet_h->set_accessibility_name(TTRC("Horizontal"));
|
||||
split_sheet_h_hb->add_child(split_sheet_h);
|
||||
split_sheet_h->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_FRAME_COUNT));
|
||||
split_sheet_settings_vb->add_child(split_sheet_h_hb);
|
||||
|
|
@ -2374,6 +2418,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_v->set_max(128);
|
||||
split_sheet_v->set_step(1);
|
||||
split_sheet_v->set_select_all_on_focus(true);
|
||||
split_sheet_v->set_accessibility_name(TTRC("Vertical"));
|
||||
split_sheet_v_hb->add_child(split_sheet_v);
|
||||
split_sheet_v->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_FRAME_COUNT));
|
||||
split_sheet_settings_vb->add_child(split_sheet_v_hb);
|
||||
|
|
@ -2394,6 +2439,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_size_x->set_step(1);
|
||||
split_sheet_size_x->set_suffix("px");
|
||||
split_sheet_size_x->set_select_all_on_focus(true);
|
||||
split_sheet_size_x->set_accessibility_name(TTRC("X Size"));
|
||||
split_sheet_size_x->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_SIZE));
|
||||
split_sheet_size_vb->add_child(split_sheet_size_x);
|
||||
split_sheet_size_y = memnew(SpinBox);
|
||||
|
|
@ -2402,6 +2448,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_size_y->set_step(1);
|
||||
split_sheet_size_y->set_suffix("px");
|
||||
split_sheet_size_y->set_select_all_on_focus(true);
|
||||
split_sheet_size_y->set_accessibility_name(TTRC("Y Size"));
|
||||
split_sheet_size_y->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_SIZE));
|
||||
split_sheet_size_vb->add_child(split_sheet_size_y);
|
||||
split_sheet_size_hb->add_child(split_sheet_size_vb);
|
||||
|
|
@ -2422,6 +2469,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_sep_x->set_step(1);
|
||||
split_sheet_sep_x->set_suffix("px");
|
||||
split_sheet_sep_x->set_select_all_on_focus(true);
|
||||
split_sheet_sep_x->set_accessibility_name(TTRC("X Separation"));
|
||||
split_sheet_sep_x->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
|
||||
split_sheet_sep_vb->add_child(split_sheet_sep_x);
|
||||
split_sheet_sep_y = memnew(SpinBox);
|
||||
|
|
@ -2429,6 +2477,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_sep_y->set_step(1);
|
||||
split_sheet_sep_y->set_suffix("px");
|
||||
split_sheet_sep_y->set_select_all_on_focus(true);
|
||||
split_sheet_sep_y->set_accessibility_name(TTRC("Y Separation"));
|
||||
split_sheet_sep_y->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
|
||||
split_sheet_sep_vb->add_child(split_sheet_sep_y);
|
||||
split_sheet_sep_hb->add_child(split_sheet_sep_vb);
|
||||
|
|
@ -2449,6 +2498,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_offset_x->set_step(1);
|
||||
split_sheet_offset_x->set_suffix("px");
|
||||
split_sheet_offset_x->set_select_all_on_focus(true);
|
||||
split_sheet_offset_x->set_accessibility_name(TTRC("X Offset"));
|
||||
split_sheet_offset_x->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
|
||||
split_sheet_offset_vb->add_child(split_sheet_offset_x);
|
||||
split_sheet_offset_y = memnew(SpinBox);
|
||||
|
|
@ -2456,6 +2506,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
|||
split_sheet_offset_y->set_step(1);
|
||||
split_sheet_offset_y->set_suffix("px");
|
||||
split_sheet_offset_y->set_select_all_on_focus(true);
|
||||
split_sheet_offset_y->set_accessibility_name(TTRC("Y Offset"));
|
||||
split_sheet_offset_y->connect(SceneStringName(value_changed), callable_mp(this, &SpriteFramesEditor::_sheet_spin_changed).bind(PARAM_USE_CURRENT));
|
||||
split_sheet_offset_vb->add_child(split_sheet_offset_y);
|
||||
split_sheet_offset_hb->add_child(split_sheet_offset_vb);
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ StyleBoxPreview::StyleBoxPreview() {
|
|||
// This theme variation works better than the normal theme because there's no focus highlight.
|
||||
grid_preview->set_theme_type_variation("PreviewLightButton");
|
||||
grid_preview->set_tooltip_text(TTRC("Toggle margins preview grid."));
|
||||
grid_preview->set_accessibility_name(TTRC("Margins Preview Grid"));
|
||||
grid_preview->set_toggle_mode(true);
|
||||
grid_preview->connect(SceneStringName(toggled), callable_mp(this, &StyleBoxPreview::_grid_preview_toggled));
|
||||
grid_preview->set_pressed(grid_preview_enabled);
|
||||
|
|
|
|||
|
|
@ -1154,6 +1154,7 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
|
||||
snap_mode_button = memnew(OptionButton);
|
||||
hb_tools->add_child(snap_mode_button);
|
||||
snap_mode_button->set_accessibility_name(TTRC("Snap Mode"));
|
||||
snap_mode_button->add_item(TTR("None"), 0);
|
||||
snap_mode_button->add_item(TTR("Pixel Snap"), 1);
|
||||
snap_mode_button->add_item(TTR("Grid Snap"), 2);
|
||||
|
|
@ -1171,12 +1172,14 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
sb_off_x->set_step(1);
|
||||
sb_off_x->set_suffix("px");
|
||||
sb_off_x->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_off_x));
|
||||
sb_off_x->set_accessibility_name(TTRC("Offset X"));
|
||||
hb_grid->add_child(sb_off_x);
|
||||
|
||||
sb_off_y = memnew(SpinBox);
|
||||
sb_off_y->set_step(1);
|
||||
sb_off_y->set_suffix("px");
|
||||
sb_off_y->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_off_y));
|
||||
sb_off_y->set_accessibility_name(TTRC("Offset Y"));
|
||||
hb_grid->add_child(sb_off_y);
|
||||
|
||||
hb_grid->add_child(memnew(VSeparator));
|
||||
|
|
@ -1187,6 +1190,7 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
sb_step_x->set_step(1);
|
||||
sb_step_x->set_suffix("px");
|
||||
sb_step_x->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_step_x));
|
||||
sb_step_x->set_accessibility_name(TTRC("Step X"));
|
||||
hb_grid->add_child(sb_step_x);
|
||||
|
||||
sb_step_y = memnew(SpinBox);
|
||||
|
|
@ -1194,6 +1198,7 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
sb_step_y->set_step(1);
|
||||
sb_step_y->set_suffix("px");
|
||||
sb_step_y->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_step_y));
|
||||
sb_step_y->set_accessibility_name(TTRC("Step Y"));
|
||||
hb_grid->add_child(sb_step_y);
|
||||
|
||||
hb_grid->add_child(memnew(VSeparator));
|
||||
|
|
@ -1204,6 +1209,7 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
sb_sep_x->set_step(1);
|
||||
sb_sep_x->set_suffix("px");
|
||||
sb_sep_x->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_sep_x));
|
||||
sb_sep_x->set_accessibility_name(TTRC("Separation X"));
|
||||
hb_grid->add_child(sb_sep_x);
|
||||
|
||||
sb_sep_y = memnew(SpinBox);
|
||||
|
|
@ -1211,6 +1217,7 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
sb_sep_y->set_step(1);
|
||||
sb_sep_y->set_suffix("px");
|
||||
sb_sep_y->connect(SceneStringName(value_changed), callable_mp(this, &TextureRegionEditor::_set_snap_sep_y));
|
||||
sb_sep_y->set_accessibility_name(TTRC("Separation Y"));
|
||||
hb_grid->add_child(sb_sep_y);
|
||||
|
||||
hb_grid->hide();
|
||||
|
|
@ -1249,18 +1256,21 @@ TextureRegionEditor::TextureRegionEditor() {
|
|||
zoom_out = memnew(Button);
|
||||
zoom_out->set_flat(true);
|
||||
zoom_out->set_tooltip_text(TTR("Zoom Out"));
|
||||
zoom_out->set_accessibility_name(TTRC("Zoom Out"));
|
||||
zoom_out->connect(SceneStringName(pressed), callable_mp(this, &TextureRegionEditor::_zoom_out));
|
||||
zoom_hb->add_child(zoom_out);
|
||||
|
||||
zoom_reset = memnew(Button);
|
||||
zoom_reset->set_flat(true);
|
||||
zoom_reset->set_tooltip_text(TTR("Zoom Reset"));
|
||||
zoom_reset->set_accessibility_name(TTRC("Reset Zoom"));
|
||||
zoom_reset->connect(SceneStringName(pressed), callable_mp(this, &TextureRegionEditor::_zoom_reset));
|
||||
zoom_hb->add_child(zoom_reset);
|
||||
|
||||
zoom_in = memnew(Button);
|
||||
zoom_in->set_flat(true);
|
||||
zoom_in->set_tooltip_text(TTR("Zoom In"));
|
||||
zoom_in->set_accessibility_name(TTRC("Zoom In"));
|
||||
zoom_in->connect(SceneStringName(pressed), callable_mp(this, &TextureRegionEditor::_zoom_in));
|
||||
zoom_hb->add_child(zoom_in);
|
||||
|
||||
|
|
|
|||
|
|
@ -1957,6 +1957,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_add_color = memnew(Button);
|
||||
edit_items_add_color->set_tooltip_text(TTR("Add Color Item"));
|
||||
edit_items_add_color->set_accessibility_name(TTRC("Add Color Item"));
|
||||
edit_items_add_color->set_flat(true);
|
||||
edit_items_add_color->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_color);
|
||||
|
|
@ -1964,6 +1965,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_add_constant = memnew(Button);
|
||||
edit_items_add_constant->set_tooltip_text(TTR("Add Constant Item"));
|
||||
edit_items_add_constant->set_accessibility_name(TTRC("Add Constant Item"));
|
||||
edit_items_add_constant->set_flat(true);
|
||||
edit_items_add_constant->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_constant);
|
||||
|
|
@ -1971,6 +1973,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_add_font = memnew(Button);
|
||||
edit_items_add_font->set_tooltip_text(TTR("Add Font Item"));
|
||||
edit_items_add_font->set_accessibility_name(TTRC("Add Font Item"));
|
||||
edit_items_add_font->set_flat(true);
|
||||
edit_items_add_font->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_font);
|
||||
|
|
@ -1978,6 +1981,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_add_font_size = memnew(Button);
|
||||
edit_items_add_font_size->set_tooltip_text(TTR("Add Font Size Item"));
|
||||
edit_items_add_font_size->set_accessibility_name(TTRC("Add Font Size Item"));
|
||||
edit_items_add_font_size->set_flat(true);
|
||||
edit_items_add_font_size->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_font_size);
|
||||
|
|
@ -1985,6 +1989,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_add_icon = memnew(Button);
|
||||
edit_items_add_icon->set_tooltip_text(TTR("Add Icon Item"));
|
||||
edit_items_add_icon->set_accessibility_name(TTRC("Add Icon Item"));
|
||||
edit_items_add_icon->set_flat(true);
|
||||
edit_items_add_icon->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_icon);
|
||||
|
|
@ -1992,6 +1997,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_add_stylebox = memnew(Button);
|
||||
edit_items_add_stylebox->set_tooltip_text(TTR("Add StyleBox Item"));
|
||||
edit_items_add_stylebox->set_accessibility_name(TTRC("Add StyleBox Item"));
|
||||
edit_items_add_stylebox->set_flat(true);
|
||||
edit_items_add_stylebox->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_add_stylebox);
|
||||
|
|
@ -2005,6 +2011,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_remove_class = memnew(Button);
|
||||
edit_items_remove_class->set_tooltip_text(TTR("Remove Class Items"));
|
||||
edit_items_remove_class->set_accessibility_name(TTRC("Remove Class Items"));
|
||||
edit_items_remove_class->set_flat(true);
|
||||
edit_items_remove_class->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_remove_class);
|
||||
|
|
@ -2012,6 +2019,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_remove_custom = memnew(Button);
|
||||
edit_items_remove_custom->set_tooltip_text(TTR("Remove Custom Items"));
|
||||
edit_items_remove_custom->set_accessibility_name(TTRC("Remove Custom Items"));
|
||||
edit_items_remove_custom->set_flat(true);
|
||||
edit_items_remove_custom->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_remove_custom);
|
||||
|
|
@ -2019,6 +2027,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
|
|||
|
||||
edit_items_remove_all = memnew(Button);
|
||||
edit_items_remove_all->set_tooltip_text(TTR("Remove All Items"));
|
||||
edit_items_remove_all->set_accessibility_name(TTRC("Remove All Items"));
|
||||
edit_items_remove_all->set_flat(true);
|
||||
edit_items_remove_all->set_disabled(true);
|
||||
edit_items_toolbar->add_child(edit_items_remove_all);
|
||||
|
|
@ -2473,6 +2482,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
|||
Button *item_rename_button = memnew(Button);
|
||||
item_rename_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
|
||||
item_rename_button->set_tooltip_text(TTR("Rename Item"));
|
||||
item_rename_button->set_accessibility_name(TTRC("Rename Item"));
|
||||
item_rename_button->set_flat(true);
|
||||
item_name_container->add_child(item_rename_button);
|
||||
item_rename_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_cbk).bind(p_data_type, p_item_name, item_name_container));
|
||||
|
|
@ -2480,6 +2490,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
|||
Button *item_remove_button = memnew(Button);
|
||||
item_remove_button->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
|
||||
item_remove_button->set_tooltip_text(TTR("Remove Item"));
|
||||
item_remove_button->set_accessibility_name(TTRC("Remove Item"));
|
||||
item_remove_button->set_flat(true);
|
||||
item_name_container->add_child(item_remove_button);
|
||||
item_remove_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_remove_cbk).bind(p_data_type, p_item_name));
|
||||
|
|
@ -2487,6 +2498,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
|||
Button *item_rename_confirm_button = memnew(Button);
|
||||
item_rename_confirm_button->set_button_icon(get_editor_theme_icon(SNAME("ImportCheck")));
|
||||
item_rename_confirm_button->set_tooltip_text(TTR("Confirm Item Rename"));
|
||||
item_rename_confirm_button->set_accessibility_name(TTRC("Confirm Item Rename"));
|
||||
item_rename_confirm_button->set_flat(true);
|
||||
item_name_container->add_child(item_rename_confirm_button);
|
||||
item_rename_confirm_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_confirmed).bind(p_data_type, p_item_name, item_name_container));
|
||||
|
|
@ -2495,6 +2507,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
|||
Button *item_rename_cancel_button = memnew(Button);
|
||||
item_rename_cancel_button->set_button_icon(get_editor_theme_icon(SNAME("ImportFail")));
|
||||
item_rename_cancel_button->set_tooltip_text(TTR("Cancel Item Rename"));
|
||||
item_rename_cancel_button->set_accessibility_name(TTRC("Cancel Item Rename"));
|
||||
item_rename_cancel_button->set_flat(true);
|
||||
item_name_container->add_child(item_rename_cancel_button);
|
||||
item_rename_cancel_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_canceled).bind(p_data_type, p_item_name, item_name_container));
|
||||
|
|
@ -2505,6 +2518,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
|
|||
Button *item_override_button = memnew(Button);
|
||||
item_override_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
|
||||
item_override_button->set_tooltip_text(TTR("Override Item"));
|
||||
item_override_button->set_accessibility_name(TTRC("Override Item"));
|
||||
item_override_button->set_flat(true);
|
||||
item_name_container->add_child(item_override_button);
|
||||
item_override_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_override_cbk).bind(p_data_type, p_item_name));
|
||||
|
|
@ -2714,6 +2728,7 @@ void ThemeTypeEditor::_update_type_items() {
|
|||
pin_leader_button->set_pressed(true);
|
||||
pin_leader_button->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
|
||||
pin_leader_button->set_tooltip_text(TTR("Unpin this StyleBox as a main style."));
|
||||
pin_leader_button->set_accessibility_name(TTRC("Unpin StyleBox"));
|
||||
item_control->add_child(pin_leader_button);
|
||||
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_unpin_leader_button_pressed));
|
||||
|
||||
|
|
@ -2757,6 +2772,7 @@ void ThemeTypeEditor::_update_type_items() {
|
|||
pin_leader_button->set_toggle_mode(true);
|
||||
pin_leader_button->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
|
||||
pin_leader_button->set_tooltip_text(TTR("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type."));
|
||||
pin_leader_button->set_accessibility_name(TTRC("Pin StyleBox as a Main Style"));
|
||||
item_control->add_child(pin_leader_button);
|
||||
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
|
||||
} else {
|
||||
|
|
@ -3443,11 +3459,13 @@ ThemeTypeEditor::ThemeTypeEditor() {
|
|||
theme_type_list->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
theme_type_list->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
theme_type_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
theme_type_list->set_accessibility_name(TTRC("Type"));
|
||||
type_list_hb->add_child(theme_type_list);
|
||||
theme_type_list->connect(SceneStringName(item_selected), callable_mp(this, &ThemeTypeEditor::_list_type_selected));
|
||||
|
||||
add_type_button = memnew(Button);
|
||||
add_type_button->set_tooltip_text(TTR("Add a type from a list of available types or create a new one."));
|
||||
add_type_button->set_accessibility_name(TTRC("Add Type"));
|
||||
type_list_hb->add_child(add_type_button);
|
||||
add_type_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_type_button_cbk));
|
||||
|
||||
|
|
@ -3510,9 +3528,11 @@ ThemeTypeEditor::ThemeTypeEditor() {
|
|||
type_variation_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
type_variation_edit->connect(SceneStringName(text_changed), callable_mp(this, &ThemeTypeEditor::_type_variation_changed));
|
||||
type_variation_edit->connect(SceneStringName(focus_exited), callable_mp(this, &ThemeTypeEditor::_update_type_items));
|
||||
type_variation_edit->set_accessibility_name(TTRC("Base Type"));
|
||||
type_variation_button = memnew(Button);
|
||||
type_variation_hb->add_child(type_variation_button);
|
||||
type_variation_button->set_tooltip_text(TTR("Select the variation base type from a list of available types."));
|
||||
type_variation_button->set_accessibility_name(TTRC("Select Base Type"));
|
||||
type_variation_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_add_type_variation_cbk));
|
||||
|
||||
type_variation_locked = memnew(Label);
|
||||
|
|
|
|||
|
|
@ -650,6 +650,7 @@ TileAtlasView::TileAtlasView() {
|
|||
button_center_view->set_flat(true);
|
||||
button_center_view->set_disabled(true);
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
button_center_view->set_accessibility_name(TTRC("Center View"));
|
||||
add_child(button_center_view);
|
||||
|
||||
panner.instantiate();
|
||||
|
|
|
|||
|
|
@ -924,6 +924,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
button_expand->set_toggle_mode(true);
|
||||
button_expand->set_pressed(false);
|
||||
button_expand->set_tooltip_text(TTR("Expand editor"));
|
||||
button_expand->set_accessibility_name(TTRC("Expand editor"));
|
||||
button_expand->connect(SceneStringName(toggled), callable_mp(this, &GenericTilePolygonEditor::_toggle_expand));
|
||||
toolbar->add_child(button_expand);
|
||||
|
||||
|
|
@ -935,6 +936,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
button_create->set_button_group(tools_button_group);
|
||||
button_create->set_pressed(true);
|
||||
button_create->set_tooltip_text(TTR("Add polygon tool"));
|
||||
button_create->set_accessibility_name(TTRC("Add Points"));
|
||||
toolbar->add_child(button_create);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
|
|
@ -942,6 +944,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
button_edit->set_toggle_mode(true);
|
||||
button_edit->set_button_group(tools_button_group);
|
||||
button_edit->set_tooltip_text(TTR("Edit points tool"));
|
||||
button_edit->set_accessibility_name(TTRC("Edit Points"));
|
||||
toolbar->add_child(button_edit);
|
||||
|
||||
button_delete = memnew(Button);
|
||||
|
|
@ -949,10 +952,12 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
button_delete->set_toggle_mode(true);
|
||||
button_delete->set_button_group(tools_button_group);
|
||||
button_delete->set_tooltip_text(TTR("Delete points tool"));
|
||||
button_delete->set_accessibility_name(TTRC("Delete Points"));
|
||||
toolbar->add_child(button_delete);
|
||||
|
||||
button_advanced_menu = memnew(MenuButton);
|
||||
button_advanced_menu->set_flat(false);
|
||||
button_advanced_menu->set_accessibility_name(TTRC("Advanced"));
|
||||
button_advanced_menu->set_theme_type_variation("FlatMenuButton");
|
||||
button_advanced_menu->set_toggle_mode(true);
|
||||
button_advanced_menu->get_popup()->add_item(TTR("Reset to default tile shape"), RESET_TO_DEFAULT_TILE, Key::F);
|
||||
|
|
@ -971,6 +976,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
button_pixel_snap = memnew(MenuButton);
|
||||
toolbar->add_child(button_pixel_snap);
|
||||
button_pixel_snap->set_flat(false);
|
||||
button_pixel_snap->set_accessibility_name(TTRC("Snap"));
|
||||
button_pixel_snap->set_theme_type_variation("FlatMenuButton");
|
||||
button_pixel_snap->set_tooltip_text(TTR("Toggle Grid Snap"));
|
||||
button_pixel_snap->get_popup()->add_item(TTR("Disable Snap"), SNAP_NONE);
|
||||
|
|
@ -980,6 +986,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
|
||||
snap_subdivision = memnew(SpinBox);
|
||||
toolbar->add_child(snap_subdivision);
|
||||
snap_subdivision->set_accessibility_name(TTRC("Subdivision"));
|
||||
snap_subdivision->get_line_edit()->add_theme_constant_override("minimum_character_width", 2);
|
||||
snap_subdivision->set_min(1);
|
||||
snap_subdivision->set_max(99);
|
||||
|
|
@ -1019,6 +1026,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
|||
button_center_view->connect(SceneStringName(pressed), callable_mp(this, &GenericTilePolygonEditor::_center_view));
|
||||
button_center_view->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
button_center_view->set_accessibility_name(TTRC("Center View"));
|
||||
button_center_view->set_disabled(true);
|
||||
root->add_child(button_center_view);
|
||||
|
||||
|
|
@ -2880,6 +2888,7 @@ TileDataTerrainsEditor::TileDataTerrainsEditor() {
|
|||
picker_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/picker"));
|
||||
picker_button->set_accessibility_name(TTRC("Pick"));
|
||||
toolbar->add_child(picker_button);
|
||||
|
||||
// Setup
|
||||
|
|
|
|||
|
|
@ -2219,6 +2219,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
select_tool_button->set_button_group(tool_buttons_group);
|
||||
select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", TTRC("Selection Tool"), Key::S));
|
||||
select_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
select_tool_button->set_accessibility_name(TTRC("Selection Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(select_tool_button);
|
||||
viewport_shortcut_buttons.push_back(select_tool_button);
|
||||
|
||||
|
|
@ -2229,6 +2230,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
paint_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/paint_tool"));
|
||||
paint_tool_button->set_tooltip_text(TTR("Shift: Draw line.") + "\n" + keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Shift: Draw rectangle."));
|
||||
paint_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
paint_tool_button->set_accessibility_name(TTRC("Paint Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(paint_tool_button);
|
||||
viewport_shortcut_buttons.push_back(paint_tool_button);
|
||||
|
||||
|
|
@ -2239,6 +2241,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
// TRANSLATORS: This refers to the line tool in the tilemap editor.
|
||||
line_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/line_tool"));
|
||||
line_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
line_tool_button->set_accessibility_name(TTRC("Line Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(line_tool_button);
|
||||
viewport_shortcut_buttons.push_back(line_tool_button);
|
||||
|
||||
|
|
@ -2248,6 +2251,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
rect_tool_button->set_button_group(tool_buttons_group);
|
||||
rect_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/rect_tool"));
|
||||
rect_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
rect_tool_button->set_accessibility_name(TTRC("Rect Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(rect_tool_button);
|
||||
viewport_shortcut_buttons.push_back(rect_tool_button);
|
||||
|
||||
|
|
@ -2257,6 +2261,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
bucket_tool_button->set_button_group(tool_buttons_group);
|
||||
bucket_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/bucket_tool"));
|
||||
bucket_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_update_toolbar));
|
||||
bucket_tool_button->set_accessibility_name(TTRC("Bucket Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(bucket_tool_button);
|
||||
toolbar->add_child(tilemap_tiles_tools_buttons);
|
||||
viewport_shortcut_buttons.push_back(bucket_tool_button);
|
||||
|
|
@ -2276,6 +2281,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
|
||||
picker_button->set_tooltip_text(vformat(TTR("Alternatively hold %s with other tools to pick tile."), find_keycode_name(key)));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
picker_button->set_accessibility_name(TTRC("Pick"));
|
||||
tools_settings->add_child(picker_button);
|
||||
viewport_shortcut_buttons.push_back(picker_button);
|
||||
|
||||
|
|
@ -2286,6 +2292,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
erase_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/eraser"));
|
||||
erase_button->set_tooltip_text(TTRC("Alternatively use RMB to erase tiles."));
|
||||
erase_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
erase_button->set_accessibility_name(TTRC("Erase"));
|
||||
tools_settings->add_child(erase_button);
|
||||
viewport_shortcut_buttons.push_back(erase_button);
|
||||
|
||||
|
|
@ -2299,6 +2306,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
transform_button_rotate_left->set_shortcut(ED_SHORTCUT("tiles_editor/rotate_tile_left", TTRC("Rotate Tile Left"), Key::Z));
|
||||
transform_toolbar->add_child(transform_button_rotate_left);
|
||||
transform_button_rotate_left->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_ROTATE_LEFT));
|
||||
transform_button_rotate_left->set_accessibility_name(TTRC("Rotate Tile Left"));
|
||||
viewport_shortcut_buttons.push_back(transform_button_rotate_left);
|
||||
|
||||
transform_button_rotate_right = memnew(Button);
|
||||
|
|
@ -2306,6 +2314,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
transform_button_rotate_right->set_shortcut(ED_SHORTCUT("tiles_editor/rotate_tile_right", TTRC("Rotate Tile Right"), Key::X));
|
||||
transform_toolbar->add_child(transform_button_rotate_right);
|
||||
transform_button_rotate_right->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_ROTATE_RIGHT));
|
||||
transform_button_rotate_right->set_accessibility_name(TTRC("Rotate Tile Right"));
|
||||
viewport_shortcut_buttons.push_back(transform_button_rotate_right);
|
||||
|
||||
transform_button_flip_h = memnew(Button);
|
||||
|
|
@ -2313,6 +2322,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
transform_button_flip_h->set_shortcut(ED_SHORTCUT("tiles_editor/flip_tile_horizontal", TTRC("Flip Tile Horizontally"), Key::C));
|
||||
transform_toolbar->add_child(transform_button_flip_h);
|
||||
transform_button_flip_h->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_FLIP_H));
|
||||
transform_button_flip_h->set_accessibility_name(TTRC("Flip Tile Horizontally"));
|
||||
viewport_shortcut_buttons.push_back(transform_button_flip_h);
|
||||
|
||||
transform_button_flip_v = memnew(Button);
|
||||
|
|
@ -2320,6 +2330,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
transform_button_flip_v->set_shortcut(ED_SHORTCUT("tiles_editor/flip_tile_vertical", TTRC("Flip Tile Vertically"), Key::V));
|
||||
transform_toolbar->add_child(transform_button_flip_v);
|
||||
transform_button_flip_v->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_apply_transform).bind(TRANSFORM_FLIP_V));
|
||||
transform_button_flip_v->set_accessibility_name(TTRC("Flip Tile Vertically"));
|
||||
viewport_shortcut_buttons.push_back(transform_button_flip_v);
|
||||
|
||||
// Separator 2.
|
||||
|
|
@ -2339,6 +2350,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
random_tile_toggle->set_toggle_mode(true);
|
||||
random_tile_toggle->set_tooltip_text(TTR("Place Random Tile"));
|
||||
random_tile_toggle->connect(SceneStringName(toggled), callable_mp(this, &TileMapLayerEditorTilesPlugin::_on_random_tile_checkbox_toggled));
|
||||
random_tile_toggle->set_accessibility_name(TTRC("Place Random Tile"));
|
||||
tools_settings->add_child(random_tile_toggle);
|
||||
|
||||
// Random tile scattering.
|
||||
|
|
@ -2356,6 +2368,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
scatter_spinbox->set_tooltip_text(TTR("Modifies the chance of painting nothing instead of a randomly selected tile."));
|
||||
scatter_spinbox->get_line_edit()->add_theme_constant_override("minimum_character_width", 4);
|
||||
scatter_spinbox->connect(SceneStringName(value_changed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_on_scattering_spinbox_changed));
|
||||
scatter_spinbox->set_accessibility_name(TTRC("Scattering"));
|
||||
scatter_controls_container->add_child(scatter_spinbox);
|
||||
tools_settings->add_child(scatter_controls_container);
|
||||
|
||||
|
|
@ -2404,6 +2417,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
|||
source_sort_button->set_flat(false);
|
||||
source_sort_button->set_theme_type_variation("FlatMenuButton");
|
||||
source_sort_button->set_tooltip_text(TTR("Sort sources"));
|
||||
source_sort_button->set_accessibility_name(TTRC("Sort sources"));
|
||||
|
||||
PopupMenu *p = source_sort_button->get_popup();
|
||||
p->connect(SceneStringName(id_pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_set_source_sort));
|
||||
|
|
@ -3571,6 +3585,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
paint_tool_button->set_pressed(true);
|
||||
paint_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/paint_tool"));
|
||||
paint_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
paint_tool_button->set_accessibility_name(TTRC("Paint Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(paint_tool_button);
|
||||
viewport_shortcut_buttons.push_back(paint_tool_button);
|
||||
|
||||
|
|
@ -3580,6 +3595,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
line_tool_button->set_button_group(tool_buttons_group);
|
||||
line_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/line_tool"));
|
||||
line_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
line_tool_button->set_accessibility_name(TTRC("Line Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(line_tool_button);
|
||||
viewport_shortcut_buttons.push_back(line_tool_button);
|
||||
|
||||
|
|
@ -3589,6 +3605,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
rect_tool_button->set_button_group(tool_buttons_group);
|
||||
rect_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/rect_tool"));
|
||||
rect_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
rect_tool_button->set_accessibility_name(TTRC("Rect Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(rect_tool_button);
|
||||
viewport_shortcut_buttons.push_back(rect_tool_button);
|
||||
|
||||
|
|
@ -3598,6 +3615,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
bucket_tool_button->set_button_group(tool_buttons_group);
|
||||
bucket_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/bucket_tool"));
|
||||
bucket_tool_button->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditorTerrainsPlugin::_update_toolbar));
|
||||
bucket_tool_button->set_accessibility_name(TTRC("Bucket Tool"));
|
||||
tilemap_tiles_tools_buttons->add_child(bucket_tool_button);
|
||||
viewport_shortcut_buttons.push_back(bucket_tool_button);
|
||||
|
||||
|
|
@ -3616,6 +3634,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/picker"));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
picker_button->set_accessibility_name(TTRC("Pick"));
|
||||
tools_settings->add_child(picker_button);
|
||||
viewport_shortcut_buttons.push_back(picker_button);
|
||||
|
||||
|
|
@ -3625,6 +3644,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
|||
erase_button->set_toggle_mode(true);
|
||||
erase_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/eraser"));
|
||||
erase_button->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
erase_button->set_accessibility_name(TTRC("Erase"));
|
||||
tools_settings->add_child(erase_button);
|
||||
viewport_shortcut_buttons.push_back(erase_button);
|
||||
|
||||
|
|
@ -4476,18 +4496,21 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
|||
layers_selection_button->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS);
|
||||
layers_selection_button->set_tooltip_text(TTR("TileMap Layers"));
|
||||
layers_selection_button->connect(SceneStringName(item_selected), callable_mp(this, &TileMapLayerEditor::_layers_selection_item_selected));
|
||||
layers_selection_button->set_accessibility_name(TTRC("TileMap Layers"));
|
||||
layer_selection_hbox->add_child(layers_selection_button);
|
||||
|
||||
select_previous_layer = memnew(Button);
|
||||
select_previous_layer->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_previous_layer->set_tooltip_text(TTR("Select previous layer"));
|
||||
select_previous_layer->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditor::_select_previous_layer_pressed));
|
||||
select_previous_layer->set_accessibility_name(TTRC("Previous"));
|
||||
layer_selection_hbox->add_child(select_previous_layer);
|
||||
|
||||
select_next_layer = memnew(Button);
|
||||
select_next_layer->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_next_layer->set_tooltip_text(TTR("Select next layer"));
|
||||
select_next_layer->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditor::_select_next_layer_pressed));
|
||||
select_next_layer->set_accessibility_name(TTRC("Next"));
|
||||
layer_selection_hbox->add_child(select_next_layer);
|
||||
|
||||
select_all_layers = memnew(Button);
|
||||
|
|
@ -4503,6 +4526,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
|||
toggle_highlight_selected_layer_button->set_toggle_mode(true);
|
||||
toggle_highlight_selected_layer_button->connect(SceneStringName(toggled), callable_mp(this, &TileMapLayerEditor::_highlight_selected_layer_button_toggled));
|
||||
toggle_highlight_selected_layer_button->set_tooltip_text(TTR("Highlight Selected TileMap Layer"));
|
||||
toggle_highlight_selected_layer_button->set_accessibility_name(TTRC("Highlight Selected TileMap Layer"));
|
||||
tile_map_toolbar->add_child(toggle_highlight_selected_layer_button);
|
||||
|
||||
tile_map_toolbar->add_child(memnew(VSeparator));
|
||||
|
|
@ -4513,11 +4537,13 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
|||
toggle_grid_button->set_toggle_mode(true);
|
||||
toggle_grid_button->set_tooltip_text(TTR("Toggle grid visibility."));
|
||||
toggle_grid_button->connect(SceneStringName(toggled), callable_mp(this, &TileMapLayerEditor::_on_grid_toggled));
|
||||
toggle_grid_button->set_accessibility_name(TTRC("Grid"));
|
||||
tile_map_toolbar->add_child(toggle_grid_button);
|
||||
|
||||
// Advanced settings menu button.
|
||||
advanced_menu_button = memnew(MenuButton);
|
||||
advanced_menu_button->set_flat(false);
|
||||
advanced_menu_button->set_accessibility_name(TTRC("Advanced"));
|
||||
advanced_menu_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
advanced_menu_button->get_popup()->add_item(TTR("Automatically Replace Tiles with Proxies"), ADVANCED_MENU_REPLACE_WITH_PROXIES);
|
||||
advanced_menu_button->get_popup()->add_item(TTR("Extract TileMap layers as individual TileMapLayer nodes"), ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS);
|
||||
|
|
|
|||
|
|
@ -846,6 +846,7 @@ TileSetEditor::TileSetEditor() {
|
|||
source_sort_button->set_flat(false);
|
||||
source_sort_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
source_sort_button->set_tooltip_text(TTR("Sort Sources"));
|
||||
source_sort_button->set_accessibility_name(TTRC("Sort Sources"));
|
||||
|
||||
PopupMenu *p = source_sort_button->get_popup();
|
||||
p->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_set_source_sort));
|
||||
|
|
@ -896,6 +897,7 @@ TileSetEditor::TileSetEditor() {
|
|||
sources_advanced_menu_button->get_popup()->add_item(TTR("Open Atlas Merging Tool"));
|
||||
sources_advanced_menu_button->get_popup()->add_item(TTR("Manage Tile Proxies"));
|
||||
sources_advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_sources_advanced_menu_id_pressed));
|
||||
sources_advanced_menu_button->set_accessibility_name(TTRC("Advanced"));
|
||||
sources_bottom_actions->add_child(sources_advanced_menu_button);
|
||||
sources_bottom_actions->add_child(source_sort_button);
|
||||
|
||||
|
|
|
|||
|
|
@ -573,12 +573,14 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
|
|||
scene_tile_add_button = memnew(Button);
|
||||
scene_tile_add_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
scene_tile_add_button->connect(SceneStringName(pressed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_source_add_pressed));
|
||||
scene_tile_add_button->set_accessibility_name(TTRC("Add"));
|
||||
scenes_bottom_actions->add_child(scene_tile_add_button);
|
||||
|
||||
scene_tile_delete_button = memnew(Button);
|
||||
scene_tile_delete_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
scene_tile_delete_button->set_disabled(true);
|
||||
scene_tile_delete_button->connect(SceneStringName(pressed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_source_delete_pressed));
|
||||
scene_tile_delete_button->set_accessibility_name(TTRC("Delete"));
|
||||
scenes_bottom_actions->add_child(scene_tile_delete_button);
|
||||
|
||||
EditorInspector::add_inspector_plugin(memnew(TileSourceInspectorPlugin));
|
||||
|
|
|
|||
|
|
@ -1067,6 +1067,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
|
||||
set_up_ssh_public_key_path = memnew(LineEdit);
|
||||
set_up_ssh_public_key_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_ssh_public_key_path->set_accessibility_name(TTRC("SSH Public Key Path"));
|
||||
set_up_ssh_public_key_path->set_text(EDITOR_GET("version_control/ssh_public_key_path"));
|
||||
set_up_ssh_public_key_path->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
|
||||
set_up_ssh_public_key_input_hbc->add_child(set_up_ssh_public_key_path);
|
||||
|
|
@ -1083,6 +1084,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
select_public_path_button->set_button_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
|
||||
select_public_path_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(set_up_ssh_public_key_file_dialog));
|
||||
select_public_path_button->set_tooltip_text(TTR("Select SSH public key path"));
|
||||
select_public_path_button->set_accessibility_name(TTRC("Select SSH public key path"));
|
||||
set_up_ssh_public_key_input_hbc->add_child(select_public_path_button);
|
||||
|
||||
HBoxContainer *set_up_ssh_private_key_input = memnew(HBoxContainer);
|
||||
|
|
@ -1102,6 +1104,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
set_up_ssh_private_key_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_ssh_private_key_path->set_text(EDITOR_GET("version_control/ssh_private_key_path"));
|
||||
set_up_ssh_private_key_path->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
|
||||
set_up_ssh_private_key_path->set_accessibility_name(TTRC("SSH Private Key Path"));
|
||||
set_up_ssh_private_key_input_hbc->add_child(set_up_ssh_private_key_path);
|
||||
|
||||
set_up_ssh_private_key_file_dialog = memnew(FileDialog);
|
||||
|
|
@ -1116,6 +1119,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
select_private_path_button->set_button_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
|
||||
select_private_path_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(set_up_ssh_private_key_file_dialog));
|
||||
select_private_path_button->set_tooltip_text(TTR("Select SSH private key path"));
|
||||
select_private_path_button->set_accessibility_name(TTRC("Select SSH private key path"));
|
||||
set_up_ssh_private_key_input_hbc->add_child(select_private_path_button);
|
||||
|
||||
HBoxContainer *set_up_ssh_passphrase_input = memnew(HBoxContainer);
|
||||
|
|
@ -1131,6 +1135,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
set_up_ssh_passphrase->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_ssh_passphrase->set_secret(true);
|
||||
set_up_ssh_passphrase->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
|
||||
set_up_ssh_passphrase->set_accessibility_name(TTRC("SSH Passphrase"));
|
||||
set_up_ssh_passphrase_input->add_child(set_up_ssh_passphrase);
|
||||
|
||||
set_up_warning_text = memnew(Label);
|
||||
|
|
@ -1156,6 +1161,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
unstage_title->add_child(unstage_label);
|
||||
|
||||
refresh_button = memnew(Button);
|
||||
refresh_button->set_accessibility_name(TTRC("Detect new changes"));
|
||||
refresh_button->set_tooltip_text(TTR("Detect new changes"));
|
||||
refresh_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
refresh_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||
|
|
@ -1177,6 +1183,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
discard_all_confirm->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_discard_all));
|
||||
|
||||
discard_all_button = memnew(Button);
|
||||
discard_all_button->set_accessibility_name(TTRC("Discard all changes"));
|
||||
discard_all_button->set_tooltip_text(TTR("Discard all changes"));
|
||||
discard_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Close"), EditorStringName(EditorIcons)));
|
||||
discard_all_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_confirm_discard_all));
|
||||
|
|
@ -1184,6 +1191,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
unstage_title->add_child(discard_all_button);
|
||||
|
||||
stage_all_button = memnew(Button);
|
||||
stage_all_button->set_accessibility_name(TTRC("Stage all changes"));
|
||||
stage_all_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
stage_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
|
||||
stage_all_button->set_tooltip_text(TTR("Stage all changes"));
|
||||
|
|
@ -1214,6 +1222,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
stage_title->add_child(stage_label);
|
||||
|
||||
unstage_all_button = memnew(Button);
|
||||
unstage_all_button->set_accessibility_name(TTRC("Unstage all changes"));
|
||||
unstage_all_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
unstage_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
|
||||
unstage_all_button->set_tooltip_text(TTR("Unstage all changes"));
|
||||
|
|
@ -1245,6 +1254,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
commit_area->add_child(commit_label);
|
||||
|
||||
commit_message = memnew(TextEdit);
|
||||
commit_message->set_accessibility_name(TTRC("Commit Message"));
|
||||
commit_message->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
commit_message->set_h_grow_direction(Control::GrowDirection::GROW_DIRECTION_BEGIN);
|
||||
commit_message->set_v_grow_direction(Control::GrowDirection::GROW_DIRECTION_END);
|
||||
|
|
@ -1273,6 +1283,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
commit_list_hbc->add_child(commit_list_label);
|
||||
|
||||
commit_list_size_button = memnew(OptionButton);
|
||||
commit_list_size_button->set_accessibility_name(TTRC("Commit list size"));
|
||||
commit_list_size_button->set_tooltip_text(TTR("Commit list size"));
|
||||
commit_list_size_button->add_item("10");
|
||||
commit_list_size_button->set_item_metadata(0, 10);
|
||||
|
|
@ -1305,6 +1316,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
version_commit_dock->add_child(menu_bar);
|
||||
|
||||
branch_select = memnew(OptionButton);
|
||||
branch_select->set_accessibility_name(TTRC("Branches"));
|
||||
branch_select->set_tooltip_text(TTR("Branches"));
|
||||
branch_select->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
branch_select->set_clip_text(true);
|
||||
|
|
@ -1346,11 +1358,13 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
branch_create_hbc->add_child(branch_create_name_label);
|
||||
|
||||
branch_create_name_input = memnew(LineEdit);
|
||||
branch_create_name_input->set_accessibility_name(TTRC("Branch Name"));
|
||||
branch_create_name_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
branch_create_name_input->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_branch_create_button));
|
||||
branch_create_hbc->add_child(branch_create_name_input);
|
||||
|
||||
remote_select = memnew(OptionButton);
|
||||
remote_select->set_accessibility_name(TTRC("Remote"));
|
||||
remote_select->set_tooltip_text(TTR("Remotes"));
|
||||
remote_select->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_select->set_clip_text(true);
|
||||
|
|
@ -1392,6 +1406,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
remote_create_name_hbc->add_child(remote_create_name_label);
|
||||
|
||||
remote_create_name_input = memnew(LineEdit);
|
||||
remote_create_name_input->set_accessibility_name(TTRC("Remote Name"));
|
||||
remote_create_name_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_create_name_input->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_remote_create_button));
|
||||
remote_create_name_hbc->add_child(remote_create_name_input);
|
||||
|
|
@ -1406,12 +1421,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
remote_create_hbc->add_child(remote_create_url_label);
|
||||
|
||||
remote_create_url_input = memnew(LineEdit);
|
||||
remote_create_url_input->set_accessibility_name(TTRC("Remote URL"));
|
||||
remote_create_url_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_create_url_input->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_remote_create_button));
|
||||
remote_create_hbc->add_child(remote_create_url_input);
|
||||
|
||||
fetch_button = memnew(Button);
|
||||
fetch_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
fetch_button->set_accessibility_name(TTRC("Fetch"));
|
||||
fetch_button->set_tooltip_text(TTR("Fetch"));
|
||||
fetch_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||
fetch_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_fetch));
|
||||
|
|
@ -1419,6 +1436,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
|
||||
pull_button = memnew(Button);
|
||||
pull_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pull_button->set_accessibility_name(TTRC("Pull"));
|
||||
pull_button->set_tooltip_text(TTR("Pull"));
|
||||
pull_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
|
||||
pull_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_pull));
|
||||
|
|
@ -1426,6 +1444,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
|
||||
push_button = memnew(Button);
|
||||
push_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
push_button->set_accessibility_name(TTRC("Push"));
|
||||
push_button->set_tooltip_text(TTR("Push"));
|
||||
push_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
|
||||
push_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_push));
|
||||
|
|
@ -1492,6 +1511,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
diff_heading->add_child(view);
|
||||
|
||||
diff_view_type_select = memnew(OptionButton);
|
||||
diff_view_type_select->set_accessibility_name(TTRC("View"));
|
||||
diff_view_type_select->add_item(TTR("Split"), DIFF_VIEW_TYPE_SPLIT);
|
||||
diff_view_type_select->add_item(TTR("Unified"), DIFF_VIEW_TYPE_UNIFIED);
|
||||
diff_view_type_select->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_display_diff));
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
if (valid_right) {
|
||||
if (expanded_port_counter == 0 && vsnode->is_output_port_expandable(i)) {
|
||||
TextureButton *expand = memnew(TextureButton);
|
||||
expand->set_accessibility_name(TTRC("Expand output port"));
|
||||
expand->set_toggle_mode(true);
|
||||
expand->set_texture_normal(editor->get_editor_theme_icon(SNAME("GuiTreeArrowRight")));
|
||||
expand->set_texture_pressed(editor->get_editor_theme_icon(SNAME("GuiTreeArrowDown")));
|
||||
|
|
@ -1222,6 +1223,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
|
|||
}
|
||||
if (vsnode->has_output_port_preview(i) && port_right != VisualShaderNode::PORT_TYPE_TRANSFORM && port_right != VisualShaderNode::PORT_TYPE_SAMPLER) {
|
||||
TextureButton *preview = memnew(TextureButton);
|
||||
preview->set_accessibility_name(TTRC("Select preview port"));
|
||||
preview->set_toggle_mode(true);
|
||||
preview->set_texture_normal(editor->get_editor_theme_icon(SNAME("GuiVisibilityHidden")));
|
||||
preview->set_texture_pressed(editor->get_editor_theme_icon(SNAME("GuiVisibilityVisible")));
|
||||
|
|
@ -6121,6 +6123,10 @@ void VisualShaderEditor::_connection_menu_id_pressed(int p_idx) {
|
|||
}
|
||||
|
||||
Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
return Variant();
|
||||
}
|
||||
|
||||
if (p_from == members) {
|
||||
TreeItem *it = members->get_item_at_position(p_point);
|
||||
if (!it) {
|
||||
|
|
@ -6146,6 +6152,10 @@ Variant VisualShaderEditor::get_drag_data_fw(const Point2 &p_point, Control *p_f
|
|||
}
|
||||
|
||||
bool VisualShaderEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (p_from == graph) {
|
||||
Dictionary d = p_data;
|
||||
|
||||
|
|
@ -6161,6 +6171,10 @@ bool VisualShaderEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
|
|||
}
|
||||
|
||||
void VisualShaderEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
|
||||
if (p_point == Vector2(INFINITY, INFINITY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_from == graph) {
|
||||
Dictionary d = p_data;
|
||||
|
||||
|
|
@ -6746,6 +6760,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
preview_tools = memnew(MenuButton);
|
||||
filter_hbox->add_child(preview_tools);
|
||||
preview_tools->set_tooltip_text(TTR("Options"));
|
||||
preview_tools->set_accessibility_name(TTRC("Options"));
|
||||
preview_tools->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_preview_tools_menu_option));
|
||||
preview_tools->get_popup()->add_item(TTR("Copy Parameters From Material"), COPY_PARAMS_FROM_MATERIAL);
|
||||
preview_tools->get_popup()->add_item(TTR("Paste Parameters To Material"), PASTE_PARAMS_TO_MATERIAL);
|
||||
|
|
@ -6795,10 +6810,12 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
node_filter->connect(SceneStringName(gui_input), callable_mp(this, &VisualShaderEditor::_sbox_input));
|
||||
node_filter->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
node_filter->set_placeholder(TTR("Search"));
|
||||
node_filter->set_accessibility_name(TTRC("Search"));
|
||||
|
||||
tools = memnew(MenuButton);
|
||||
filter_hb->add_child(tools);
|
||||
tools->set_tooltip_text(TTR("Options"));
|
||||
tools->set_accessibility_name(TTRC("Options"));
|
||||
tools->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_tools_menu_option));
|
||||
tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL);
|
||||
tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL);
|
||||
|
|
@ -6874,6 +6891,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
varying_type->add_item("Vector4");
|
||||
varying_type->add_item("Boolean");
|
||||
varying_type->add_item("Transform");
|
||||
varying_type->set_accessibility_name(TTRC("Varying Type"));
|
||||
varying_type->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_varying_type_changed));
|
||||
|
||||
varying_name = memnew(LineEdit);
|
||||
|
|
@ -6887,6 +6905,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
hb->add_child(varying_mode);
|
||||
varying_mode->add_item("Vertex -> [Fragment, Light]");
|
||||
varying_mode->add_item("Fragment -> Light");
|
||||
varying_mode->set_accessibility_name(TTRC("Varying Mode"));
|
||||
varying_mode->connect(SceneStringName(item_selected), callable_mp(this, &VisualShaderEditor::_varying_mode_changed));
|
||||
|
||||
varying_error_label = memnew(Label);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue