diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 2 | ||||
-rw-r--r-- | scene/resources/material.h | 1 | ||||
-rw-r--r-- | scene/resources/primitive_meshes.h | 3 | ||||
-rw-r--r-- | scene/resources/text_paragraph.cpp | 20 |
4 files changed, 13 insertions, 13 deletions
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 93c7eb43a1..9c76d74fbd 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -407,6 +407,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("minimum_character_width", "LineEdit", 4); theme->set_constant("outline_size", "LineEdit", 0); + theme->set_constant("caret_width", "LineEdit", 1); theme->set_icon("clear", "LineEdit", make_icon(line_edit_clear_png)); @@ -451,6 +452,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("line_spacing", "TextEdit", 4 * scale); theme->set_constant("outline_size", "TextEdit", 0); + theme->set_constant("caret_width", "TextEdit", 1); // CodeEdit diff --git a/scene/resources/material.h b/scene/resources/material.h index 7250544d10..57591bee2f 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -35,7 +35,6 @@ #include "core/templates/self_list.h" #include "scene/resources/shader.h" #include "scene/resources/texture.h" -#include "servers/rendering/shader_language.h" #include "servers/rendering_server.h" class Material : public Resource { diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 75ea6a0f12..aa9682bd80 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -36,11 +36,10 @@ ///@TODO probably should change a few integers to unsigned integers... /** - @author Bastiaan Olij <mux213@gmail.com> - Base class for all the classes in this file, handles a number of code functions that are shared among all meshes. This class is set apart that it assumes a single surface is always generated for our mesh. */ + class PrimitiveMesh : public Mesh { GDCLASS(PrimitiveMesh, Mesh); diff --git a/scene/resources/text_paragraph.cpp b/scene/resources/text_paragraph.cpp index 18e46e5476..c3bdef7b01 100644 --- a/scene/resources/text_paragraph.cpp +++ b/scene/resources/text_paragraph.cpp @@ -561,7 +561,7 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo if (h_offset > 0) { // Draw dropcap. Vector2 dc_off = ofs; - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { if (TS->shaped_text_get_orientation(dropcap_rid) == TextServer::ORIENTATION_HORIZONTAL) { dc_off.x += width - h_offset; } else { @@ -579,7 +579,7 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo ofs.x = p_pos.x; ofs.y += TS->shaped_text_get_ascent(lines_rid[i]) + spacing_top; if (i <= dropcap_lines) { - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { ofs.x -= h_offset; } l_width -= h_offset; @@ -588,7 +588,7 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo ofs.y = p_pos.y; ofs.x += TS->shaped_text_get_ascent(lines_rid[i]) + spacing_top; if (i <= dropcap_lines) { - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { ofs.x -= h_offset; } l_width -= h_offset; @@ -598,7 +598,7 @@ void TextParagraph::draw(RID p_canvas, const Vector2 &p_pos, const Color &p_colo if (width > 0) { switch (alignment) { case HORIZONTAL_ALIGNMENT_FILL: - if (TS->shaped_text_get_direction(lines_rid[i]) == TextServer::DIRECTION_RTL) { + if (TS->shaped_text_get_inferred_direction(lines_rid[i]) == TextServer::DIRECTION_RTL) { if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) { ofs.x += l_width - line_width; } else { @@ -655,7 +655,7 @@ void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outli if (h_offset > 0) { // Draw dropcap. Vector2 dc_off = ofs; - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { if (TS->shaped_text_get_orientation(dropcap_rid) == TextServer::ORIENTATION_HORIZONTAL) { dc_off.x += width - h_offset; } else { @@ -671,7 +671,7 @@ void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outli ofs.x = p_pos.x; ofs.y += TS->shaped_text_get_ascent(lines_rid[i]) + spacing_top; if (i <= dropcap_lines) { - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { ofs.x -= h_offset; } l_width -= h_offset; @@ -680,7 +680,7 @@ void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outli ofs.y = p_pos.y; ofs.x += TS->shaped_text_get_ascent(lines_rid[i]) + spacing_top; if (i <= dropcap_lines) { - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_LTR) { ofs.x -= h_offset; } l_width -= h_offset; @@ -690,7 +690,7 @@ void TextParagraph::draw_outline(RID p_canvas, const Vector2 &p_pos, int p_outli if (width > 0) { switch (alignment) { case HORIZONTAL_ALIGNMENT_FILL: - if (TS->shaped_text_get_direction(lines_rid[i]) == TextServer::DIRECTION_RTL) { + if (TS->shaped_text_get_inferred_direction(lines_rid[i]) == TextServer::DIRECTION_RTL) { if (TS->shaped_text_get_orientation(lines_rid[i]) == TextServer::ORIENTATION_HORIZONTAL) { ofs.x += l_width - length; } else { @@ -772,7 +772,7 @@ void TextParagraph::draw_dropcap(RID p_canvas, const Vector2 &p_pos, const Color if (h_offset > 0) { // Draw dropcap. - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { if (TS->shaped_text_get_orientation(dropcap_rid) == TextServer::ORIENTATION_HORIZONTAL) { ofs.x += width - h_offset; } else { @@ -794,7 +794,7 @@ void TextParagraph::draw_dropcap_outline(RID p_canvas, const Vector2 &p_pos, int if (h_offset > 0) { // Draw dropcap. - if (TS->shaped_text_get_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { + if (TS->shaped_text_get_inferred_direction(dropcap_rid) == TextServer::DIRECTION_RTL) { if (TS->shaped_text_get_orientation(dropcap_rid) == TextServer::ORIENTATION_HORIZONTAL) { ofs.x += width - h_offset; } else { |