summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_fonts.cpp17
-rw-r--r--editor/editor_inspector.cpp4
-rw-r--r--editor/editor_inspector.h1
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_property_name_processor.cpp17
-rw-r--r--editor/icons/ViewportSpeed.svg2
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp7
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp24
8 files changed, 52 insertions, 22 deletions
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 853278c5fc..7b72e09bd7 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -64,8 +64,8 @@
m_name->add_data(FontTamilBold); \
m_name->add_data(FontTeluguBold); \
m_name->add_data(FontThaiBold); \
- m_name->add_data(FontJapanese); \
- m_name->add_data(FontFallback);
+ m_name->add_data(FontJapaneseBold); \
+ m_name->add_data(FontFallbackBold);
#define MAKE_DEFAULT_FONT(m_name, m_variations) \
Ref<Font> m_name; \
@@ -206,7 +206,8 @@ void editor_register_fonts(Ref<Theme> p_theme) {
break;
}
- int default_font_size = int(EDITOR_GET("interface/editor/main_font_size")) * EDSCALE;
+ const int default_font_size = int(EDITOR_GET("interface/editor/main_font_size")) * EDSCALE;
+ const float embolden_strength = 0.6;
String custom_font_path = EditorSettings::get_singleton()->get("interface/editor/main_font");
Ref<FontData> CustomFont;
@@ -226,6 +227,11 @@ void editor_register_fonts(Ref<Theme> p_theme) {
EditorSettings::get_singleton()->set_manually("interface/editor/main_font_bold", "");
}
+ if (CustomFont.is_valid() && !CustomFontBold.is_valid()) {
+ CustomFontBold = CustomFont->duplicate();
+ CustomFontBold->set_embolden(embolden_strength);
+ }
+
/* Custom source code font */
String custom_font_path_source = EditorSettings::get_singleton()->get("interface/editor/code_font");
@@ -268,6 +274,11 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<FontData> FontFallback = load_cached_internal_font(_font_DroidSansFallback, _font_DroidSansFallback_size, font_hinting, font_antialiased, true, font_subpixel_positioning);
Ref<FontData> FontJapanese = load_cached_internal_font(_font_DroidSansJapanese, _font_DroidSansJapanese_size, font_hinting, font_antialiased, true, font_subpixel_positioning);
+ Ref<FontData> FontFallbackBold = FontFallback->duplicate();
+ FontFallbackBold->set_embolden(embolden_strength);
+ Ref<FontData> FontJapaneseBold = FontJapanese->duplicate();
+ FontJapaneseBold->set_embolden(embolden_strength);
+
/* Hack */
Ref<FontData> dfmono = load_cached_internal_font(_font_JetBrainsMono_Regular, _font_JetBrainsMono_Regular_size, font_hinting, font_antialiased, true, font_subpixel_positioning);
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 20b8079689..9efd942a51 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -882,7 +882,7 @@ void EditorProperty::menu_option(int p_option) {
emit_changed(property, InspectorDock::get_inspector_singleton()->get_property_clipboard());
} break;
case MENU_COPY_PROPERTY_PATH: {
- DisplayServer::get_singleton()->clipboard_set(property);
+ DisplayServer::get_singleton()->clipboard_set(property_path);
} break;
case MENU_PIN_VALUE: {
emit_signal(SNAME("property_pinned"), property, !pinned);
@@ -2314,6 +2314,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<Edit
if (F.properties.size() == 1) {
//since it's one, associate:
ep->property = F.properties[0];
+ ep->property_path = property_prefix + F.properties[0];
ep->property_usage = 0;
}
@@ -2874,6 +2875,7 @@ void EditorInspector::update_tree() {
if (F.properties.size() == 1) {
//since it's one, associate:
ep->property = F.properties[0];
+ ep->property_path = property_prefix + F.properties[0];
ep->property_usage = p.usage;
//and set label?
}
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index c1454ad84c..3c482a07e7 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -68,6 +68,7 @@ private:
friend class EditorInspector;
Object *object;
StringName property;
+ String property_path;
int property_usage;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index de0465a160..7251530fdc 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6291,7 +6291,7 @@ EditorNode::EditorNode() {
scene_root_parent->set_v_size_flags(Control::SIZE_EXPAND_FILL);
scene_root = memnew(SubViewport);
- scene_root->set_embed_subwindows_hint(true);
+ scene_root->set_embedding_subwindows(true);
scene_root->set_disable_3d(true);
scene_root->set_disable_input(true);
diff --git a/editor/editor_property_name_processor.cpp b/editor/editor_property_name_processor.cpp
index 38003ab2f4..20327cb867 100644
--- a/editor/editor_property_name_processor.cpp
+++ b/editor/editor_property_name_processor.cpp
@@ -69,7 +69,9 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
// The map name and value definition format should be kept synced with the regex.
capitalize_string_remaps["2d"] = "2D";
capitalize_string_remaps["3d"] = "3D";
+ capitalize_string_remaps["Aa"] = "AA";
capitalize_string_remaps["Adb"] = "ADB";
+ capitalize_string_remaps["Ao"] = "AO";
capitalize_string_remaps["Bptc"] = "BPTC";
capitalize_string_remaps["Bvh"] = "BVH";
capitalize_string_remaps["Csg"] = "CSG";
@@ -81,21 +83,27 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["Fbx"] = "FBX";
capitalize_string_remaps["Fps"] = "FPS";
capitalize_string_remaps["Fov"] = "FOV";
+ capitalize_string_remaps["Fsr"] = "FSR";
capitalize_string_remaps["Fs"] = "FS";
capitalize_string_remaps["Fxaa"] = "FXAA";
capitalize_string_remaps["Ggx"] = "GGX";
+ capitalize_string_remaps["Gi"] = "GI";
capitalize_string_remaps["Gdscript"] = "GDScript";
capitalize_string_remaps["Gles 2"] = "GLES2";
capitalize_string_remaps["Gles 3"] = "GLES3";
- capitalize_string_remaps["Gi Probe"] = "GI Probe";
+ capitalize_string_remaps["Gpu"] = "GPU";
+ capitalize_string_remaps["Gui"] = "GUI";
capitalize_string_remaps["Hdr"] = "HDR";
capitalize_string_remaps["Hidpi"] = "hiDPI";
+ capitalize_string_remaps["Http"] = "HTTP";
capitalize_string_remaps["Ik"] = "IK";
capitalize_string_remaps["Ios"] = "iOS";
capitalize_string_remaps["Kb"] = "KB";
+ capitalize_string_remaps["Lod"] = "LOD";
capitalize_string_remaps["Msaa"] = "MSAA";
capitalize_string_remaps["Macos"] = "macOS";
capitalize_string_remaps["Opentype"] = "OpenType";
+ capitalize_string_remaps["Openxr"] = "OpenXR";
capitalize_string_remaps["Png"] = "PNG";
capitalize_string_remaps["Pvs"] = "PVS";
capitalize_string_remaps["Pvrtc"] = "PVRTC";
@@ -104,16 +112,23 @@ EditorPropertyNameProcessor::EditorPropertyNameProcessor() {
capitalize_string_remaps["Srgb"] = "sRGB";
capitalize_string_remaps["Ssao"] = "SSAO";
capitalize_string_remaps["Ssl"] = "SSL";
+ capitalize_string_remaps["Ssil"] = "SSIL";
capitalize_string_remaps["Ssh"] = "SSH";
+ capitalize_string_remaps["Sdf"] = "SDF";
capitalize_string_remaps["Sdk"] = "SDK";
capitalize_string_remaps["Tcp"] = "TCP";
+ capitalize_string_remaps["Url"] = "URL";
capitalize_string_remaps["Uv 1"] = "UV1";
capitalize_string_remaps["Uv 2"] = "UV2";
+ capitalize_string_remaps["Uv"] = "UV";
+ capitalize_string_remaps["Uwp"] = "UWP";
capitalize_string_remaps["Vram"] = "VRAM";
capitalize_string_remaps["Vsync"] = "V-Sync";
capitalize_string_remaps["Vector 2"] = "Vector2";
+ capitalize_string_remaps["Webp"] = "WebP";
capitalize_string_remaps["Webrtc"] = "WebRTC";
capitalize_string_remaps["Websocket"] = "WebSocket";
+ capitalize_string_remaps["Xr"] = "XR";
}
EditorPropertyNameProcessor::~EditorPropertyNameProcessor() {
diff --git a/editor/icons/ViewportSpeed.svg b/editor/icons/ViewportSpeed.svg
index 8fceaffd52..57292e2e91 100644
--- a/editor/icons/ViewportSpeed.svg
+++ b/editor/icons/ViewportSpeed.svg
@@ -1 +1 @@
-<svg height="16" viewBox="0 0 4.2333333 4.2333333" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1.5875 0c-.28858 0-.52917.24059-.52917.52917v.61132c-.085589-.051-.18113-.0891-.28525-.0853-.34849.0127-.5952.37346-.48059.70278l.26355.79066c.048664.14623.15979.24805.29249.30644l-.60927.40669c-.13121.0845-.22102.22389-.24133.3633-.020312.13941.017471.26985.087333.37465s.17614.19045.31264.22532c.13634.0348.29946.006.42788-.0827h.0005159l1.0852-.72348.26097.52192c.11682.23391.39274.34829.64079.26561l.79375-.26458-.00775.003c.15105-.0454.27732-.15615.33486-.2863.057538-.13015.055144-.26773.014986-.38809-.03156-.0946-.10972-.1687-.19275-.23617.069099-.0546.1445-.10364.18035-.19325.051761-.12941.045257-.29292-.02377-.43098l-.26459-.52946c-.089407-.17933-.27348-.29308-.47335-.29305h-.1111c.052029-.0817.1111-.16214.1111-.26458v-.79375c0-.28858-.24059-.52917-.52917-.52917z"/><path d="m1.5875.26458c-.14658 0-.26458.118-.26458.26459v.79375c0 .14658.118.26458.26458.26458h.26458v.262a.26461.26461 0 0 0 -.083716.0165l-.5426.18086-.18087-.5426a.26461.26461 0 0 0 -.262-.18448.26461.26461 0 0 0 -.2403.3514l.26458.79375a.26461.26461 0 0 0 .33486.16743l.44545-.14831v.16174c0 .0108.00495.02.0062.0305l-1.2113.80771a.26461.26461 0 1 0 .29352.44028l1.3379-.89194.39532.79014a.26461.26461 0 0 0 .32039.1328l.79375-.26458a.26461.26461 0 1 0 -.16743-.50175l-.57619.19172-.25787-.51625c.072998-.047.12402-.12495.12402-.21859v-.26458h.36587l.1912.38292a.26461.26461 0 1 0 .47336-.23668l-.26458-.52916a.26461.26461 0 0 0 -.23668-.14625h-.79375v-.26458h.26458c.14658 0 .26458-.118.26458-.26458v-.79375c0-.14659-.118-.26459-.26458-.26459zm0 .52917h.26458v.52917h-.26458z" fill="#fff" fill-opacity=".99608"/></svg>
+<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke-width="3.77953"><path d="m6.0285136 0c-1.0906961 0-2.0000127.90931655-2.0000127 2.0000126v2.3105008c-.3234859-.1927559-.6845858-.3367559-1.0781102-.3223937-1.3171276.048-2.24957487 1.4115024-1.8164032 2.6561764l.9960945 2.9883213c.183927.5526806.6039307.9375116 1.1054741 1.1581986l-2.30275287 1.537096c-.49591181.31937-.83535119.846198-.91211339 1.373102-.07676977.526904.06603212 1.019906.33007748 1.416.26404536.396095.66572598.719811 1.18163158.851603.5153008.131528 1.1318173.02268 1.6171842-.312566h.00195l4.1015433-2.734413.9863434 1.972611c.4415244.884069 1.4843716 1.316372 2.4218832 1.00388l3-.999987-.02929.01134c.570898-.17159 1.048139-.590173 1.265613-1.082078.217466-.491906.208418-1.011893.05664-1.466797-.119282-.357543-.41469-.637606-.728504-.892611.261162-.206362.546142-.39171.681638-.730394.195632-.489109.17105-1.1070991-.08984-1.6289007l-1.000027-2.0011107c-.337916-.6777827-1.033625-1.1077039-1.789039-1.1075905h-.419906c.196645-.3087874.419906-.6128126.419906-.9999874v-3.0000001c0-1.09069605-.909317-2.0000126-2.000012-2.0000126z"/><path d="m6.0285136.99998741c-.5540032 0-.9999874.44598429-.9999874 1.00002519v3.0000001c0 .5540031.4459842.9999874.9999874.9999874h.9999874v.9902362a1.0001008 1.0001008 0 0 0 -.316407.062362l-2.0507716.6835656-.6836032-2.0507717a1.0001008 1.0001008 0 0 0 -.9902362-.6972473 1.0001008 1.0001008 0 0 0 -.9082205 1.328126l.9999874 3.0000001a1.0001008 1.0001008 0 0 0 1.2656126.6328063l1.6835906-.5605418v.6113008c0 .040819.018709.075591.023433.1152757l-4.5781418 3.052762a1.0001008 1.0001008 0 1 0 1.1093669 1.664051l5.05663-3.371112 1.4941228 2.986356a1.0001008 1.0001008 0 0 0 1.210922.501921l3.000001-.999987a1.0001008 1.0001008 0 1 0 -.632807-1.896378l-2.177726.724611-.9746262-1.951182c.275898-.177637.4687372-.472252.4687372-.8261665v-.9999874h1.382815l.722646 1.4472569a1.0001246 1.0001246 0 1 0 1.789077-.8945388l-.999987-1.9999748a1.0001008 1.0001008 0 0 0 -.894539-.5527559h-2.9999995v-.9999874h.9999875c.554003 0 .999987-.4459843.999987-.9999874v-3.0000001c0-.5540409-.445984-1.00002519-.999987-1.00002519zm0 2.00001259h.9999874v2.0000127h-.9999874z" fill="#fff" fill-opacity=".99608"/></g></svg>
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 5a2696fff1..22e0a3dabb 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -292,15 +292,14 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
_commit_action();
return true;
} else {
- Vector<Vector2> vertices2 = _get_polygon(insert.polygon);
- pre_move_edit = vertices2;
+ pre_move_edit = vertices;
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
- vertices2.insert(edited_point.vertex, edited_point.pos);
+ vertices.insert(edited_point.vertex, edited_point.pos);
selected_point = Vertex(edited_point.polygon, edited_point.vertex);
edge_point = PosVertex();
undo_redo->create_action(TTR("Insert Point"));
- _action_set_polygon(insert.polygon, vertices2);
+ _action_set_polygon(insert.polygon, vertices);
_commit_action();
return true;
}
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 3927aaa438..a857a7509e 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2690,27 +2690,27 @@ void Node3DEditorViewport::_notification(int p_what) {
}
}
-static void draw_indicator_bar(Control &surface, real_t fill, const Ref<Texture2D> icon, const Ref<Font> font, int font_size, const String &text) {
+static void draw_indicator_bar(Control &p_surface, real_t p_fill, const Ref<Texture2D> p_icon, const Ref<Font> p_font, int p_font_size, const String &p_text, const Color &p_color) {
// Adjust bar size from control height
- const Vector2 surface_size = surface.get_size();
+ const Vector2 surface_size = p_surface.get_size();
const real_t h = surface_size.y / 2.0;
const real_t y = (surface_size.y - h) / 2.0;
const Rect2 r(10 * EDSCALE, y, 6 * EDSCALE, h);
- const real_t sy = r.size.y * fill;
+ const real_t sy = r.size.y * p_fill;
// Note: because this bar appears over the viewport, it has to stay readable for any background color
// Draw both neutral dark and bright colors to account this
- surface.draw_rect(r, Color(1, 1, 1, 0.2));
- surface.draw_rect(Rect2(r.position.x, r.position.y + r.size.y - sy, r.size.x, sy), Color(1, 1, 1, 0.6));
- surface.draw_rect(r.grow(1), Color(0, 0, 0, 0.7), false, Math::round(EDSCALE));
+ p_surface.draw_rect(r, p_color * Color(1, 1, 1, 0.2));
+ p_surface.draw_rect(Rect2(r.position.x, r.position.y + r.size.y - sy, r.size.x, sy), p_color * Color(1, 1, 1, 0.6));
+ p_surface.draw_rect(r.grow(1), Color(0, 0, 0, 0.7), false, Math::round(EDSCALE));
- const Vector2 icon_size = icon->get_size();
+ const Vector2 icon_size = p_icon->get_size();
const Vector2 icon_pos = Vector2(r.position.x - (icon_size.x - r.size.x) / 2, r.position.y + r.size.y + 2 * EDSCALE);
- surface.draw_texture(icon, icon_pos);
+ p_surface.draw_texture(p_icon, icon_pos, p_color);
// Draw text below the bar (for speed/zoom information).
- surface.draw_string(font, Vector2(icon_pos.x, icon_pos.y + icon_size.y + 16 * EDSCALE), text, HORIZONTAL_ALIGNMENT_LEFT, -1.f, font_size);
+ p_surface.draw_string(p_font, Vector2(icon_pos.x, icon_pos.y + icon_size.y + 16 * EDSCALE), p_text, HORIZONTAL_ALIGNMENT_LEFT, -1.f, p_font_size, p_color, Math::round(2 * EDSCALE), Color(0, 0, 0));
}
void Node3DEditorViewport::_draw() {
@@ -2828,7 +2828,8 @@ void Node3DEditorViewport::_draw() {
get_theme_icon(SNAME("ViewportSpeed"), SNAME("EditorIcons")),
get_theme_font(SNAME("font"), SNAME("Label")),
get_theme_font_size(SNAME("font_size"), SNAME("Label")),
- vformat("%s u/s", String::num(freelook_speed).pad_decimals(precision)));
+ vformat("%s u/s", String::num(freelook_speed).pad_decimals(precision)),
+ Color(1.0, 0.95, 0.7));
}
} else {
@@ -2850,7 +2851,8 @@ void Node3DEditorViewport::_draw() {
get_theme_icon(SNAME("ViewportZoom"), SNAME("EditorIcons")),
get_theme_font(SNAME("font"), SNAME("Label")),
get_theme_font_size(SNAME("font_size"), SNAME("Label")),
- vformat("%s u", String::num(cursor.distance).pad_decimals(precision)));
+ vformat("%s u", String::num(cursor.distance).pad_decimals(precision)),
+ Color(0.7, 0.95, 1.0));
}
}
}