diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/canvas_item.cpp | 3 | ||||
-rw-r--r-- | scene/gui/spin_box.cpp | 2 | ||||
-rw-r--r-- | scene/gui/spin_box.h | 2 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 | ||||
-rw-r--r-- | scene/main/node.cpp | 2 | ||||
-rw-r--r-- | scene/main/node.h | 2 | ||||
-rw-r--r-- | scene/main/scene_tree.cpp | 2 | ||||
-rw-r--r-- | scene/main/scene_tree.h | 2 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 3 | ||||
-rw-r--r-- | scene/resources/animation.cpp | 2 | ||||
-rw-r--r-- | scene/resources/animation.h | 2 | ||||
-rw-r--r-- | scene/resources/surface_tool.cpp | 2 | ||||
-rw-r--r-- | scene/resources/surface_tool.h | 2 |
13 files changed, 16 insertions, 12 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 7d1cf957ed..7368efd21a 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -968,6 +968,9 @@ float CanvasItem::draw_char(const Ref<Font> &p_font, const Point2 &p_pos, const ERR_FAIL_COND_V(p_char.length() != 1, 0); ERR_FAIL_COND_V(p_font.is_null(), 0); + if (p_font->has_outline()) { + p_font->draw_char(canvas_item, p_pos, p_char[0], p_next.c_str()[0], Color(1, 1, 1), true); + } return p_font->draw_char(canvas_item, p_pos, p_char[0], p_next.c_str()[0], p_modulate); } diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index e778af3ceb..279253889c 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -173,7 +173,7 @@ void SpinBox::_line_edit_focus_exit() { _text_entered(line_edit->get_text()); } -inline void SpinBox::_adjust_width_for_icon(const Ref<Texture> icon) { +inline void SpinBox::_adjust_width_for_icon(const Ref<Texture> &icon) { int w = icon->get_width(); if (w != last_w) { diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h index 49dc6d950c..9cf977d2d6 100644 --- a/scene/gui/spin_box.h +++ b/scene/gui/spin_box.h @@ -62,7 +62,7 @@ class SpinBox : public Range { void _line_edit_focus_exit(); - inline void _adjust_width_for_icon(const Ref<Texture> icon); + inline void _adjust_width_for_icon(const Ref<Texture> &icon); protected: void _gui_input(const Ref<InputEvent> &p_event); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 7a937843ab..ff0c723141 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -683,7 +683,7 @@ void TextEdit::_notification(int p_what) { } if (line_length_guideline) { - int x = xmargin_beg + cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs; + int x = xmargin_beg + (int)cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs; if (x > xmargin_beg && x < xmargin_end) { VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color); } diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 5888760973..cf1bd96483 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1759,7 +1759,7 @@ bool Node::has_persistent_groups() const { return false; } -void Node::_print_tree_pretty(const String prefix, const bool last) { +void Node::_print_tree_pretty(const String &prefix, const bool last) { String new_prefix = last ? String::utf8(" ┖╴") : String::utf8(" ┠╴"); print_line(prefix + new_prefix + String(get_name())); diff --git a/scene/main/node.h b/scene/main/node.h index 9b9ca06455..982bfcd620 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -152,7 +152,7 @@ private: Ref<MultiplayerAPI> multiplayer; - void _print_tree_pretty(const String prefix, const bool last); + void _print_tree_pretty(const String &prefix, const bool last); void _print_tree(const Node *p_node); Node *_get_child_by_name(const StringName &p_name) const; diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 0940a59a82..5eeaff6411 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1249,7 +1249,7 @@ void SceneTree::_update_root_rect() { } } -void SceneTree::set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize, real_t p_shrink) { +void SceneTree::set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 &p_minsize, real_t p_shrink) { stretch_mode = p_mode; stretch_aspect = p_aspect; diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 0bcb724929..98f2fe5e35 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -386,7 +386,7 @@ public: void get_nodes_in_group(const StringName &p_group, List<Node *> *p_list); bool has_group(const StringName &p_identifier) const; - void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 p_minsize, real_t p_shrink = 1); + void set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, const Size2 &p_minsize, real_t p_shrink = 1); void set_use_font_oversampling(bool p_oversampling); bool is_using_font_oversampling() const; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 334c49f7cc..24c8ee31b2 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1431,6 +1431,7 @@ void Viewport::_gui_show_tooltip() { Control *which = NULL; String tooltip = _gui_get_tooltip(gui.tooltip, gui.tooltip->get_global_transform().xform_inv(gui.tooltip_pos), &which); + tooltip = tooltip.strip_edges(); if (tooltip.length() == 0) return; // bye @@ -1460,7 +1461,7 @@ void Viewport::_gui_show_tooltip() { gui.tooltip_label->set_anchor_and_margin(MARGIN_TOP, Control::ANCHOR_BEGIN, ttp->get_margin(MARGIN_TOP)); gui.tooltip_label->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -ttp->get_margin(MARGIN_RIGHT)); gui.tooltip_label->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_END, -ttp->get_margin(MARGIN_BOTTOM)); - gui.tooltip_label->set_text(tooltip.strip_edges()); + gui.tooltip_label->set_text(tooltip); } rp->add_child(gui.tooltip_popup); diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index af2a8c931f..64051fe304 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -863,7 +863,7 @@ Error Animation::transform_track_get_key(int p_track, int p_key, Vector3 *r_loc, return OK; } -int Animation::transform_track_insert_key(int p_track, float p_time, const Vector3 p_loc, const Quat &p_rot, const Vector3 &p_scale) { +int Animation::transform_track_insert_key(int p_track, float p_time, const Vector3 &p_loc, const Quat &p_rot, const Vector3 &p_scale) { ERR_FAIL_INDEX_V(p_track, tracks.size(), -1); Track *t = tracks[p_track]; diff --git a/scene/resources/animation.h b/scene/resources/animation.h index 59f2ae24c7..6fff77d746 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -314,7 +314,7 @@ public: float track_get_key_time(int p_track, int p_key_idx) const; float track_get_key_transition(int p_track, int p_key_idx) const; - int transform_track_insert_key(int p_track, float p_time, const Vector3 p_loc, const Quat &p_rot = Quat(), const Vector3 &p_scale = Vector3()); + int transform_track_insert_key(int p_track, float p_time, const Vector3 &p_loc, const Quat &p_rot = Quat(), const Vector3 &p_scale = Vector3()); Error transform_track_get_key(int p_track, int p_key, Vector3 *r_loc, Quat *r_rot, Vector3 *r_scale) const; void track_set_interpolation_type(int p_track, InterpolationType p_interp); InterpolationType track_get_interpolation_type(int p_track) const; diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 2588e41951..b294991248 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -769,7 +769,7 @@ void SurfaceTool::create_from(const Ref<Mesh> &p_existing, int p_surface) { material = p_existing->surface_get_material(p_surface); } -void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String p_blend_shape_name) { +void SurfaceTool::create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String &p_blend_shape_name) { clear(); primitive = p_existing->surface_get_primitive_type(p_surface); Array arr = p_existing->surface_get_blend_shape_arrays(p_surface); diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h index c4c71dca13..e3aec6ce0e 100644 --- a/scene/resources/surface_tool.h +++ b/scene/resources/surface_tool.h @@ -136,7 +136,7 @@ public: static Vector<Vertex> create_vertex_array_from_triangle_arrays(const Array &p_arrays); Array commit_to_arrays(); void create_from(const Ref<Mesh> &p_existing, int p_surface); - void create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String p_blend_shape_name); + void create_from_blend_shape(const Ref<Mesh> &p_existing, int p_surface, const String &p_blend_shape_name); void append_from(const Ref<Mesh> &p_existing, int p_surface, const Transform &p_xform); Ref<ArrayMesh> commit(const Ref<ArrayMesh> &p_existing = Ref<ArrayMesh>(), uint32_t p_flags = Mesh::ARRAY_COMPRESS_DEFAULT); |