You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Popups are now windows also (broken!)
This commit is contained in:
@@ -89,9 +89,9 @@ void ViewportRotationControl::_notification(int p_what) {
|
||||
axis_menu_options.push_back(SpatialEditorViewport::VIEW_REAR);
|
||||
|
||||
axis_colors.clear();
|
||||
axis_colors.push_back(get_color("axis_x_color", "Editor"));
|
||||
axis_colors.push_back(get_color("axis_y_color", "Editor"));
|
||||
axis_colors.push_back(get_color("axis_z_color", "Editor"));
|
||||
axis_colors.push_back(get_theme_color("axis_x_color", "Editor"));
|
||||
axis_colors.push_back(get_theme_color("axis_y_color", "Editor"));
|
||||
axis_colors.push_back(get_theme_color("axis_z_color", "Editor"));
|
||||
update();
|
||||
|
||||
if (!is_connected("mouse_exited", callable_mp(this, &ViewportRotationControl::_on_mouse_exited))) {
|
||||
@@ -140,7 +140,7 @@ void ViewportRotationControl::_draw_axis(const Axis2D &p_axis) {
|
||||
if (front) {
|
||||
String axis_name = direction == 0 ? "X" : (direction == 1 ? "Y" : "Z");
|
||||
draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS, c);
|
||||
draw_char(get_font("rotation_control", "EditorFonts"), p_axis.screen_point + Vector2i(-4, 5) * EDSCALE, axis_name, "", Color(0.3, 0.3, 0.3));
|
||||
draw_char(get_theme_font("rotation_control", "EditorFonts"), p_axis.screen_point + Vector2i(-4, 5) * EDSCALE, axis_name, "", Color(0.3, 0.3, 0.3));
|
||||
} else {
|
||||
draw_circle(p_axis.screen_point, AXIS_CIRCLE_RADIUS * (0.55 + (0.2 * (1.0 + p_axis.z_axis))), c);
|
||||
}
|
||||
@@ -1091,7 +1091,7 @@ void SpatialEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
|
||||
selection_menu->set_item_tooltip(i, String(spat->get_name()) + "\nType: " + spat->get_class() + "\nPath: " + node_path);
|
||||
}
|
||||
|
||||
selection_menu->set_global_position(b->get_global_position());
|
||||
selection_menu->set_position(get_screen_transform().xform(b->get_position()));
|
||||
selection_menu->popup();
|
||||
}
|
||||
}
|
||||
@@ -2367,7 +2367,7 @@ void SpatialEditorViewport::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
// The crosshair icon doesn't depend on the editor theme.
|
||||
crosshair->set_texture(get_icon("Crosshair", "EditorIcons"));
|
||||
crosshair->set_texture(get_theme_icon("Crosshair", "EditorIcons"));
|
||||
// Set the anchors and margins after changing the icon to ensure it's centered correctly.
|
||||
crosshair->set_anchors_and_margins_preset(PRESET_CENTER);
|
||||
}
|
||||
@@ -2555,25 +2555,25 @@ void SpatialEditorViewport::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_THEME_CHANGED) {
|
||||
|
||||
view_menu->set_icon(get_icon("GuiTabMenu", "EditorIcons"));
|
||||
preview_camera->set_icon(get_icon("Camera", "EditorIcons"));
|
||||
view_menu->set_icon(get_theme_icon("GuiTabMenu", "EditorIcons"));
|
||||
preview_camera->set_icon(get_theme_icon("Camera", "EditorIcons"));
|
||||
|
||||
view_menu->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_style_override("hover", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_style_override("pressed", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_style_override("focus", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_style_override("disabled", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_theme_style_override("hover", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_theme_style_override("pressed", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_theme_style_override("focus", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
view_menu->add_theme_style_override("disabled", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
|
||||
preview_camera->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_style_override("hover", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_style_override("pressed", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_style_override("focus", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_style_override("disabled", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_theme_style_override("hover", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_theme_style_override("pressed", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_theme_style_override("focus", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
preview_camera->add_theme_style_override("disabled", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
|
||||
info_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
fps_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
cinema_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
locked_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles"));
|
||||
info_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
fps_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
cinema_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
locked_label->add_theme_style_override("normal", editor->get_gui_base()->get_theme_stylebox("Information3dViewport", "EditorStyles"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2613,7 +2613,7 @@ void SpatialEditorViewport::_draw() {
|
||||
if (surface->has_focus()) {
|
||||
Size2 size = surface->get_size();
|
||||
Rect2 r = Rect2(Point2(), size);
|
||||
get_stylebox("Focus", "EditorStyles")->draw(surface->get_canvas_item(), r);
|
||||
get_theme_stylebox("Focus", "EditorStyles")->draw(surface->get_canvas_item(), r);
|
||||
}
|
||||
|
||||
if (cursor.region_select) {
|
||||
@@ -2621,11 +2621,11 @@ void SpatialEditorViewport::_draw() {
|
||||
|
||||
surface->draw_rect(
|
||||
selection_rect,
|
||||
get_color("box_selection_fill_color", "Editor"));
|
||||
get_theme_color("box_selection_fill_color", "Editor"));
|
||||
|
||||
surface->draw_rect(
|
||||
selection_rect,
|
||||
get_color("box_selection_stroke_color", "Editor"),
|
||||
get_theme_color("box_selection_stroke_color", "Editor"),
|
||||
false,
|
||||
Math::round(EDSCALE));
|
||||
}
|
||||
@@ -2633,7 +2633,7 @@ void SpatialEditorViewport::_draw() {
|
||||
RID ci = surface->get_canvas_item();
|
||||
|
||||
if (message_time > 0) {
|
||||
Ref<Font> font = get_font("font", "Label");
|
||||
Ref<Font> font = get_theme_font("font", "Label");
|
||||
Point2 msgpos = Point2(5, get_size().y - 20);
|
||||
font->draw(ci, msgpos + Point2(1, 1), message, Color(0, 0, 0, 0.8));
|
||||
font->draw(ci, msgpos + Point2(-1, -1), message, Color(0, 0, 0, 0.8));
|
||||
@@ -2647,7 +2647,7 @@ void SpatialEditorViewport::_draw() {
|
||||
ci,
|
||||
_edit.mouse_pos,
|
||||
center,
|
||||
get_color("accent_color", "Editor") * Color(1, 1, 1, 0.6),
|
||||
get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.6),
|
||||
Math::round(2 * EDSCALE));
|
||||
}
|
||||
if (previewing) {
|
||||
@@ -2698,7 +2698,7 @@ void SpatialEditorViewport::_draw() {
|
||||
if (logscale_t < 0.25)
|
||||
logscale_t = 0.25 * Math::exp(4.0 * logscale_t - 1.0);
|
||||
|
||||
draw_indicator_bar(*surface, 1.0 - logscale_t, get_icon("ViewportSpeed", "EditorIcons"));
|
||||
draw_indicator_bar(*surface, 1.0 - logscale_t, get_theme_icon("ViewportSpeed", "EditorIcons"));
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -2716,7 +2716,7 @@ void SpatialEditorViewport::_draw() {
|
||||
if (logscale_t < 0.25)
|
||||
logscale_t = 0.25 * Math::exp(4.0 * logscale_t - 1.0);
|
||||
|
||||
draw_indicator_bar(*surface, logscale_t, get_icon("ViewportZoom", "EditorIcons"));
|
||||
draw_indicator_bar(*surface, logscale_t, get_theme_icon("ViewportZoom", "EditorIcons"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4037,7 +4037,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
|
||||
|
||||
selection_menu = memnew(PopupMenu);
|
||||
add_child(selection_menu);
|
||||
selection_menu->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
|
||||
selection_menu->set_min_size(Size2(100, 0) * EDSCALE);
|
||||
selection_menu->connect("id_pressed", callable_mp(this, &SpatialEditorViewport::_selection_result_pressed));
|
||||
selection_menu->connect("popup_hide", callable_mp(this, &SpatialEditorViewport::_selection_menu_hide));
|
||||
|
||||
@@ -4063,8 +4063,8 @@ void SpatialEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event)
|
||||
if (mb->is_pressed()) {
|
||||
Vector2 size = get_size();
|
||||
|
||||
int h_sep = get_constant("separation", "HSplitContainer");
|
||||
int v_sep = get_constant("separation", "VSplitContainer");
|
||||
int h_sep = get_theme_constant("separation", "HSplitContainer");
|
||||
int v_sep = get_theme_constant("separation", "VSplitContainer");
|
||||
|
||||
int mid_w = size.width * ratio_h;
|
||||
int mid_h = size.height * ratio_v;
|
||||
@@ -4114,8 +4114,8 @@ void SpatialEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event)
|
||||
if (view == VIEW_USE_3_VIEWPORTS || view == VIEW_USE_3_VIEWPORTS_ALT || view == VIEW_USE_4_VIEWPORTS) {
|
||||
Vector2 size = get_size();
|
||||
|
||||
int h_sep = get_constant("separation", "HSplitContainer");
|
||||
int v_sep = get_constant("separation", "VSplitContainer");
|
||||
int h_sep = get_theme_constant("separation", "HSplitContainer");
|
||||
int v_sep = get_theme_constant("separation", "VSplitContainer");
|
||||
|
||||
int mid_w = size.width * ratio_h;
|
||||
int mid_h = size.height * ratio_v;
|
||||
@@ -4157,18 +4157,18 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_DRAW && mouseover) {
|
||||
|
||||
Ref<Texture2D> h_grabber = get_icon("grabber", "HSplitContainer");
|
||||
Ref<Texture2D> v_grabber = get_icon("grabber", "VSplitContainer");
|
||||
Ref<Texture2D> h_grabber = get_theme_icon("grabber", "HSplitContainer");
|
||||
Ref<Texture2D> v_grabber = get_theme_icon("grabber", "VSplitContainer");
|
||||
|
||||
Ref<Texture2D> hdiag_grabber = get_icon("GuiViewportHdiagsplitter", "EditorIcons");
|
||||
Ref<Texture2D> vdiag_grabber = get_icon("GuiViewportVdiagsplitter", "EditorIcons");
|
||||
Ref<Texture2D> vh_grabber = get_icon("GuiViewportVhsplitter", "EditorIcons");
|
||||
Ref<Texture2D> hdiag_grabber = get_theme_icon("GuiViewportHdiagsplitter", "EditorIcons");
|
||||
Ref<Texture2D> vdiag_grabber = get_theme_icon("GuiViewportVdiagsplitter", "EditorIcons");
|
||||
Ref<Texture2D> vh_grabber = get_theme_icon("GuiViewportVhsplitter", "EditorIcons");
|
||||
|
||||
Vector2 size = get_size();
|
||||
|
||||
int h_sep = get_constant("separation", "HSplitContainer");
|
||||
int h_sep = get_theme_constant("separation", "HSplitContainer");
|
||||
|
||||
int v_sep = get_constant("separation", "VSplitContainer");
|
||||
int v_sep = get_theme_constant("separation", "VSplitContainer");
|
||||
|
||||
int mid_w = size.width * ratio_h;
|
||||
int mid_h = size.height * ratio_v;
|
||||
@@ -4262,9 +4262,9 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
int h_sep = get_constant("separation", "HSplitContainer");
|
||||
int h_sep = get_theme_constant("separation", "HSplitContainer");
|
||||
|
||||
int v_sep = get_constant("separation", "VSplitContainer");
|
||||
int v_sep = get_theme_constant("separation", "VSplitContainer");
|
||||
|
||||
int mid_w = size.width * ratio_h;
|
||||
int mid_h = size.height * ratio_v;
|
||||
@@ -4801,13 +4801,13 @@ void SpatialEditor::_menu_gizmo_toggled(int p_option) {
|
||||
const int state = gizmos_menu->get_item_state(idx);
|
||||
switch (state) {
|
||||
case EditorSpatialGizmoPlugin::VISIBLE:
|
||||
gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_icon("visibility_visible"));
|
||||
gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_theme_icon("visibility_visible"));
|
||||
break;
|
||||
case EditorSpatialGizmoPlugin::ON_TOP:
|
||||
gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_icon("visibility_xray"));
|
||||
gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_theme_icon("visibility_xray"));
|
||||
break;
|
||||
case EditorSpatialGizmoPlugin::HIDDEN:
|
||||
gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_icon("visibility_hidden"));
|
||||
gizmos_menu->set_item_icon(idx, view_menu->get_popup()->get_theme_icon("visibility_hidden"));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5102,13 +5102,13 @@ void SpatialEditor::_init_indicators() {
|
||||
Color origin_color;
|
||||
switch (i) {
|
||||
case 0:
|
||||
origin_color = get_color("axis_x_color", "Editor");
|
||||
origin_color = get_theme_color("axis_x_color", "Editor");
|
||||
break;
|
||||
case 1:
|
||||
origin_color = get_color("axis_y_color", "Editor");
|
||||
origin_color = get_theme_color("axis_y_color", "Editor");
|
||||
break;
|
||||
case 2:
|
||||
origin_color = get_color("axis_z_color", "Editor");
|
||||
origin_color = get_theme_color("axis_z_color", "Editor");
|
||||
break;
|
||||
default:
|
||||
origin_color = Color();
|
||||
@@ -5153,13 +5153,13 @@ void SpatialEditor::_init_indicators() {
|
||||
Color col;
|
||||
switch (i) {
|
||||
case 0:
|
||||
col = get_color("axis_x_color", "Editor");
|
||||
col = get_theme_color("axis_x_color", "Editor");
|
||||
break;
|
||||
case 1:
|
||||
col = get_color("axis_y_color", "Editor");
|
||||
col = get_theme_color("axis_y_color", "Editor");
|
||||
break;
|
||||
case 2:
|
||||
col = get_color("axis_z_color", "Editor");
|
||||
col = get_theme_color("axis_z_color", "Editor");
|
||||
break;
|
||||
default:
|
||||
col = Color();
|
||||
@@ -5431,13 +5431,13 @@ void SpatialEditor::_update_gizmos_menu() {
|
||||
const int idx = gizmos_menu->get_item_index(i);
|
||||
switch (plugin_state) {
|
||||
case EditorSpatialGizmoPlugin::VISIBLE:
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible"));
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_visible"));
|
||||
break;
|
||||
case EditorSpatialGizmoPlugin::ON_TOP:
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_xray"));
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_xray"));
|
||||
break;
|
||||
case EditorSpatialGizmoPlugin::HIDDEN:
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_hidden"));
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_hidden"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5450,13 +5450,13 @@ void SpatialEditor::_update_gizmos_menu_theme() {
|
||||
const int idx = gizmos_menu->get_item_index(i);
|
||||
switch (plugin_state) {
|
||||
case EditorSpatialGizmoPlugin::VISIBLE:
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_visible"));
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_visible"));
|
||||
break;
|
||||
case EditorSpatialGizmoPlugin::ON_TOP:
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_xray"));
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_xray"));
|
||||
break;
|
||||
case EditorSpatialGizmoPlugin::HIDDEN:
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_icon("visibility_hidden"));
|
||||
gizmos_menu->set_item_icon(idx, gizmos_menu->get_theme_icon("visibility_hidden"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5727,26 +5727,26 @@ void SpatialEditor::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
|
||||
tool_button[SpatialEditor::TOOL_MODE_SELECT]->set_icon(get_icon("ToolSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon(get_icon("ToolMove", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon(get_icon("ToolRotate", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_SCALE]->set_icon(get_icon("ToolScale", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_LIST_SELECT]->set_icon(get_icon("ListSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_LOCK_SELECTED]->set_icon(get_icon("Lock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNLOCK_SELECTED]->set_icon(get_icon("Unlock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_GROUP_SELECTED]->set_icon(get_icon("Group", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNGROUP_SELECTED]->set_icon(get_icon("Ungroup", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon("ToolSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon(get_theme_icon("ToolMove", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon(get_theme_icon("ToolRotate", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_SCALE]->set_icon(get_theme_icon("ToolScale", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_LIST_SELECT]->set_icon(get_theme_icon("ListSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_LOCK_SELECTED]->set_icon(get_theme_icon("Lock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNLOCK_SELECTED]->set_icon(get_theme_icon("Unlock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_GROUP_SELECTED]->set_icon(get_theme_icon("Group", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNGROUP_SELECTED]->set_icon(get_theme_icon("Ungroup", "EditorIcons"));
|
||||
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_LOCAL_COORDS]->set_icon(get_icon("Object", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_USE_SNAP]->set_icon(get_icon("Snap", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_OVERRIDE_CAMERA]->set_icon(get_icon("Camera", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_LOCAL_COORDS]->set_icon(get_theme_icon("Object", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_USE_SNAP]->set_icon(get_theme_icon("Snap", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_OVERRIDE_CAMERA]->set_icon(get_theme_icon("Camera", "EditorIcons"));
|
||||
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_icon("Panels1", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_icon("Panels2", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT), get_icon("Panels2Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS), get_icon("Panels3", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_icon("Panels3Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_icon("Panels4", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_theme_icon("Panels1", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_theme_icon("Panels2", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT), get_theme_icon("Panels2Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS), get_theme_icon("Panels3", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_theme_icon("Panels3Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_theme_icon("Panels4", "EditorIcons"));
|
||||
|
||||
_menu_item_pressed(MENU_VIEW_USE_1_VIEWPORT);
|
||||
|
||||
@@ -5769,25 +5769,25 @@ void SpatialEditor::_notification(int p_what) {
|
||||
|
||||
_finish_indicators();
|
||||
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
tool_button[SpatialEditor::TOOL_MODE_SELECT]->set_icon(get_icon("ToolSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon(get_icon("ToolMove", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon(get_icon("ToolRotate", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_SCALE]->set_icon(get_icon("ToolScale", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_LIST_SELECT]->set_icon(get_icon("ListSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_LOCK_SELECTED]->set_icon(get_icon("Lock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNLOCK_SELECTED]->set_icon(get_icon("Unlock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_GROUP_SELECTED]->set_icon(get_icon("Group", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNGROUP_SELECTED]->set_icon(get_icon("Ungroup", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_SELECT]->set_icon(get_theme_icon("ToolSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon(get_theme_icon("ToolMove", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon(get_theme_icon("ToolRotate", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_SCALE]->set_icon(get_theme_icon("ToolScale", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_MODE_LIST_SELECT]->set_icon(get_theme_icon("ListSelect", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_LOCK_SELECTED]->set_icon(get_theme_icon("Lock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNLOCK_SELECTED]->set_icon(get_theme_icon("Unlock", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_GROUP_SELECTED]->set_icon(get_theme_icon("Group", "EditorIcons"));
|
||||
tool_button[SpatialEditor::TOOL_UNGROUP_SELECTED]->set_icon(get_theme_icon("Ungroup", "EditorIcons"));
|
||||
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_LOCAL_COORDS]->set_icon(get_icon("Object", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_USE_SNAP]->set_icon(get_icon("Snap", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_LOCAL_COORDS]->set_icon(get_theme_icon("Object", "EditorIcons"));
|
||||
tool_option_button[SpatialEditor::TOOL_OPT_USE_SNAP]->set_icon(get_theme_icon("Snap", "EditorIcons"));
|
||||
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_icon("Panels1", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_icon("Panels2", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT), get_icon("Panels2Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS), get_icon("Panels3", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_icon("Panels3Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_icon("Panels4", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_theme_icon("Panels1", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_theme_icon("Panels2", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT), get_theme_icon("Panels2Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS), get_theme_icon("Panels3", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_theme_icon("Panels3Alt", "EditorIcons"));
|
||||
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_theme_icon("Panels4", "EditorIcons"));
|
||||
|
||||
// Update grid color by rebuilding grid.
|
||||
_finish_grid();
|
||||
@@ -6560,7 +6560,7 @@ void EditorSpatialGizmoPlugin::create_handle_material(const String &p_name, bool
|
||||
|
||||
handle_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
|
||||
handle_material->set_flag(StandardMaterial3D::FLAG_USE_POINT_SIZE, true);
|
||||
Ref<Texture2D> handle_t = SpatialEditor::get_singleton()->get_icon("Editor3DHandle", "EditorIcons");
|
||||
Ref<Texture2D> handle_t = SpatialEditor::get_singleton()->get_theme_icon("Editor3DHandle", "EditorIcons");
|
||||
handle_material->set_point_size(handle_t->get_width());
|
||||
handle_material->set_texture(StandardMaterial3D::TEXTURE_ALBEDO, handle_t);
|
||||
handle_material->set_albedo(Color(1, 1, 1));
|
||||
|
||||
Reference in New Issue
Block a user