mirror of
https://github.com/godotengine/godot.git
synced 2025-03-13 23:41:08 +08:00
[Scene] Add SceneStringName::FlatButton
This commit is contained in:
parent
a372214a4a
commit
ba39b078f5
@ -1853,7 +1853,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
skip_breakpoints = memnew(Button);
|
||||
skip_breakpoints->set_theme_type_variation("FlatButton");
|
||||
skip_breakpoints->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(skip_breakpoints);
|
||||
skip_breakpoints->set_tooltip_text(TTR("Skip Breakpoints"));
|
||||
skip_breakpoints->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_skip_breakpoints));
|
||||
@ -1861,7 +1861,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
copy = memnew(Button);
|
||||
copy->set_theme_type_variation("FlatButton");
|
||||
copy->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(copy);
|
||||
copy->set_tooltip_text(TTR("Copy Error"));
|
||||
copy->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_copy));
|
||||
@ -1869,14 +1869,14 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
step = memnew(Button);
|
||||
step->set_theme_type_variation("FlatButton");
|
||||
step->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(step);
|
||||
step->set_tooltip_text(TTR("Step Into"));
|
||||
step->set_shortcut(ED_GET_SHORTCUT("debugger/step_into"));
|
||||
step->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_step));
|
||||
|
||||
next = memnew(Button);
|
||||
next->set_theme_type_variation("FlatButton");
|
||||
next->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(next);
|
||||
next->set_tooltip_text(TTR("Step Over"));
|
||||
next->set_shortcut(ED_GET_SHORTCUT("debugger/step_over"));
|
||||
@ -1885,14 +1885,14 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
hbc->add_child(memnew(VSeparator));
|
||||
|
||||
dobreak = memnew(Button);
|
||||
dobreak->set_theme_type_variation("FlatButton");
|
||||
dobreak->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(dobreak);
|
||||
dobreak->set_tooltip_text(TTR("Break"));
|
||||
dobreak->set_shortcut(ED_GET_SHORTCUT("debugger/break"));
|
||||
dobreak->connect(SceneStringName(pressed), callable_mp(this, &ScriptEditorDebugger::debug_break));
|
||||
|
||||
docontinue = memnew(Button);
|
||||
docontinue->set_theme_type_variation("FlatButton");
|
||||
docontinue->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc->add_child(docontinue);
|
||||
docontinue->set_tooltip_text(TTR("Continue"));
|
||||
docontinue->set_shortcut(ED_GET_SHORTCUT("debugger/continue"));
|
||||
@ -2079,10 +2079,10 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
|
||||
vmem_total->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
|
||||
vmem_hb->add_child(vmem_total);
|
||||
vmem_refresh = memnew(Button);
|
||||
vmem_refresh->set_theme_type_variation("FlatButton");
|
||||
vmem_refresh->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
vmem_hb->add_child(vmem_refresh);
|
||||
vmem_export = memnew(Button);
|
||||
vmem_export->set_theme_type_variation("FlatButton");
|
||||
vmem_export->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
vmem_export->set_tooltip_text(TTR("Export list to a CSV file"));
|
||||
vmem_hb->add_child(vmem_export);
|
||||
vmem_vb->add_child(vmem_hb);
|
||||
|
@ -822,21 +822,21 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
vb->add_child(hbc);
|
||||
solo = memnew(Button);
|
||||
solo->set_theme_type_variation("FlatButton");
|
||||
solo->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
solo->set_toggle_mode(true);
|
||||
solo->set_tooltip_text(TTR("Solo"));
|
||||
solo->set_focus_mode(FOCUS_NONE);
|
||||
solo->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBus::_solo_toggled));
|
||||
hbc->add_child(solo);
|
||||
mute = memnew(Button);
|
||||
mute->set_theme_type_variation("FlatButton");
|
||||
mute->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
mute->set_toggle_mode(true);
|
||||
mute->set_tooltip_text(TTR("Mute"));
|
||||
mute->set_focus_mode(FOCUS_NONE);
|
||||
mute->connect(SceneStringName(pressed), callable_mp(this, &EditorAudioBus::_mute_toggled));
|
||||
hbc->add_child(mute);
|
||||
bypass = memnew(Button);
|
||||
bypass->set_theme_type_variation("FlatButton");
|
||||
bypass->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bypass->set_toggle_mode(true);
|
||||
bypass->set_tooltip_text(TTR("Bypass"));
|
||||
bypass->set_focus_mode(FOCUS_NONE);
|
||||
|
@ -338,7 +338,7 @@ EditorHelpSearch::EditorHelpSearch() {
|
||||
hbox->add_child(search_box);
|
||||
|
||||
case_sensitive_button = memnew(Button);
|
||||
case_sensitive_button->set_theme_type_variation("FlatButton");
|
||||
case_sensitive_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
case_sensitive_button->set_tooltip_text(TTR("Case Sensitive"));
|
||||
case_sensitive_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelpSearch::_update_results));
|
||||
case_sensitive_button->set_toggle_mode(true);
|
||||
@ -346,7 +346,7 @@ EditorHelpSearch::EditorHelpSearch() {
|
||||
hbox->add_child(case_sensitive_button);
|
||||
|
||||
hierarchy_button = memnew(Button);
|
||||
hierarchy_button->set_theme_type_variation("FlatButton");
|
||||
hierarchy_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hierarchy_button->set_tooltip_text(TTR("Show Hierarchy"));
|
||||
hierarchy_button->connect(SceneStringName(pressed), callable_mp(this, &EditorHelpSearch::_update_results));
|
||||
hierarchy_button->set_toggle_mode(true);
|
||||
|
@ -480,7 +480,7 @@ EditorLog::EditorLog() {
|
||||
|
||||
// Clear.
|
||||
clear_button = memnew(Button);
|
||||
clear_button->set_theme_type_variation("FlatButton");
|
||||
clear_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
clear_button->set_focus_mode(FOCUS_NONE);
|
||||
clear_button->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::K));
|
||||
clear_button->connect(SceneStringName(pressed), callable_mp(this, &EditorLog::_clear_request));
|
||||
@ -488,7 +488,7 @@ EditorLog::EditorLog() {
|
||||
|
||||
// Copy.
|
||||
copy_button = memnew(Button);
|
||||
copy_button->set_theme_type_variation("FlatButton");
|
||||
copy_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
copy_button->set_focus_mode(FOCUS_NONE);
|
||||
copy_button->set_shortcut(ED_SHORTCUT("editor/copy_output", TTR("Copy Selection"), KeyModifierMask::CMD_OR_CTRL | Key::C));
|
||||
copy_button->set_shortcut_context(this);
|
||||
@ -505,7 +505,7 @@ EditorLog::EditorLog() {
|
||||
|
||||
// Collapse.
|
||||
collapse_button = memnew(Button);
|
||||
collapse_button->set_theme_type_variation("FlatButton");
|
||||
collapse_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
collapse_button->set_focus_mode(FOCUS_NONE);
|
||||
collapse_button->set_tooltip_text(TTR("Collapse duplicate messages into one log entry. Shows number of occurrences."));
|
||||
collapse_button->set_toggle_mode(true);
|
||||
@ -515,7 +515,7 @@ EditorLog::EditorLog() {
|
||||
|
||||
// Show Search.
|
||||
show_search_button = memnew(Button);
|
||||
show_search_button->set_theme_type_variation("FlatButton");
|
||||
show_search_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
show_search_button->set_focus_mode(FOCUS_NONE);
|
||||
show_search_button->set_toggle_mode(true);
|
||||
show_search_button->set_pressed(true);
|
||||
|
@ -2309,13 +2309,13 @@ EditorFileDialog::EditorFileDialog() {
|
||||
vbc->add_child(pathhb);
|
||||
|
||||
dir_prev = memnew(Button);
|
||||
dir_prev->set_theme_type_variation("FlatButton");
|
||||
dir_prev->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
dir_prev->set_tooltip_text(TTR("Go to previous folder."));
|
||||
dir_next = memnew(Button);
|
||||
dir_next->set_theme_type_variation("FlatButton");
|
||||
dir_next->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
dir_next->set_tooltip_text(TTR("Go to next folder."));
|
||||
dir_up = memnew(Button);
|
||||
dir_up->set_theme_type_variation("FlatButton");
|
||||
dir_up->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
dir_up->set_tooltip_text(TTR("Go to parent folder."));
|
||||
|
||||
pathhb->add_child(dir_prev);
|
||||
@ -2338,13 +2338,13 @@ EditorFileDialog::EditorFileDialog() {
|
||||
pathhb->add_child(dir);
|
||||
|
||||
refresh = memnew(Button);
|
||||
refresh->set_theme_type_variation("FlatButton");
|
||||
refresh->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
refresh->set_tooltip_text(TTR("Refresh files."));
|
||||
refresh->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::update_file_list));
|
||||
pathhb->add_child(refresh);
|
||||
|
||||
favorite = memnew(Button);
|
||||
favorite->set_theme_type_variation("FlatButton");
|
||||
favorite->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
favorite->set_toggle_mode(true);
|
||||
favorite->set_tooltip_text(TTR("(Un)favorite current folder."));
|
||||
favorite->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_favorite_pressed));
|
||||
@ -2361,7 +2361,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
pathhb->add_child(makedir_sep);
|
||||
|
||||
makedir = memnew(Button);
|
||||
makedir->set_theme_type_variation("FlatButton");
|
||||
makedir->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
makedir->set_tooltip_text(TTR("Create a new folder."));
|
||||
makedir->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_make_dir));
|
||||
pathhb->add_child(makedir);
|
||||
@ -2397,11 +2397,11 @@ EditorFileDialog::EditorFileDialog() {
|
||||
|
||||
fav_hb->add_spacer();
|
||||
fav_up = memnew(Button);
|
||||
fav_up->set_theme_type_variation("FlatButton");
|
||||
fav_up->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
fav_hb->add_child(fav_up);
|
||||
fav_up->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_favorite_move_up));
|
||||
fav_down = memnew(Button);
|
||||
fav_down->set_theme_type_variation("FlatButton");
|
||||
fav_down->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
fav_hb->add_child(fav_down);
|
||||
fav_down->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::_favorite_move_down));
|
||||
|
||||
@ -2444,7 +2444,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
lower_hb->add_child(l);
|
||||
|
||||
show_hidden = memnew(Button);
|
||||
show_hidden->set_theme_type_variation("FlatButton");
|
||||
show_hidden->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
show_hidden->set_toggle_mode(true);
|
||||
show_hidden->set_pressed(is_showing_hidden_files());
|
||||
show_hidden->set_tooltip_text(TTR("Toggle the visibility of hidden files."));
|
||||
@ -2457,7 +2457,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
view_mode_group.instantiate();
|
||||
|
||||
mode_thumbnails = memnew(Button);
|
||||
mode_thumbnails->set_theme_type_variation("FlatButton");
|
||||
mode_thumbnails->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
mode_thumbnails->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_THUMBNAILS));
|
||||
mode_thumbnails->set_toggle_mode(true);
|
||||
mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS);
|
||||
@ -2466,7 +2466,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
lower_hb->add_child(mode_thumbnails);
|
||||
|
||||
mode_list = memnew(Button);
|
||||
mode_list->set_theme_type_variation("FlatButton");
|
||||
mode_list->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
mode_list->connect(SceneStringName(pressed), callable_mp(this, &EditorFileDialog::set_display_mode).bind(DISPLAY_LIST));
|
||||
mode_list->set_toggle_mode(true);
|
||||
mode_list->set_pressed(display_mode == DISPLAY_LIST);
|
||||
@ -2482,7 +2482,7 @@ EditorFileDialog::EditorFileDialog() {
|
||||
file_sort_button->set_tooltip_text(TTR("Sort files"));
|
||||
|
||||
show_search_filter_button = memnew(Button);
|
||||
show_search_filter_button->set_theme_type_variation("FlatButton");
|
||||
show_search_filter_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
show_search_filter_button->set_toggle_mode(true);
|
||||
show_search_filter_button->set_pressed(false);
|
||||
show_search_filter_button->set_tooltip_text(TTR("Toggle the visibility of the filter for file names."));
|
||||
|
@ -94,7 +94,7 @@ NodeDock::NodeDock() {
|
||||
mode_hb->hide();
|
||||
|
||||
connections_button = memnew(Button);
|
||||
connections_button->set_theme_type_variation("FlatButton");
|
||||
connections_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
connections_button->set_text(TTR("Signals"));
|
||||
connections_button->set_toggle_mode(true);
|
||||
connections_button->set_pressed(true);
|
||||
@ -104,7 +104,7 @@ NodeDock::NodeDock() {
|
||||
connections_button->connect(SceneStringName(pressed), callable_mp(this, &NodeDock::show_connections));
|
||||
|
||||
groups_button = memnew(Button);
|
||||
groups_button->set_theme_type_variation("FlatButton");
|
||||
groups_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
groups_button->set_text(TTR("Groups"));
|
||||
groups_button->set_toggle_mode(true);
|
||||
groups_button->set_pressed(false);
|
||||
|
@ -727,19 +727,19 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
|
||||
edge_point = PosVertex();
|
||||
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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("FlatButton");
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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("FlatButton");
|
||||
button_delete->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
add_child(button_delete);
|
||||
button_delete->connect(SceneStringName(pressed), callable_mp(this, &AbstractPolygon2DEditor::_menu_option).bind(MODE_DELETE));
|
||||
button_delete->set_toggle_mode(true);
|
||||
|
@ -661,7 +661,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
bg.instantiate();
|
||||
|
||||
tool_blend = memnew(Button);
|
||||
tool_blend->set_theme_type_variation("FlatButton");
|
||||
tool_blend->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_blend->set_toggle_mode(true);
|
||||
tool_blend->set_button_group(bg);
|
||||
top_hb->add_child(tool_blend);
|
||||
@ -670,7 +670,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
tool_blend->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(3));
|
||||
|
||||
tool_select = memnew(Button);
|
||||
tool_select->set_theme_type_variation("FlatButton");
|
||||
tool_select->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_select->set_toggle_mode(true);
|
||||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
@ -678,7 +678,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_tool_switch).bind(0));
|
||||
|
||||
tool_create = memnew(Button);
|
||||
tool_create->set_theme_type_variation("FlatButton");
|
||||
tool_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_create->set_toggle_mode(true);
|
||||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
@ -688,7 +688,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
top_hb->add_child(tool_erase_sep);
|
||||
tool_erase = memnew(Button);
|
||||
tool_erase->set_theme_type_variation("FlatButton");
|
||||
tool_erase->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(tool_erase);
|
||||
tool_erase->set_tooltip_text(TTR("Erase points."));
|
||||
tool_erase->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_erase_selected));
|
||||
@ -696,7 +696,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
snap = memnew(Button);
|
||||
snap->set_theme_type_variation("FlatButton");
|
||||
snap->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
snap->set_toggle_mode(true);
|
||||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
|
@ -882,7 +882,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
bg.instantiate();
|
||||
|
||||
tool_blend = memnew(Button);
|
||||
tool_blend->set_theme_type_variation("FlatButton");
|
||||
tool_blend->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_blend->set_toggle_mode(true);
|
||||
tool_blend->set_button_group(bg);
|
||||
top_hb->add_child(tool_blend);
|
||||
@ -891,7 +891,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_blend->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(3));
|
||||
|
||||
tool_select = memnew(Button);
|
||||
tool_select->set_theme_type_variation("FlatButton");
|
||||
tool_select->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_select->set_toggle_mode(true);
|
||||
tool_select->set_button_group(bg);
|
||||
top_hb->add_child(tool_select);
|
||||
@ -899,7 +899,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(0));
|
||||
|
||||
tool_create = memnew(Button);
|
||||
tool_create->set_theme_type_variation("FlatButton");
|
||||
tool_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_create->set_toggle_mode(true);
|
||||
tool_create->set_button_group(bg);
|
||||
top_hb->add_child(tool_create);
|
||||
@ -907,7 +907,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_tool_switch).bind(1));
|
||||
|
||||
tool_triangle = memnew(Button);
|
||||
tool_triangle->set_theme_type_variation("FlatButton");
|
||||
tool_triangle->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_triangle->set_toggle_mode(true);
|
||||
tool_triangle->set_button_group(bg);
|
||||
top_hb->add_child(tool_triangle);
|
||||
@ -917,7 +917,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
tool_erase_sep = memnew(VSeparator);
|
||||
top_hb->add_child(tool_erase_sep);
|
||||
tool_erase = memnew(Button);
|
||||
tool_erase->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_erase_selected));
|
||||
@ -926,7 +926,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
auto_triangles = memnew(Button);
|
||||
auto_triangles->set_theme_type_variation("FlatButton");
|
||||
auto_triangles->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(auto_triangles);
|
||||
auto_triangles->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_auto_triangles_toggled));
|
||||
auto_triangles->set_toggle_mode(true);
|
||||
@ -935,7 +935,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
|
||||
top_hb->add_child(memnew(VSeparator));
|
||||
|
||||
snap = memnew(Button);
|
||||
snap->set_theme_type_variation("FlatButton");
|
||||
snap->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
snap->set_toggle_mode(true);
|
||||
top_hb->add_child(snap);
|
||||
snap->set_pressed(true);
|
||||
|
@ -2013,27 +2013,27 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
hb->add_child(playback_container);
|
||||
|
||||
play_bw_from = memnew(Button);
|
||||
play_bw_from->set_theme_type_variation("FlatButton");
|
||||
play_bw_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw_from->set_tooltip_text(TTR("Play Animation Backwards"));
|
||||
playback_container->add_child(play_bw_from);
|
||||
|
||||
play_bw = memnew(Button);
|
||||
play_bw->set_theme_type_variation("FlatButton");
|
||||
play_bw->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw->set_tooltip_text(TTR("Play Animation Backwards from End"));
|
||||
playback_container->add_child(play_bw);
|
||||
|
||||
stop = memnew(Button);
|
||||
stop->set_theme_type_variation("FlatButton");
|
||||
stop->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
stop->set_tooltip_text(TTR("Pause/Stop Animation"));
|
||||
playback_container->add_child(stop);
|
||||
|
||||
play = memnew(Button);
|
||||
play->set_theme_type_variation("FlatButton");
|
||||
play->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play->set_tooltip_text(TTR("Play Animation from Start"));
|
||||
playback_container->add_child(play);
|
||||
|
||||
play_from = memnew(Button);
|
||||
play_from->set_theme_type_variation("FlatButton");
|
||||
play_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_from->set_tooltip_text(TTR("Play Animation"));
|
||||
playback_container->add_child(play_from);
|
||||
|
||||
@ -2084,7 +2084,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
animation->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_theme_type_variation("FlatButton");
|
||||
autoplay->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hb->add_child(autoplay);
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
|
||||
@ -2096,7 +2096,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
onion_toggle = memnew(Button);
|
||||
onion_toggle->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu).bind(ONION_SKINNING_ENABLE));
|
||||
@ -2126,7 +2126,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
|
||||
hb->add_child(memnew(VSeparator));
|
||||
|
||||
pin = memnew(Button);
|
||||
pin->set_theme_type_variation("FlatButton");
|
||||
pin->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pin->set_toggle_mode(true);
|
||||
pin->set_tooltip_text(TTR("Pin AnimationPlayer"));
|
||||
hb->add_child(pin);
|
||||
|
@ -1821,7 +1821,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
bg.instantiate();
|
||||
|
||||
tool_select = memnew(Button);
|
||||
tool_select->set_theme_type_variation("FlatButton");
|
||||
tool_select->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(tool_select);
|
||||
tool_select->set_toggle_mode(true);
|
||||
tool_select->set_button_group(bg);
|
||||
@ -1830,7 +1830,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
tool_select->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
tool_create = memnew(Button);
|
||||
tool_create->set_theme_type_variation("FlatButton");
|
||||
tool_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(tool_create);
|
||||
tool_create->set_toggle_mode(true);
|
||||
tool_create->set_button_group(bg);
|
||||
@ -1838,7 +1838,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
tool_create->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_update_mode), CONNECT_DEFERRED);
|
||||
|
||||
tool_connect = memnew(Button);
|
||||
tool_connect->set_theme_type_variation("FlatButton");
|
||||
tool_connect->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
top_hb->add_child(tool_connect);
|
||||
tool_connect->set_toggle_mode(true);
|
||||
tool_connect->set_button_group(bg);
|
||||
@ -1851,7 +1851,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
selection_tools_hb->add_child(memnew(VSeparator));
|
||||
|
||||
tool_erase = memnew(Button);
|
||||
tool_erase->set_theme_type_variation("FlatButton");
|
||||
tool_erase->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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);
|
||||
@ -1866,7 +1866,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||
transition_tools_hb->add_child(switch_mode);
|
||||
|
||||
auto_advance = memnew(Button);
|
||||
auto_advance->set_theme_type_variation("FlatButton");
|
||||
auto_advance->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
auto_advance->set_tooltip_text(TTR("New Transitions Should Auto Advance"));
|
||||
auto_advance->set_toggle_mode(true);
|
||||
auto_advance->set_pressed(true);
|
||||
|
@ -5369,7 +5369,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
viewport->add_child(controls_vb);
|
||||
|
||||
select_button = memnew(Button);
|
||||
select_button->set_theme_type_variation("FlatButton");
|
||||
select_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(select_button);
|
||||
select_button->set_toggle_mode(true);
|
||||
select_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SELECT));
|
||||
@ -5381,7 +5381,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
move_button = memnew(Button);
|
||||
move_button->set_theme_type_variation("FlatButton");
|
||||
move_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(move_button);
|
||||
move_button->set_toggle_mode(true);
|
||||
move_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_MOVE));
|
||||
@ -5390,7 +5390,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
move_button->set_tooltip_text(TTR("Move Mode"));
|
||||
|
||||
rotate_button = memnew(Button);
|
||||
rotate_button->set_theme_type_variation("FlatButton");
|
||||
rotate_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(rotate_button);
|
||||
rotate_button->set_toggle_mode(true);
|
||||
rotate_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_ROTATE));
|
||||
@ -5399,7 +5399,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
rotate_button->set_tooltip_text(TTR("Rotate Mode"));
|
||||
|
||||
scale_button = memnew(Button);
|
||||
scale_button->set_theme_type_variation("FlatButton");
|
||||
scale_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(scale_button);
|
||||
scale_button->set_toggle_mode(true);
|
||||
scale_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_SCALE));
|
||||
@ -5410,21 +5410,21 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
list_select_button = memnew(Button);
|
||||
list_select_button->set_theme_type_variation("FlatButton");
|
||||
list_select_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(list_select_button);
|
||||
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."));
|
||||
|
||||
pivot_button = memnew(Button);
|
||||
pivot_button->set_theme_type_variation("FlatButton");
|
||||
pivot_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(pivot_button);
|
||||
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."));
|
||||
|
||||
pan_button = memnew(Button);
|
||||
pan_button->set_theme_type_variation("FlatButton");
|
||||
pan_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(pan_button);
|
||||
pan_button->set_toggle_mode(true);
|
||||
pan_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_PAN));
|
||||
@ -5433,7 +5433,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
pan_button->set_tooltip_text(TTR("You can also use Pan View shortcut (Space by default) to pan in any mode."));
|
||||
|
||||
ruler_button = memnew(Button);
|
||||
ruler_button->set_theme_type_variation("FlatButton");
|
||||
ruler_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(ruler_button);
|
||||
ruler_button->set_toggle_mode(true);
|
||||
ruler_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_button_tool_select).bind(TOOL_RULER));
|
||||
@ -5444,7 +5444,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
smart_snap_button = memnew(Button);
|
||||
smart_snap_button->set_theme_type_variation("FlatButton");
|
||||
smart_snap_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(smart_snap_button);
|
||||
smart_snap_button->set_toggle_mode(true);
|
||||
smart_snap_button->connect(SceneStringName(toggled), callable_mp(this, &CanvasItemEditor::_button_toggle_smart_snap));
|
||||
@ -5453,7 +5453,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
smart_snap_button->set_shortcut_context(this);
|
||||
|
||||
grid_snap_button = memnew(Button);
|
||||
grid_snap_button->set_theme_type_variation("FlatButton");
|
||||
grid_snap_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(grid_snap_button);
|
||||
grid_snap_button->set_toggle_mode(true);
|
||||
grid_snap_button->connect(SceneStringName(toggled), callable_mp(this, &CanvasItemEditor::_button_toggle_grid_snap));
|
||||
@ -5495,7 +5495,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
lock_button = memnew(Button);
|
||||
lock_button->set_theme_type_variation("FlatButton");
|
||||
lock_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
main_menu_hbox->add_child(lock_button);
|
||||
|
||||
lock_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(LOCK_SELECTED));
|
||||
@ -5504,7 +5504,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
lock_button->set_shortcut(ED_GET_SHORTCUT("editor/lock_selected_nodes"));
|
||||
|
||||
unlock_button = memnew(Button);
|
||||
unlock_button->set_theme_type_variation("FlatButton");
|
||||
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));
|
||||
unlock_button->set_tooltip_text(TTR("Unlock selected node, allowing selection and movement."));
|
||||
@ -5512,7 +5512,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
unlock_button->set_shortcut(ED_GET_SHORTCUT("editor/unlock_selected_nodes"));
|
||||
|
||||
group_button = memnew(Button);
|
||||
group_button->set_theme_type_variation("FlatButton");
|
||||
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));
|
||||
group_button->set_tooltip_text(TTR("Groups the selected node with its children. This causes the parent to be selected when any child node is clicked in 2D and 3D view."));
|
||||
@ -5520,7 +5520,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
group_button->set_shortcut(ED_GET_SHORTCUT("editor/group_selected_nodes"));
|
||||
|
||||
ungroup_button = memnew(Button);
|
||||
ungroup_button->set_theme_type_variation("FlatButton");
|
||||
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));
|
||||
ungroup_button->set_tooltip_text(TTR("Ungroups the selected node from its children. Child nodes will be individual items in 2D and 3D view."));
|
||||
@ -5621,7 +5621,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
animation_hb->hide();
|
||||
|
||||
key_loc_button = memnew(Button);
|
||||
key_loc_button->set_theme_type_variation("FlatButton");
|
||||
key_loc_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_loc_button->set_toggle_mode(true);
|
||||
key_loc_button->set_pressed(true);
|
||||
key_loc_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -5630,7 +5630,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
animation_hb->add_child(key_loc_button);
|
||||
|
||||
key_rot_button = memnew(Button);
|
||||
key_rot_button->set_theme_type_variation("FlatButton");
|
||||
key_rot_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_rot_button->set_toggle_mode(true);
|
||||
key_rot_button->set_pressed(true);
|
||||
key_rot_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -5639,7 +5639,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
animation_hb->add_child(key_rot_button);
|
||||
|
||||
key_scale_button = memnew(Button);
|
||||
key_scale_button->set_theme_type_variation("FlatButton");
|
||||
key_scale_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_scale_button->set_toggle_mode(true);
|
||||
key_scale_button->set_focus_mode(FOCUS_NONE);
|
||||
key_scale_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_SCALE));
|
||||
@ -5647,7 +5647,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
animation_hb->add_child(key_scale_button);
|
||||
|
||||
key_insert_button = memnew(Button);
|
||||
key_insert_button->set_theme_type_variation("FlatButton");
|
||||
key_insert_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_insert_button->set_focus_mode(FOCUS_NONE);
|
||||
key_insert_button->connect(SceneStringName(pressed), callable_mp(this, &CanvasItemEditor::_popup_callback).bind(ANIM_INSERT_KEY));
|
||||
key_insert_button->set_tooltip_text(TTR("Insert keys (based on mask)."));
|
||||
@ -5656,7 +5656,7 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||
animation_hb->add_child(key_insert_button);
|
||||
|
||||
key_auto_insert_button = memnew(Button);
|
||||
key_auto_insert_button->set_theme_type_variation("FlatButton");
|
||||
key_auto_insert_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_auto_insert_button->set_toggle_mode(true);
|
||||
key_auto_insert_button->set_focus_mode(FOCUS_NONE);
|
||||
key_auto_insert_button->set_tooltip_text(TTR("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."));
|
||||
|
@ -531,7 +531,7 @@ void ControlEditorPopupButton::_notification(int p_what) {
|
||||
}
|
||||
|
||||
ControlEditorPopupButton::ControlEditorPopupButton() {
|
||||
set_theme_type_variation("FlatButton");
|
||||
set_theme_type_variation(SceneStringName(FlatButton));
|
||||
set_toggle_mode(true);
|
||||
set_focus_mode(FOCUS_NONE);
|
||||
|
||||
@ -1081,7 +1081,7 @@ ControlEditorToolbar::ControlEditorToolbar() {
|
||||
keep_ratio_button->connect(SceneStringName(pressed), callable_mp(this, &ControlEditorToolbar::_anchors_to_current_ratio));
|
||||
|
||||
anchor_mode_button = memnew(Button);
|
||||
anchor_mode_button->set_theme_type_variation("FlatButton");
|
||||
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."));
|
||||
add_child(anchor_mode_button);
|
||||
|
@ -346,13 +346,13 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
suspend_button = memnew(Button);
|
||||
main_menu_hbox->add_child(suspend_button);
|
||||
suspend_button->set_toggle_mode(true);
|
||||
suspend_button->set_theme_type_variation("FlatButton");
|
||||
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"));
|
||||
|
||||
next_frame_button = memnew(Button);
|
||||
main_menu_hbox->add_child(next_frame_button);
|
||||
next_frame_button->set_theme_type_variation("FlatButton");
|
||||
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"));
|
||||
|
||||
@ -363,7 +363,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_text(TTR("Input"));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_toggle_mode(true);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_pressed(true);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_theme_type_variation("FlatButton");
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_NONE));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_tooltip_text(TTR("Allow game input."));
|
||||
|
||||
@ -371,7 +371,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
main_menu_hbox->add_child(node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_text(TTR("2D"));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_toggle_mode(true);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_theme_type_variation("FlatButton");
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_2D));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_tooltip_text(TTR("Disable game input and allow to select Node2Ds, Controls, and manipulate the 2D camera."));
|
||||
|
||||
@ -380,7 +380,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
main_menu_hbox->add_child(node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_text(TTR("3D"));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_toggle_mode(true);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_theme_type_variation("FlatButton");
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_3D));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_tooltip_text(TTR("Disable game input and allow to select Node3Ds and manipulate the 3D camera."));
|
||||
#endif // _3D_DISABLED
|
||||
@ -390,7 +390,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
hide_selection = memnew(Button);
|
||||
main_menu_hbox->add_child(hide_selection);
|
||||
hide_selection->set_toggle_mode(true);
|
||||
hide_selection->set_theme_type_variation("FlatButton");
|
||||
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"));
|
||||
|
||||
@ -400,7 +400,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
main_menu_hbox->add_child(select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]);
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_toggle_mode(true);
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_pressed(true);
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_theme_type_variation("FlatButton");
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_select_mode_pressed).bind(RuntimeNodeSelect::SELECT_MODE_SINGLE));
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), Key::Q));
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_shortcut_context(this);
|
||||
@ -409,7 +409,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST] = memnew(Button);
|
||||
main_menu_hbox->add_child(select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]);
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->set_toggle_mode(true);
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->set_theme_type_variation("FlatButton");
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_select_mode_pressed).bind(RuntimeNodeSelect::SELECT_MODE_LIST));
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->set_tooltip_text(TTR("Show list of selectable nodes at position clicked."));
|
||||
|
||||
@ -418,7 +418,7 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger) {
|
||||
camera_override_button = memnew(Button);
|
||||
main_menu_hbox->add_child(camera_override_button);
|
||||
camera_override_button->set_toggle_mode(true);
|
||||
camera_override_button->set_theme_type_variation("FlatButton");
|
||||
camera_override_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
camera_override_button->connect(SceneStringName(toggled), callable_mp(this, &GameView::_camera_override_button_toggled));
|
||||
camera_override_button->set_tooltip_text(TTR("Override the in-game camera."));
|
||||
|
||||
|
@ -180,7 +180,7 @@ GPUParticlesCollisionSDF3DEditorPlugin::GPUParticlesCollisionSDF3DEditorPlugin()
|
||||
bake_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
bake_hb->hide();
|
||||
bake = memnew(Button);
|
||||
bake->set_theme_type_variation("FlatButton");
|
||||
bake->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
bake->set_text(TTR("Bake SDF"));
|
||||
bake->connect(SceneStringName(pressed), callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
|
||||
|
@ -178,7 +178,7 @@ void LightmapGIEditorPlugin::_bind_methods() {
|
||||
|
||||
LightmapGIEditorPlugin::LightmapGIEditorPlugin() {
|
||||
bake = memnew(Button);
|
||||
bake->set_theme_type_variation("FlatButton");
|
||||
bake->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
|
||||
// when the editor theme updates.
|
||||
bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
|
@ -840,7 +840,7 @@ NavigationObstacle3DEditorPlugin::NavigationObstacle3DEditorPlugin() {
|
||||
bg.instantiate();
|
||||
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
obstacle_editor->add_child(button_create);
|
||||
button_create->set_tooltip_text(TTR("Add Vertex"));
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &NavigationObstacle3DEditorPlugin::set_mode).bind(NavigationObstacle3DEditorPlugin::MODE_CREATE));
|
||||
@ -848,27 +848,27 @@ NavigationObstacle3DEditorPlugin::NavigationObstacle3DEditorPlugin() {
|
||||
button_create->set_button_group(bg);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation("FlatButton");
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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);
|
||||
button_edit->set_button_group(bg);
|
||||
|
||||
button_delete = memnew(Button);
|
||||
button_delete->set_theme_type_variation("FlatButton");
|
||||
button_delete->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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);
|
||||
button_delete->set_button_group(bg);
|
||||
|
||||
button_flip = memnew(Button);
|
||||
button_flip->set_theme_type_variation("FlatButton");
|
||||
button_flip->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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("FlatButton");
|
||||
button_clear->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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);
|
||||
|
@ -8696,7 +8696,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_SELECT] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_SELECT]);
|
||||
tool_button[TOOL_MODE_SELECT]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_SELECT]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_SELECT]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_MODE_SELECT]->set_pressed(true);
|
||||
tool_button[TOOL_MODE_SELECT]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SELECT));
|
||||
tool_button[TOOL_MODE_SELECT]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_select", TTR("Select Mode"), Key::Q));
|
||||
@ -8707,7 +8707,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_MOVE] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_MOVE]);
|
||||
tool_button[TOOL_MODE_MOVE]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_MOVE]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_MOVE]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
|
||||
tool_button[TOOL_MODE_MOVE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_MOVE));
|
||||
tool_button[TOOL_MODE_MOVE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_move", TTR("Move Mode"), Key::W));
|
||||
@ -8717,7 +8717,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_ROTATE] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_ROTATE]);
|
||||
tool_button[TOOL_MODE_ROTATE]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_ROTATE]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_ROTATE]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_MODE_ROTATE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_ROTATE));
|
||||
tool_button[TOOL_MODE_ROTATE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_rotate", TTR("Rotate Mode"), Key::E));
|
||||
tool_button[TOOL_MODE_ROTATE]->set_shortcut_context(this);
|
||||
@ -8726,7 +8726,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_SCALE] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_SCALE]);
|
||||
tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_SCALE]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_MODE_SCALE]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_MODE_SCALE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SCALE));
|
||||
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), Key::R));
|
||||
tool_button[TOOL_MODE_SCALE]->set_shortcut_context(this);
|
||||
@ -8737,13 +8737,13 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_button[TOOL_MODE_LIST_SELECT] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_MODE_LIST_SELECT]);
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_toggle_mode(true);
|
||||
tool_button[TOOL_MODE_LIST_SELECT]->set_theme_type_variation("FlatButton");
|
||||
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_LOCK_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_LOCK_SELECTED]);
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_LOCK_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_LOCK_SELECTED));
|
||||
tool_button[TOOL_LOCK_SELECTED]->set_tooltip_text(TTR("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.
|
||||
@ -8751,7 +8751,7 @@ Node3DEditor::Node3DEditor() {
|
||||
|
||||
tool_button[TOOL_UNLOCK_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_UNLOCK_SELECTED]);
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNLOCK_SELECTED));
|
||||
tool_button[TOOL_UNLOCK_SELECTED]->set_tooltip_text(TTR("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.
|
||||
@ -8759,7 +8759,7 @@ Node3DEditor::Node3DEditor() {
|
||||
|
||||
tool_button[TOOL_GROUP_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_GROUP_SELECTED]);
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_GROUP_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_GROUP_SELECTED));
|
||||
tool_button[TOOL_GROUP_SELECTED]->set_tooltip_text(TTR("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.
|
||||
@ -8767,7 +8767,7 @@ Node3DEditor::Node3DEditor() {
|
||||
|
||||
tool_button[TOOL_UNGROUP_SELECTED] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_button[TOOL_UNGROUP_SELECTED]);
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_theme_type_variation("FlatButton");
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_UNGROUP_SELECTED));
|
||||
tool_button[TOOL_UNGROUP_SELECTED]->set_tooltip_text(TTR("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.
|
||||
@ -8778,7 +8778,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_option_button[TOOL_OPT_LOCAL_COORDS]);
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_toggle_mode(true);
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_theme_type_variation("FlatButton");
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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", TTR("Use Local Space"), Key::T));
|
||||
tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_shortcut_context(this);
|
||||
@ -8786,7 +8786,7 @@ Node3DEditor::Node3DEditor() {
|
||||
tool_option_button[TOOL_OPT_USE_SNAP] = memnew(Button);
|
||||
main_menu_hbox->add_child(tool_option_button[TOOL_OPT_USE_SNAP]);
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_toggle_mode(true);
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_theme_type_variation("FlatButton");
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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", TTR("Use Snap"), Key::Y));
|
||||
tool_option_button[TOOL_OPT_USE_SNAP]->set_shortcut_context(this);
|
||||
@ -8795,7 +8795,7 @@ Node3DEditor::Node3DEditor() {
|
||||
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_theme_type_variation("FlatButton");
|
||||
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.
|
||||
sun_button->set_pressed(true);
|
||||
@ -8805,7 +8805,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_theme_type_variation("FlatButton");
|
||||
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.
|
||||
environ_button->set_pressed(true);
|
||||
@ -8814,7 +8814,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("FlatButton");
|
||||
sun_environ_settings->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
sun_environ_settings->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_sun_environ_settings_pressed));
|
||||
|
||||
main_menu_hbox->add_child(sun_environ_settings);
|
||||
|
@ -104,7 +104,7 @@ void OccluderInstance3DEditorPlugin::_bind_methods() {
|
||||
|
||||
OccluderInstance3DEditorPlugin::OccluderInstance3DEditorPlugin() {
|
||||
bake = memnew(Button);
|
||||
bake->set_theme_type_variation("FlatButton");
|
||||
bake->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
bake->set_text(TTR("Bake Occluders"));
|
||||
bake->hide();
|
||||
|
@ -682,7 +682,7 @@ Path2DEditor::Path2DEditor() {
|
||||
toolbar = memnew(HBoxContainer);
|
||||
|
||||
curve_edit = memnew(Button);
|
||||
curve_edit->set_theme_type_variation("FlatButton");
|
||||
curve_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_edit->set_toggle_mode(true);
|
||||
curve_edit->set_pressed(true);
|
||||
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
||||
@ -691,7 +691,7 @@ Path2DEditor::Path2DEditor() {
|
||||
toolbar->add_child(curve_edit);
|
||||
|
||||
curve_edit_curve = memnew(Button);
|
||||
curve_edit_curve->set_theme_type_variation("FlatButton");
|
||||
curve_edit_curve->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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)"));
|
||||
@ -699,7 +699,7 @@ Path2DEditor::Path2DEditor() {
|
||||
toolbar->add_child(curve_edit_curve);
|
||||
|
||||
curve_create = memnew(Button);
|
||||
curve_create->set_theme_type_variation("FlatButton");
|
||||
curve_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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"));
|
||||
@ -707,7 +707,7 @@ Path2DEditor::Path2DEditor() {
|
||||
toolbar->add_child(curve_create);
|
||||
|
||||
curve_del = memnew(Button);
|
||||
curve_del->set_theme_type_variation("FlatButton");
|
||||
curve_del->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_del->set_toggle_mode(true);
|
||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_del->set_tooltip_text(TTR("Delete Point"));
|
||||
@ -715,14 +715,14 @@ Path2DEditor::Path2DEditor() {
|
||||
toolbar->add_child(curve_del);
|
||||
|
||||
curve_close = memnew(Button);
|
||||
curve_close->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CLOSE));
|
||||
toolbar->add_child(curve_close);
|
||||
|
||||
curve_clear_points = memnew(Button);
|
||||
curve_clear_points->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &Path2DEditor::_confirm_clear_points));
|
||||
|
@ -873,7 +873,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
topmenu_bar->add_child(toolbar);
|
||||
|
||||
curve_edit = memnew(Button);
|
||||
curve_edit->set_theme_type_variation("FlatButton");
|
||||
curve_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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"));
|
||||
@ -881,7 +881,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT));
|
||||
|
||||
curve_edit_curve = memnew(Button);
|
||||
curve_edit_curve->set_theme_type_variation("FlatButton");
|
||||
curve_edit_curve->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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"));
|
||||
@ -889,7 +889,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
curve_edit_curve->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_CURVE));
|
||||
|
||||
curve_edit_tilt = memnew(Button);
|
||||
curve_edit_tilt->set_theme_type_variation("FlatButton");
|
||||
curve_edit_tilt->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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"));
|
||||
@ -897,7 +897,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
curve_edit_tilt->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_EDIT_TILT));
|
||||
|
||||
curve_create = memnew(Button);
|
||||
curve_create->set_theme_type_variation("FlatButton");
|
||||
curve_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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)"));
|
||||
@ -905,7 +905,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
curve_create->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_CREATE));
|
||||
|
||||
curve_del = memnew(Button);
|
||||
curve_del->set_theme_type_variation("FlatButton");
|
||||
curve_del->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_del->set_toggle_mode(true);
|
||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_del->set_tooltip_text(TTR("Delete Point"));
|
||||
@ -913,14 +913,14 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
|
||||
curve_del->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_mode_changed).bind(MODE_DELETE));
|
||||
|
||||
curve_closed = memnew(Button);
|
||||
curve_closed->set_theme_type_variation("FlatButton");
|
||||
curve_closed->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
curve_closed->set_focus_mode(Control::FOCUS_NONE);
|
||||
curve_closed->set_tooltip_text(TTR("Close Curve"));
|
||||
toolbar->add_child(curve_closed);
|
||||
curve_closed->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_toggle_closed_curve));
|
||||
|
||||
curve_clear_points = memnew(Button);
|
||||
curve_clear_points->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &Path3DEditorPlugin::_confirm_clear_points));
|
||||
|
@ -54,7 +54,7 @@ PhysicalBone3DEditor::PhysicalBone3DEditor() {
|
||||
Node3DEditor::get_singleton()->add_control_to_menu_panel(spatial_editor_hb);
|
||||
|
||||
button_transform_joint = memnew(Button);
|
||||
button_transform_joint->set_theme_type_variation("FlatButton");
|
||||
button_transform_joint->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
spatial_editor_hb->add_child(button_transform_joint);
|
||||
|
||||
button_transform_joint->set_text(TTR("Move Joint"));
|
||||
|
@ -1343,7 +1343,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
snap_show_grid = EditorSettings::get_singleton()->get_project_metadata("polygon_2d_uv_editor", "show_grid", false);
|
||||
|
||||
button_uv = memnew(Button);
|
||||
button_uv->set_theme_type_variation("FlatButton");
|
||||
button_uv->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
add_child(button_uv);
|
||||
button_uv->set_tooltip_text(TTR("Open Polygon 2D UV editor."));
|
||||
button_uv->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_menu_option).bind(MODE_EDIT_UV));
|
||||
@ -1397,7 +1397,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
uv_main_vb->add_child(uv_mode_hb);
|
||||
for (int i = 0; i < UV_MODE_MAX; i++) {
|
||||
uv_button[i] = memnew(Button);
|
||||
uv_button[i]->set_theme_type_variation("FlatButton");
|
||||
uv_button[i]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
uv_button[i]->set_toggle_mode(true);
|
||||
uv_mode_hb->add_child(uv_button[i]);
|
||||
uv_button[i]->connect(SceneStringName(pressed), callable_mp(this, &Polygon2DEditor::_uv_mode).bind(i));
|
||||
@ -1486,7 +1486,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
uv_mode_hb->add_child(memnew(VSeparator));
|
||||
|
||||
b_snap_enable = memnew(Button);
|
||||
b_snap_enable->set_theme_type_variation("FlatButton");
|
||||
b_snap_enable->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
uv_mode_hb->add_child(b_snap_enable);
|
||||
b_snap_enable->set_text(TTR("Snap"));
|
||||
b_snap_enable->set_focus_mode(FOCUS_NONE);
|
||||
@ -1496,7 +1496,7 @@ Polygon2DEditor::Polygon2DEditor() {
|
||||
b_snap_enable->connect(SceneStringName(toggled), callable_mp(this, &Polygon2DEditor::_set_use_snap));
|
||||
|
||||
b_snap_grid = memnew(Button);
|
||||
b_snap_grid->set_theme_type_variation("FlatButton");
|
||||
b_snap_grid->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
uv_mode_hb->add_child(b_snap_grid);
|
||||
b_snap_grid->set_text(TTR("Grid"));
|
||||
b_snap_grid->set_focus_mode(FOCUS_NONE);
|
||||
|
@ -536,13 +536,13 @@ Polygon3DEditor::Polygon3DEditor() {
|
||||
node = nullptr;
|
||||
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
add_child(button_create);
|
||||
button_create->connect(SceneStringName(pressed), callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_CREATE));
|
||||
button_create->set_toggle_mode(true);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation("FlatButton");
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
add_child(button_edit);
|
||||
button_edit->connect(SceneStringName(pressed), callable_mp(this, &Polygon3DEditor::_menu_option).bind(MODE_EDIT));
|
||||
button_edit->set_toggle_mode(true);
|
||||
|
@ -1024,7 +1024,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
|
||||
edit_mode_button = memnew(Button);
|
||||
topmenu_bar->add_child(edit_mode_button);
|
||||
edit_mode_button->set_theme_type_variation("FlatButton");
|
||||
edit_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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."));
|
||||
@ -1044,7 +1044,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
animation_hb->hide();
|
||||
|
||||
key_loc_button = memnew(Button);
|
||||
key_loc_button->set_theme_type_variation("FlatButton");
|
||||
key_loc_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_loc_button->set_toggle_mode(true);
|
||||
key_loc_button->set_pressed(false);
|
||||
key_loc_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -1052,7 +1052,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
animation_hb->add_child(key_loc_button);
|
||||
|
||||
key_rot_button = memnew(Button);
|
||||
key_rot_button->set_theme_type_variation("FlatButton");
|
||||
key_rot_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_rot_button->set_toggle_mode(true);
|
||||
key_rot_button->set_pressed(true);
|
||||
key_rot_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -1060,7 +1060,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
animation_hb->add_child(key_rot_button);
|
||||
|
||||
key_scale_button = memnew(Button);
|
||||
key_scale_button->set_theme_type_variation("FlatButton");
|
||||
key_scale_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_scale_button->set_toggle_mode(true);
|
||||
key_scale_button->set_pressed(false);
|
||||
key_scale_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -1068,7 +1068,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
animation_hb->add_child(key_scale_button);
|
||||
|
||||
key_insert_button = memnew(Button);
|
||||
key_insert_button->set_theme_type_variation("FlatButton");
|
||||
key_insert_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
key_insert_button->set_focus_mode(FOCUS_NONE);
|
||||
key_insert_button->connect(SceneStringName(pressed), callable_mp(this, &Skeleton3DEditor::insert_keys).bind(false));
|
||||
key_insert_button->set_tooltip_text(TTR("Insert key (based on mask) for bones with an existing track."));
|
||||
@ -1076,7 +1076,7 @@ void Skeleton3DEditor::create_editors() {
|
||||
animation_hb->add_child(key_insert_button);
|
||||
|
||||
key_insert_all_button = memnew(Button);
|
||||
key_insert_all_button->set_theme_type_variation("FlatButton");
|
||||
key_insert_all_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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(TTR("Insert key (based on mask) for all bones."));
|
||||
|
@ -1898,7 +1898,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
sub_vb->add_child(hbc_animlist);
|
||||
|
||||
add_anim = memnew(Button);
|
||||
add_anim->set_theme_type_variation("FlatButton");
|
||||
add_anim->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_animlist->add_child(add_anim);
|
||||
add_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_add));
|
||||
|
||||
@ -1908,7 +1908,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
duplicate_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_duplicate));
|
||||
|
||||
delete_anim = memnew(Button);
|
||||
delete_anim->set_theme_type_variation("FlatButton");
|
||||
delete_anim->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_animlist->add_child(delete_anim);
|
||||
delete_anim->set_disabled(true);
|
||||
delete_anim->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_animation_remove));
|
||||
@ -1919,7 +1919,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
autoplay_container->add_child(memnew(VSeparator));
|
||||
|
||||
autoplay = memnew(Button);
|
||||
autoplay->set_theme_type_variation("FlatButton");
|
||||
autoplay->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
autoplay->set_tooltip_text(TTR("Autoplay on Load"));
|
||||
autoplay_container->add_child(autoplay);
|
||||
|
||||
@ -1927,7 +1927,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
|
||||
anim_loop = memnew(Button);
|
||||
anim_loop->set_toggle_mode(true);
|
||||
anim_loop->set_theme_type_variation("FlatButton");
|
||||
anim_loop->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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);
|
||||
@ -1991,27 +1991,27 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
hfc->add_child(playback_container);
|
||||
|
||||
play_bw_from = memnew(Button);
|
||||
play_bw_from->set_theme_type_variation("FlatButton");
|
||||
play_bw_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw_from->set_tooltip_text(TTR("Play selected animation backwards from current pos. (A)"));
|
||||
playback_container->add_child(play_bw_from);
|
||||
|
||||
play_bw = memnew(Button);
|
||||
play_bw->set_theme_type_variation("FlatButton");
|
||||
play_bw->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_bw->set_tooltip_text(TTR("Play selected animation backwards from end. (Shift+A)"));
|
||||
playback_container->add_child(play_bw);
|
||||
|
||||
stop = memnew(Button);
|
||||
stop->set_theme_type_variation("FlatButton");
|
||||
stop->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
stop->set_tooltip_text(TTR("Pause/stop animation playback. (S)"));
|
||||
playback_container->add_child(stop);
|
||||
|
||||
play = memnew(Button);
|
||||
play->set_theme_type_variation("FlatButton");
|
||||
play->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play->set_tooltip_text(TTR("Play selected animation from start. (Shift+D)"));
|
||||
playback_container->add_child(play);
|
||||
|
||||
play_from = memnew(Button);
|
||||
play_from->set_theme_type_variation("FlatButton");
|
||||
play_from->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
play_from->set_tooltip_text(TTR("Play selected animation from current pos. (D)"));
|
||||
playback_container->add_child(play_from);
|
||||
|
||||
@ -2029,45 +2029,45 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
hfc->add_child(hbc_actions);
|
||||
|
||||
load = memnew(Button);
|
||||
load->set_theme_type_variation("FlatButton");
|
||||
load->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(load);
|
||||
|
||||
load_sheet = memnew(Button);
|
||||
load_sheet->set_theme_type_variation("FlatButton");
|
||||
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_theme_type_variation("FlatButton");
|
||||
copy->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(copy);
|
||||
|
||||
paste = memnew(Button);
|
||||
paste->set_theme_type_variation("FlatButton");
|
||||
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_theme_type_variation("FlatButton");
|
||||
empty_before->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(empty_before);
|
||||
|
||||
empty_after = memnew(Button);
|
||||
empty_after->set_theme_type_variation("FlatButton");
|
||||
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_theme_type_variation("FlatButton");
|
||||
move_up->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(move_up);
|
||||
|
||||
move_down = memnew(Button);
|
||||
move_down->set_theme_type_variation("FlatButton");
|
||||
move_down->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(move_down);
|
||||
|
||||
delete_frame = memnew(Button);
|
||||
delete_frame->set_theme_type_variation("FlatButton");
|
||||
delete_frame->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
hbc_actions->add_child(delete_frame);
|
||||
|
||||
hbc_actions->add_child(memnew(VSeparator));
|
||||
@ -2235,7 +2235,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
|
||||
toggle_settings_button = memnew(Button);
|
||||
toggle_settings_button->set_h_size_flags(SIZE_SHRINK_END);
|
||||
toggle_settings_button->set_theme_type_variation("FlatButton");
|
||||
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"));
|
||||
split_sheet_menu_hb->add_child(toggle_settings_button);
|
||||
@ -2273,21 +2273,21 @@ SpriteFramesEditor::SpriteFramesEditor() {
|
||||
split_sheet_zoom_margin->add_child(split_sheet_zoom_hb);
|
||||
|
||||
split_sheet_zoom_out = memnew(Button);
|
||||
split_sheet_zoom_out->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_out));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_out);
|
||||
|
||||
split_sheet_zoom_reset = memnew(Button);
|
||||
split_sheet_zoom_reset->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_reset));
|
||||
split_sheet_zoom_hb->add_child(split_sheet_zoom_reset);
|
||||
|
||||
split_sheet_zoom_in = memnew(Button);
|
||||
split_sheet_zoom_in->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(this, &SpriteFramesEditor::_sheet_zoom_in));
|
||||
|
@ -246,7 +246,7 @@ ThemeEditorPreview::ThemeEditorPreview() {
|
||||
|
||||
picker_button = memnew(Button);
|
||||
preview_toolbar->add_child(picker_button);
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
picker_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_tooltip_text(TTR("Toggle the control picker, allowing to visually select control types for edit."));
|
||||
picker_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeEditorPreview::_picker_button_cbk));
|
||||
|
@ -918,7 +918,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||
tools_button_group.instantiate();
|
||||
|
||||
button_expand = memnew(Button);
|
||||
button_expand->set_theme_type_variation("FlatButton");
|
||||
button_expand->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_expand->set_toggle_mode(true);
|
||||
button_expand->set_pressed(false);
|
||||
button_expand->set_tooltip_text(TTR("Expand editor"));
|
||||
@ -928,7 +928,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||
toolbar->add_child(memnew(VSeparator));
|
||||
|
||||
button_create = memnew(Button);
|
||||
button_create->set_theme_type_variation("FlatButton");
|
||||
button_create->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_create->set_toggle_mode(true);
|
||||
button_create->set_button_group(tools_button_group);
|
||||
button_create->set_pressed(true);
|
||||
@ -936,14 +936,14 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||
toolbar->add_child(button_create);
|
||||
|
||||
button_edit = memnew(Button);
|
||||
button_edit->set_theme_type_variation("FlatButton");
|
||||
button_edit->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_edit->set_toggle_mode(true);
|
||||
button_edit->set_button_group(tools_button_group);
|
||||
button_edit->set_tooltip_text(TTR("Edit points tool"));
|
||||
toolbar->add_child(button_edit);
|
||||
|
||||
button_delete = memnew(Button);
|
||||
button_delete->set_theme_type_variation("FlatButton");
|
||||
button_delete->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_delete->set_toggle_mode(true);
|
||||
button_delete->set_button_group(tools_button_group);
|
||||
button_delete->set_tooltip_text(TTR("Delete points tool"));
|
||||
@ -1015,7 +1015,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
|
||||
button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
|
||||
button_center_view->set_grow_direction_preset(Control::PRESET_TOP_RIGHT);
|
||||
button_center_view->connect(SceneStringName(pressed), callable_mp(this, &GenericTilePolygonEditor::_center_view));
|
||||
button_center_view->set_theme_type_variation("FlatButton");
|
||||
button_center_view->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
button_center_view->set_tooltip_text(TTR("Center View"));
|
||||
button_center_view->set_disabled(true);
|
||||
root->add_child(button_center_view);
|
||||
@ -1379,7 +1379,7 @@ TileDataDefaultEditor::TileDataDefaultEditor() {
|
||||
add_child(label);
|
||||
|
||||
picker_button = memnew(Button);
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
picker_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/picker"));
|
||||
toolbar->add_child(picker_button);
|
||||
@ -2880,7 +2880,7 @@ TileDataTerrainsEditor::TileDataTerrainsEditor() {
|
||||
|
||||
// Toolbar
|
||||
picker_button = memnew(Button);
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
picker_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/picker"));
|
||||
toolbar->add_child(picker_button);
|
||||
|
@ -2208,7 +2208,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
tool_buttons_group.instantiate();
|
||||
|
||||
select_tool_button = memnew(Button);
|
||||
select_tool_button->set_theme_type_variation("FlatButton");
|
||||
select_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_tool_button->set_toggle_mode(true);
|
||||
select_tool_button->set_button_group(tool_buttons_group);
|
||||
select_tool_button->set_shortcut(ED_SHORTCUT("tiles_editor/selection_tool", TTR("Selection"), Key::S));
|
||||
@ -2217,7 +2217,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
viewport_shortcut_buttons.push_back(select_tool_button);
|
||||
|
||||
paint_tool_button = memnew(Button);
|
||||
paint_tool_button->set_theme_type_variation("FlatButton");
|
||||
paint_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
paint_tool_button->set_toggle_mode(true);
|
||||
paint_tool_button->set_button_group(tool_buttons_group);
|
||||
paint_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/paint_tool"));
|
||||
@ -2227,7 +2227,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
viewport_shortcut_buttons.push_back(paint_tool_button);
|
||||
|
||||
line_tool_button = memnew(Button);
|
||||
line_tool_button->set_theme_type_variation("FlatButton");
|
||||
line_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
line_tool_button->set_toggle_mode(true);
|
||||
line_tool_button->set_button_group(tool_buttons_group);
|
||||
// TRANSLATORS: This refers to the line tool in the tilemap editor.
|
||||
@ -2237,7 +2237,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
viewport_shortcut_buttons.push_back(line_tool_button);
|
||||
|
||||
rect_tool_button = memnew(Button);
|
||||
rect_tool_button->set_theme_type_variation("FlatButton");
|
||||
rect_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
rect_tool_button->set_toggle_mode(true);
|
||||
rect_tool_button->set_button_group(tool_buttons_group);
|
||||
rect_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/rect_tool"));
|
||||
@ -2246,7 +2246,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
viewport_shortcut_buttons.push_back(rect_tool_button);
|
||||
|
||||
bucket_tool_button = memnew(Button);
|
||||
bucket_tool_button->set_theme_type_variation("FlatButton");
|
||||
bucket_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bucket_tool_button->set_toggle_mode(true);
|
||||
bucket_tool_button->set_button_group(tool_buttons_group);
|
||||
bucket_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/bucket_tool"));
|
||||
@ -2264,7 +2264,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
|
||||
// Picker
|
||||
picker_button = memnew(Button);
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
picker_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
picker_button->set_toggle_mode(true);
|
||||
picker_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/picker"));
|
||||
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;
|
||||
@ -2275,7 +2275,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
|
||||
// Erase button.
|
||||
erase_button = memnew(Button);
|
||||
erase_button->set_theme_type_variation("FlatButton");
|
||||
erase_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
erase_button->set_toggle_mode(true);
|
||||
erase_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/eraser"));
|
||||
erase_button->set_tooltip_text(TTR("Alternatively use RMB to erase tiles."));
|
||||
@ -2289,28 +2289,28 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
transform_toolbar->add_child(memnew(VSeparator));
|
||||
|
||||
transform_button_rotate_left = memnew(Button);
|
||||
transform_button_rotate_left->set_theme_type_variation("FlatButton");
|
||||
transform_button_rotate_left->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
transform_button_rotate_left->set_shortcut(ED_SHORTCUT("tiles_editor/rotate_tile_left", TTR("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));
|
||||
viewport_shortcut_buttons.push_back(transform_button_rotate_left);
|
||||
|
||||
transform_button_rotate_right = memnew(Button);
|
||||
transform_button_rotate_right->set_theme_type_variation("FlatButton");
|
||||
transform_button_rotate_right->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
transform_button_rotate_right->set_shortcut(ED_SHORTCUT("tiles_editor/rotate_tile_right", TTR("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));
|
||||
viewport_shortcut_buttons.push_back(transform_button_rotate_right);
|
||||
|
||||
transform_button_flip_h = memnew(Button);
|
||||
transform_button_flip_h->set_theme_type_variation("FlatButton");
|
||||
transform_button_flip_h->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
transform_button_flip_h->set_shortcut(ED_SHORTCUT("tiles_editor/flip_tile_horizontal", TTR("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));
|
||||
viewport_shortcut_buttons.push_back(transform_button_flip_h);
|
||||
|
||||
transform_button_flip_v = memnew(Button);
|
||||
transform_button_flip_v->set_theme_type_variation("FlatButton");
|
||||
transform_button_flip_v->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
transform_button_flip_v->set_shortcut(ED_SHORTCUT("tiles_editor/flip_tile_vertical", TTR("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));
|
||||
@ -2329,7 +2329,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
|
||||
|
||||
// Random tile checkbox.
|
||||
random_tile_toggle = memnew(Button);
|
||||
random_tile_toggle->set_theme_type_variation("FlatButton");
|
||||
random_tile_toggle->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
@ -3553,7 +3553,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
tool_buttons_group.instantiate();
|
||||
|
||||
paint_tool_button = memnew(Button);
|
||||
paint_tool_button->set_theme_type_variation("FlatButton");
|
||||
paint_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
paint_tool_button->set_toggle_mode(true);
|
||||
paint_tool_button->set_button_group(tool_buttons_group);
|
||||
paint_tool_button->set_pressed(true);
|
||||
@ -3563,7 +3563,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
viewport_shortcut_buttons.push_back(paint_tool_button);
|
||||
|
||||
line_tool_button = memnew(Button);
|
||||
line_tool_button->set_theme_type_variation("FlatButton");
|
||||
line_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
line_tool_button->set_toggle_mode(true);
|
||||
line_tool_button->set_button_group(tool_buttons_group);
|
||||
line_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/line_tool"));
|
||||
@ -3572,7 +3572,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
viewport_shortcut_buttons.push_back(line_tool_button);
|
||||
|
||||
rect_tool_button = memnew(Button);
|
||||
rect_tool_button->set_theme_type_variation("FlatButton");
|
||||
rect_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
rect_tool_button->set_toggle_mode(true);
|
||||
rect_tool_button->set_button_group(tool_buttons_group);
|
||||
rect_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/rect_tool"));
|
||||
@ -3581,7 +3581,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
viewport_shortcut_buttons.push_back(rect_tool_button);
|
||||
|
||||
bucket_tool_button = memnew(Button);
|
||||
bucket_tool_button->set_theme_type_variation("FlatButton");
|
||||
bucket_tool_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bucket_tool_button->set_toggle_mode(true);
|
||||
bucket_tool_button->set_button_group(tool_buttons_group);
|
||||
bucket_tool_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/bucket_tool"));
|
||||
@ -3600,7 +3600,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
|
||||
// Picker
|
||||
picker_button = memnew(Button);
|
||||
picker_button->set_theme_type_variation("FlatButton");
|
||||
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->connect(SceneStringName(pressed), callable_mp(CanvasItemEditor::get_singleton(), &CanvasItemEditor::update_viewport));
|
||||
@ -3609,7 +3609,7 @@ TileMapLayerEditorTerrainsPlugin::TileMapLayerEditorTerrainsPlugin() {
|
||||
|
||||
// Erase button.
|
||||
erase_button = memnew(Button);
|
||||
erase_button->set_theme_type_variation("FlatButton");
|
||||
erase_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
@ -4467,19 +4467,19 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
||||
layer_selection_hbox->add_child(layers_selection_button);
|
||||
|
||||
select_previous_layer = memnew(Button);
|
||||
select_previous_layer->set_theme_type_variation("FlatButton");
|
||||
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));
|
||||
layer_selection_hbox->add_child(select_previous_layer);
|
||||
|
||||
select_next_layer = memnew(Button);
|
||||
select_next_layer->set_theme_type_variation("FlatButton");
|
||||
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));
|
||||
layer_selection_hbox->add_child(select_next_layer);
|
||||
|
||||
select_all_layers = memnew(Button);
|
||||
select_all_layers->set_theme_type_variation("FlatButton");
|
||||
select_all_layers->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_all_layers->set_text(TTR("Select all layers"));
|
||||
select_all_layers->connect(SceneStringName(pressed), callable_mp(this, &TileMapLayerEditor::_select_all_layers_pressed));
|
||||
select_all_layers->set_tooltip_text(TTR("Select all TileMapLayers in scene"));
|
||||
@ -4487,7 +4487,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
||||
|
||||
// Highlighting selected layer.
|
||||
toggle_highlight_selected_layer_button = memnew(Button);
|
||||
toggle_highlight_selected_layer_button->set_theme_type_variation("FlatButton");
|
||||
toggle_highlight_selected_layer_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
toggle_highlight_selected_layer_button->set_toggle_mode(true);
|
||||
toggle_highlight_selected_layer_button->set_pressed(true);
|
||||
toggle_highlight_selected_layer_button->connect(SceneStringName(toggled), callable_mp(this, &TileMapLayerEditor::_highlight_selected_layer_button_toggled));
|
||||
@ -4498,7 +4498,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
||||
|
||||
// Grid toggle.
|
||||
toggle_grid_button = memnew(Button);
|
||||
toggle_grid_button->set_theme_type_variation("FlatButton");
|
||||
toggle_grid_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
@ -4507,7 +4507,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
|
||||
// Advanced settings menu button.
|
||||
advanced_menu_button = memnew(MenuButton);
|
||||
advanced_menu_button->set_flat(false);
|
||||
advanced_menu_button->set_theme_type_variation("FlatButton");
|
||||
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);
|
||||
advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileMapLayerEditor::_advanced_menu_button_id_pressed));
|
||||
|
@ -2527,7 +2527,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
||||
|
||||
tool_setup_atlas_source_button = memnew(Button);
|
||||
tool_setup_atlas_source_button->set_text(TTR("Setup"));
|
||||
tool_setup_atlas_source_button->set_theme_type_variation("FlatButton");
|
||||
tool_setup_atlas_source_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_setup_atlas_source_button->set_toggle_mode(true);
|
||||
tool_setup_atlas_source_button->set_pressed(true);
|
||||
tool_setup_atlas_source_button->set_button_group(tools_button_group);
|
||||
@ -2536,7 +2536,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
||||
|
||||
tool_select_button = memnew(Button);
|
||||
tool_select_button->set_text(TTR("Select"));
|
||||
tool_select_button->set_theme_type_variation("FlatButton");
|
||||
tool_select_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_select_button->set_toggle_mode(true);
|
||||
tool_select_button->set_pressed(false);
|
||||
tool_select_button->set_button_group(tools_button_group);
|
||||
@ -2545,7 +2545,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
||||
|
||||
tool_paint_button = memnew(Button);
|
||||
tool_paint_button->set_text(TTR("Paint"));
|
||||
tool_paint_button->set_theme_type_variation("FlatButton");
|
||||
tool_paint_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tool_paint_button->set_toggle_mode(true);
|
||||
tool_paint_button->set_button_group(tools_button_group);
|
||||
toolbox->add_child(tool_paint_button);
|
||||
@ -2626,7 +2626,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
|
||||
tool_settings->add_child(tool_settings_tile_data_toolbar_container);
|
||||
|
||||
tools_settings_erase_button = memnew(Button);
|
||||
tools_settings_erase_button->set_theme_type_variation("FlatButton");
|
||||
tools_settings_erase_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
tools_settings_erase_button->set_toggle_mode(true);
|
||||
tools_settings_erase_button->set_shortcut(ED_GET_SHORTCUT("tiles_editor/eraser"));
|
||||
tools_settings_erase_button->set_shortcut_context(this);
|
||||
|
@ -845,7 +845,7 @@ TileSetEditor::TileSetEditor() {
|
||||
|
||||
source_sort_button = memnew(MenuButton);
|
||||
source_sort_button->set_flat(false);
|
||||
source_sort_button->set_theme_type_variation("FlatButton");
|
||||
source_sort_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
source_sort_button->set_tooltip_text(TTR("Sort Sources"));
|
||||
|
||||
PopupMenu *p = source_sort_button->get_popup();
|
||||
@ -876,14 +876,14 @@ TileSetEditor::TileSetEditor() {
|
||||
split_container_left_side->add_child(sources_bottom_actions);
|
||||
|
||||
sources_delete_button = memnew(Button);
|
||||
sources_delete_button->set_theme_type_variation("FlatButton");
|
||||
sources_delete_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
sources_delete_button->set_disabled(true);
|
||||
sources_delete_button->connect(SceneStringName(pressed), callable_mp(this, &TileSetEditor::_source_delete_pressed));
|
||||
sources_bottom_actions->add_child(sources_delete_button);
|
||||
|
||||
sources_add_button = memnew(MenuButton);
|
||||
sources_add_button->set_flat(false);
|
||||
sources_add_button->set_theme_type_variation("FlatButton");
|
||||
sources_add_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
sources_add_button->get_popup()->add_item(TTR("Atlas"));
|
||||
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A palette of tiles made from a texture."));
|
||||
sources_add_button->get_popup()->add_item(TTR("Scenes Collection"));
|
||||
@ -893,7 +893,7 @@ TileSetEditor::TileSetEditor() {
|
||||
|
||||
sources_advanced_menu_button = memnew(MenuButton);
|
||||
sources_advanced_menu_button->set_flat(false);
|
||||
sources_advanced_menu_button->set_theme_type_variation("FlatButton");
|
||||
sources_advanced_menu_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
|
@ -571,12 +571,12 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
|
||||
right_vbox_container->add_child(scenes_bottom_actions);
|
||||
|
||||
scene_tile_add_button = memnew(Button);
|
||||
scene_tile_add_button->set_theme_type_variation("FlatButton");
|
||||
scene_tile_add_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
scene_tile_add_button->connect(SceneStringName(pressed), callable_mp(this, &TileSetScenesCollectionSourceEditor::_source_add_pressed));
|
||||
scenes_bottom_actions->add_child(scene_tile_add_button);
|
||||
|
||||
scene_tile_delete_button = memnew(Button);
|
||||
scene_tile_delete_button->set_theme_type_variation("FlatButton");
|
||||
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));
|
||||
scenes_bottom_actions->add_child(scene_tile_delete_button);
|
||||
|
@ -1158,7 +1158,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
|
||||
refresh_button = memnew(Button);
|
||||
refresh_button->set_tooltip_text(TTR("Detect new changes"));
|
||||
refresh_button->set_theme_type_variation("FlatButton");
|
||||
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)));
|
||||
refresh_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
|
||||
refresh_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_commit_list));
|
||||
@ -1181,11 +1181,11 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
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));
|
||||
discard_all_button->set_theme_type_variation("FlatButton");
|
||||
discard_all_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
unstage_title->add_child(discard_all_button);
|
||||
|
||||
stage_all_button = memnew(Button);
|
||||
stage_all_button->set_theme_type_variation("FlatButton");
|
||||
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"));
|
||||
unstage_title->add_child(stage_all_button);
|
||||
@ -1215,7 +1215,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
stage_title->add_child(stage_label);
|
||||
|
||||
unstage_all_button = memnew(Button);
|
||||
unstage_all_button->set_theme_type_variation("FlatButton");
|
||||
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"));
|
||||
stage_title->add_child(unstage_all_button);
|
||||
@ -1410,21 +1410,21 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
remote_create_hbc->add_child(remote_create_url_input);
|
||||
|
||||
fetch_button = memnew(Button);
|
||||
fetch_button->set_theme_type_variation("FlatButton");
|
||||
fetch_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
menu_bar->add_child(fetch_button);
|
||||
|
||||
pull_button = memnew(Button);
|
||||
pull_button->set_theme_type_variation("FlatButton");
|
||||
pull_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
menu_bar->add_child(pull_button);
|
||||
|
||||
push_button = memnew(Button);
|
||||
push_button->set_theme_type_variation("FlatButton");
|
||||
push_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
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));
|
||||
|
@ -6554,14 +6554,14 @@ VisualShaderEditor::VisualShaderEditor() {
|
||||
varying_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
|
||||
|
||||
code_preview_button = memnew(Button);
|
||||
code_preview_button->set_theme_type_variation("FlatButton");
|
||||
code_preview_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
code_preview_button->set_toggle_mode(true);
|
||||
code_preview_button->set_tooltip_text(TTR("Show generated shader code."));
|
||||
toolbar->add_child(code_preview_button);
|
||||
code_preview_button->connect(SceneStringName(pressed), callable_mp(this, &VisualShaderEditor::_show_preview_text));
|
||||
|
||||
shader_preview_button = memnew(Button);
|
||||
shader_preview_button->set_theme_type_variation("FlatButton");
|
||||
shader_preview_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
shader_preview_button->set_toggle_mode(true);
|
||||
shader_preview_button->set_tooltip_text(TTR("Toggle shader preview."));
|
||||
shader_preview_button->set_pressed(true);
|
||||
|
@ -182,7 +182,7 @@ VoxelGIEditorPlugin::VoxelGIEditorPlugin() {
|
||||
bake_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
bake_hb->hide();
|
||||
bake = memnew(Button);
|
||||
bake->set_theme_type_variation("FlatButton");
|
||||
bake->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
|
||||
// when the editor theme updates.
|
||||
bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
|
@ -4692,7 +4692,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
||||
vbc->add_child(button_hb);
|
||||
|
||||
edit_remote = memnew(Button);
|
||||
edit_remote->set_theme_type_variation("FlatButton");
|
||||
edit_remote->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
edit_remote->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit_remote->set_text(TTR("Remote"));
|
||||
edit_remote->set_toggle_mode(true);
|
||||
@ -4701,7 +4701,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
|
||||
edit_remote->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_remote_tree_selected));
|
||||
|
||||
edit_local = memnew(Button);
|
||||
edit_local->set_theme_type_variation("FlatButton");
|
||||
edit_local->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
edit_local->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
edit_local->set_text(TTR("Local"));
|
||||
edit_local->set_toggle_mode(true);
|
||||
|
@ -1990,10 +1990,10 @@ void EditorThemeManager::_populate_editor_styles(const Ref<EditorTheme> &p_theme
|
||||
}
|
||||
style_flat_button_pressed->set_bg_color(flat_pressed_color);
|
||||
|
||||
p_theme->set_stylebox(CoreStringName(normal), "FlatButton", style_flat_button);
|
||||
p_theme->set_stylebox("hover", "FlatButton", style_flat_button_hover);
|
||||
p_theme->set_stylebox(SceneStringName(pressed), "FlatButton", style_flat_button_pressed);
|
||||
p_theme->set_stylebox("disabled", "FlatButton", style_flat_button);
|
||||
p_theme->set_stylebox(CoreStringName(normal), SceneStringName(FlatButton), style_flat_button);
|
||||
p_theme->set_stylebox("hover", SceneStringName(FlatButton), style_flat_button_hover);
|
||||
p_theme->set_stylebox(SceneStringName(pressed), SceneStringName(FlatButton), style_flat_button_pressed);
|
||||
p_theme->set_stylebox("disabled", SceneStringName(FlatButton), style_flat_button);
|
||||
|
||||
p_theme->set_stylebox(CoreStringName(normal), "FlatMenuButton", style_flat_button);
|
||||
p_theme->set_stylebox("hover", "FlatMenuButton", style_flat_button_hover);
|
||||
|
@ -1296,7 +1296,7 @@ GridMapEditor::GridMapEditor() {
|
||||
ED_SHORTCUT("grid_map/clear_rotation", TTR("Clear Rotation"));
|
||||
|
||||
options = memnew(MenuButton);
|
||||
options->set_theme_type_variation("FlatButton");
|
||||
options->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
options->get_popup()->add_separator();
|
||||
options->get_popup()->add_radio_check_shortcut(ED_GET_SHORTCUT("grid_map/edit_x_axis"), MENU_OPTION_X_AXIS);
|
||||
options->get_popup()->add_radio_check_shortcut(ED_GET_SHORTCUT("grid_map/edit_y_axis"), MENU_OPTION_Y_AXIS);
|
||||
@ -1335,7 +1335,7 @@ GridMapEditor::GridMapEditor() {
|
||||
mode_buttons_group.instantiate();
|
||||
|
||||
transform_mode_button = memnew(Button);
|
||||
transform_mode_button->set_theme_type_variation("FlatButton");
|
||||
transform_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
transform_mode_button->set_toggle_mode(true);
|
||||
transform_mode_button->set_button_group(mode_buttons_group);
|
||||
transform_mode_button->set_shortcut(ED_SHORTCUT("grid_map/transform_tool", TTR("Transform"), Key::T, true));
|
||||
@ -1347,7 +1347,7 @@ GridMapEditor::GridMapEditor() {
|
||||
mode_buttons->add_child(vsep);
|
||||
|
||||
select_mode_button = memnew(Button);
|
||||
select_mode_button->set_theme_type_variation("FlatButton");
|
||||
select_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
select_mode_button->set_toggle_mode(true);
|
||||
select_mode_button->set_button_group(mode_buttons_group);
|
||||
select_mode_button->set_shortcut(ED_SHORTCUT("grid_map/selection_tool", TTR("Selection"), Key::Q, true));
|
||||
@ -1357,7 +1357,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(select_mode_button);
|
||||
|
||||
erase_mode_button = memnew(Button);
|
||||
erase_mode_button->set_theme_type_variation("FlatButton");
|
||||
erase_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
erase_mode_button->set_toggle_mode(true);
|
||||
erase_mode_button->set_button_group(mode_buttons_group);
|
||||
erase_mode_button->set_shortcut(ED_SHORTCUT("grid_map/erase_tool", TTR("Erase"), Key::W, true));
|
||||
@ -1367,7 +1367,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(erase_mode_button);
|
||||
|
||||
paint_mode_button = memnew(Button);
|
||||
paint_mode_button->set_theme_type_variation("FlatButton");
|
||||
paint_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
paint_mode_button->set_toggle_mode(true);
|
||||
paint_mode_button->set_button_group(mode_buttons_group);
|
||||
paint_mode_button->set_shortcut(ED_SHORTCUT("grid_map/paint_tool", TTR("Paint"), Key::E, true));
|
||||
@ -1377,7 +1377,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(paint_mode_button);
|
||||
|
||||
pick_mode_button = memnew(Button);
|
||||
pick_mode_button->set_theme_type_variation("FlatButton");
|
||||
pick_mode_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pick_mode_button->set_toggle_mode(true);
|
||||
pick_mode_button->set_button_group(mode_buttons_group);
|
||||
pick_mode_button->set_shortcut(ED_SHORTCUT("grid_map/pick_tool", TTR("Pick"), Key::R, true));
|
||||
@ -1393,7 +1393,7 @@ GridMapEditor::GridMapEditor() {
|
||||
toolbar->add_child(action_buttons);
|
||||
|
||||
fill_action_button = memnew(Button);
|
||||
fill_action_button->set_theme_type_variation("FlatButton");
|
||||
fill_action_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
fill_action_button->set_shortcut(ED_SHORTCUT("grid_map/fill_tool", TTR("Fill"), Key::Z, true));
|
||||
fill_action_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_SELECTION_FILL));
|
||||
@ -1401,7 +1401,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(fill_action_button);
|
||||
|
||||
move_action_button = memnew(Button);
|
||||
move_action_button->set_theme_type_variation("FlatButton");
|
||||
move_action_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
move_action_button->set_shortcut(ED_SHORTCUT("grid_map/move_tool", TTR("Move"), Key::X, true));
|
||||
move_action_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_SELECTION_CUT));
|
||||
@ -1409,7 +1409,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(move_action_button);
|
||||
|
||||
duplicate_action_button = memnew(Button);
|
||||
duplicate_action_button->set_theme_type_variation("FlatButton");
|
||||
duplicate_action_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
duplicate_action_button->set_shortcut(ED_SHORTCUT("grid_map/duplicate_tool", TTR("Duplicate"), Key::C, true));
|
||||
duplicate_action_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_SELECTION_DUPLICATE));
|
||||
@ -1417,7 +1417,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(duplicate_action_button);
|
||||
|
||||
delete_action_button = memnew(Button);
|
||||
delete_action_button->set_theme_type_variation("FlatButton");
|
||||
delete_action_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
delete_action_button->set_shortcut(ED_SHORTCUT("grid_map/delete_tool", TTR("Delete"), Key::V, true));
|
||||
delete_action_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_SELECTION_CLEAR));
|
||||
@ -1431,7 +1431,7 @@ GridMapEditor::GridMapEditor() {
|
||||
toolbar->add_child(rotation_buttons);
|
||||
|
||||
rotate_x_button = memnew(Button);
|
||||
rotate_x_button->set_theme_type_variation("FlatButton");
|
||||
rotate_x_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
rotate_x_button->set_shortcut(ED_SHORTCUT("grid_map/cursor_rotate_x", TTR("Cursor Rotate X"), Key::A, true));
|
||||
rotate_x_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_CURSOR_ROTATE_X));
|
||||
@ -1439,7 +1439,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(rotate_x_button);
|
||||
|
||||
rotate_y_button = memnew(Button);
|
||||
rotate_y_button->set_theme_type_variation("FlatButton");
|
||||
rotate_y_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
rotate_y_button->set_shortcut(ED_SHORTCUT("grid_map/cursor_rotate_y", TTR("Cursor Rotate Y"), Key::S, true));
|
||||
rotate_y_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_CURSOR_ROTATE_Y));
|
||||
@ -1447,7 +1447,7 @@ GridMapEditor::GridMapEditor() {
|
||||
viewport_shortcut_buttons.push_back(rotate_y_button);
|
||||
|
||||
rotate_z_button = memnew(Button);
|
||||
rotate_z_button->set_theme_type_variation("FlatButton");
|
||||
rotate_z_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
rotate_z_button->set_shortcut(ED_SHORTCUT("grid_map/cursor_rotate_z", TTR("Cursor Rotate Z"), Key::D, true));
|
||||
rotate_z_button->connect(SceneStringName(pressed),
|
||||
callable_mp(this, &GridMapEditor::_menu_option).bind(MENU_OPTION_CURSOR_ROTATE_Z));
|
||||
@ -1492,14 +1492,14 @@ GridMapEditor::GridMapEditor() {
|
||||
zoom_widget->set_shortcut_context(this);
|
||||
|
||||
mode_thumbnail = memnew(Button);
|
||||
mode_thumbnail->set_theme_type_variation("FlatButton");
|
||||
mode_thumbnail->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
mode_thumbnail->set_toggle_mode(true);
|
||||
mode_thumbnail->set_pressed(true);
|
||||
toolbar->add_child(mode_thumbnail);
|
||||
mode_thumbnail->connect(SceneStringName(pressed), callable_mp(this, &GridMapEditor::_set_display_mode).bind(DISPLAY_THUMBNAIL));
|
||||
|
||||
mode_list = memnew(Button);
|
||||
mode_list->set_theme_type_variation("FlatButton");
|
||||
mode_list->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
mode_list->set_toggle_mode(true);
|
||||
mode_list->set_pressed(false);
|
||||
toolbar->add_child(mode_list);
|
||||
|
@ -249,7 +249,7 @@ ReplicationEditor::ReplicationEditor() {
|
||||
hb->add_child(vs);
|
||||
|
||||
pin = memnew(Button);
|
||||
pin->set_theme_type_variation("FlatButton");
|
||||
pin->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pin->set_toggle_mode(true);
|
||||
pin->set_tooltip_text(TTR("Pin replication editor"));
|
||||
hb->add_child(pin);
|
||||
|
@ -130,7 +130,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
|
||||
bake_hbox = memnew(HBoxContainer);
|
||||
|
||||
button_bake = memnew(Button);
|
||||
button_bake->set_theme_type_variation("FlatButton");
|
||||
button_bake->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bake_hbox->add_child(button_bake);
|
||||
button_bake->set_toggle_mode(true);
|
||||
button_bake->set_text(TTR("Bake NavigationMesh"));
|
||||
@ -138,7 +138,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
|
||||
button_bake->connect(SceneStringName(pressed), callable_mp(this, &NavigationMeshEditor::_bake_pressed));
|
||||
|
||||
button_reset = memnew(Button);
|
||||
button_reset->set_theme_type_variation("FlatButton");
|
||||
button_reset->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bake_hbox->add_child(button_reset);
|
||||
button_reset->set_text(TTR("Clear NavigationMesh"));
|
||||
button_reset->set_tooltip_text(TTR("Clears the internal NavigationMesh vertices and polygons."));
|
||||
|
@ -1639,13 +1639,13 @@ FileDialog::FileDialog() {
|
||||
HBoxContainer *hbc = memnew(HBoxContainer);
|
||||
|
||||
dir_prev = memnew(Button);
|
||||
dir_prev->set_theme_type_variation("FlatButton");
|
||||
dir_prev->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
dir_prev->set_tooltip_text(ETR("Go to previous folder."));
|
||||
dir_next = memnew(Button);
|
||||
dir_next->set_theme_type_variation("FlatButton");
|
||||
dir_next->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
dir_next->set_tooltip_text(ETR("Go to next folder."));
|
||||
dir_up = memnew(Button);
|
||||
dir_up->set_theme_type_variation("FlatButton");
|
||||
dir_up->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
dir_up->set_tooltip_text(ETR("Go to parent folder."));
|
||||
hbc->add_child(dir_prev);
|
||||
hbc->add_child(dir_next);
|
||||
@ -1669,13 +1669,13 @@ FileDialog::FileDialog() {
|
||||
dir->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
refresh = memnew(Button);
|
||||
refresh->set_theme_type_variation("FlatButton");
|
||||
refresh->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
refresh->set_tooltip_text(ETR("Refresh files."));
|
||||
refresh->connect(SceneStringName(pressed), callable_mp(this, &FileDialog::update_file_list));
|
||||
hbc->add_child(refresh);
|
||||
|
||||
show_hidden = memnew(Button);
|
||||
show_hidden->set_theme_type_variation("FlatButton");
|
||||
show_hidden->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
show_hidden->set_toggle_mode(true);
|
||||
show_hidden->set_pressed(is_showing_hidden_files());
|
||||
show_hidden->set_tooltip_text(ETR("Toggle the visibility of hidden files."));
|
||||
@ -1683,7 +1683,7 @@ FileDialog::FileDialog() {
|
||||
hbc->add_child(show_hidden);
|
||||
|
||||
show_filename_filter_button = memnew(Button);
|
||||
show_filename_filter_button->set_theme_type_variation("FlatButton");
|
||||
show_filename_filter_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
show_filename_filter_button->set_toggle_mode(true);
|
||||
show_filename_filter_button->set_pressed(false);
|
||||
show_filename_filter_button->set_tooltip_text(RTR("Toggle the visibility of the filter for file names."));
|
||||
@ -1694,7 +1694,7 @@ FileDialog::FileDialog() {
|
||||
hbc->add_child(shortcuts_container);
|
||||
|
||||
makedir = memnew(Button);
|
||||
makedir->set_theme_type_variation("FlatButton");
|
||||
makedir->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
makedir->set_tooltip_text(ETR("Create a new folder."));
|
||||
makedir->connect(SceneStringName(pressed), callable_mp(this, &FileDialog::_make_dir));
|
||||
hbc->add_child(makedir);
|
||||
|
@ -2916,7 +2916,7 @@ GraphEdit::GraphEdit() {
|
||||
_update_zoom_label();
|
||||
|
||||
zoom_minus_button = memnew(Button);
|
||||
zoom_minus_button->set_theme_type_variation("FlatButton");
|
||||
zoom_minus_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
zoom_minus_button->set_visible(show_zoom_buttons);
|
||||
zoom_minus_button->set_tooltip_text(ETR("Zoom Out"));
|
||||
zoom_minus_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -2924,7 +2924,7 @@ GraphEdit::GraphEdit() {
|
||||
zoom_minus_button->connect(SceneStringName(pressed), callable_mp(this, &GraphEdit::_zoom_minus));
|
||||
|
||||
zoom_reset_button = memnew(Button);
|
||||
zoom_reset_button->set_theme_type_variation("FlatButton");
|
||||
zoom_reset_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
zoom_reset_button->set_visible(show_zoom_buttons);
|
||||
zoom_reset_button->set_tooltip_text(ETR("Zoom Reset"));
|
||||
zoom_reset_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -2932,7 +2932,7 @@ GraphEdit::GraphEdit() {
|
||||
zoom_reset_button->connect(SceneStringName(pressed), callable_mp(this, &GraphEdit::_zoom_reset));
|
||||
|
||||
zoom_plus_button = memnew(Button);
|
||||
zoom_plus_button->set_theme_type_variation("FlatButton");
|
||||
zoom_plus_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
zoom_plus_button->set_visible(show_zoom_buttons);
|
||||
zoom_plus_button->set_tooltip_text(ETR("Zoom In"));
|
||||
zoom_plus_button->set_focus_mode(FOCUS_NONE);
|
||||
@ -2942,7 +2942,7 @@ GraphEdit::GraphEdit() {
|
||||
// Grid controls.
|
||||
|
||||
toggle_grid_button = memnew(Button);
|
||||
toggle_grid_button->set_theme_type_variation("FlatButton");
|
||||
toggle_grid_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
toggle_grid_button->set_visible(show_grid_buttons);
|
||||
toggle_grid_button->set_toggle_mode(true);
|
||||
toggle_grid_button->set_pressed(true);
|
||||
@ -2952,7 +2952,7 @@ GraphEdit::GraphEdit() {
|
||||
toggle_grid_button->connect(SceneStringName(pressed), callable_mp(this, &GraphEdit::_show_grid_toggled));
|
||||
|
||||
toggle_snapping_button = memnew(Button);
|
||||
toggle_snapping_button->set_theme_type_variation("FlatButton");
|
||||
toggle_snapping_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
toggle_snapping_button->set_visible(show_grid_buttons);
|
||||
toggle_snapping_button->set_toggle_mode(true);
|
||||
toggle_snapping_button->set_tooltip_text(ETR("Toggle snapping to the grid."));
|
||||
@ -2974,7 +2974,7 @@ GraphEdit::GraphEdit() {
|
||||
// Extra controls.
|
||||
|
||||
minimap_button = memnew(Button);
|
||||
minimap_button->set_theme_type_variation("FlatButton");
|
||||
minimap_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
minimap_button->set_visible(show_minimap_button);
|
||||
minimap_button->set_toggle_mode(true);
|
||||
minimap_button->set_tooltip_text(ETR("Toggle the graph minimap."));
|
||||
@ -2984,7 +2984,7 @@ GraphEdit::GraphEdit() {
|
||||
minimap_button->connect(SceneStringName(pressed), callable_mp(this, &GraphEdit::_minimap_toggled));
|
||||
|
||||
arrange_button = memnew(Button);
|
||||
arrange_button->set_theme_type_variation("FlatButton");
|
||||
arrange_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
arrange_button->set_visible(show_arrange_button);
|
||||
arrange_button->connect(SceneStringName(pressed), callable_mp(this, &GraphEdit::arrange_nodes));
|
||||
arrange_button->set_focus_mode(FOCUS_NONE);
|
||||
|
@ -150,6 +150,8 @@ public:
|
||||
const StringName text_changed = StaticCString::create("text_changed");
|
||||
const StringName text_submitted = StaticCString::create("text_submitted");
|
||||
const StringName value_changed = StaticCString::create("value_changed");
|
||||
|
||||
const StringName FlatButton = StaticCString::create("FlatButton");
|
||||
};
|
||||
|
||||
#define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name
|
||||
|
@ -365,7 +365,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
||||
|
||||
// Button variations
|
||||
|
||||
theme->set_type_variation("FlatButton", "Button");
|
||||
theme->set_type_variation(SceneStringName(FlatButton), "Button");
|
||||
theme->set_type_variation("FlatMenuButton", "MenuButton");
|
||||
|
||||
Ref<StyleBoxEmpty> flat_button_normal = make_empty_stylebox();
|
||||
@ -375,10 +375,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
||||
Ref<StyleBoxFlat> flat_button_pressed = button_pressed->duplicate();
|
||||
flat_button_pressed->set_bg_color(style_pressed_color * Color(1, 1, 1, 0.85));
|
||||
|
||||
theme->set_stylebox(CoreStringName(normal), "FlatButton", flat_button_normal);
|
||||
theme->set_stylebox("hover", "FlatButton", flat_button_normal);
|
||||
theme->set_stylebox(SceneStringName(pressed), "FlatButton", flat_button_pressed);
|
||||
theme->set_stylebox("disabled", "FlatButton", flat_button_normal);
|
||||
theme->set_stylebox(CoreStringName(normal), SceneStringName(FlatButton), flat_button_normal);
|
||||
theme->set_stylebox("hover", SceneStringName(FlatButton), flat_button_normal);
|
||||
theme->set_stylebox(SceneStringName(pressed), SceneStringName(FlatButton), flat_button_pressed);
|
||||
theme->set_stylebox("disabled", SceneStringName(FlatButton), flat_button_normal);
|
||||
|
||||
theme->set_stylebox(CoreStringName(normal), "FlatMenuButton", flat_button_normal);
|
||||
theme->set_stylebox("hover", "FlatMenuButton", flat_button_normal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user