diff options
| author | Carl Olsson | 2015-03-23 08:19:20 +1000 |
|---|---|---|
| committer | Carl Olsson | 2015-03-23 08:19:20 +1000 |
| commit | fb2cdfe7edcc2ccafea7604afd104f582e5b9c17 (patch) | |
| tree | d9555d9519648f95d7ed3663fbca50978bb12a1f /scene/gui/label.cpp | |
| parent | 41686d5fdd0d72f167894f976d19b177789f1f63 (diff) | |
| parent | e9f94ce8d2cc6805e74fffdf733e6dc5b5c530f5 (diff) | |
| download | godot-fb2cdfe7edcc2ccafea7604afd104f582e5b9c17.tar.gz godot-fb2cdfe7edcc2ccafea7604afd104f582e5b9c17.tar.zst godot-fb2cdfe7edcc2ccafea7604afd104f582e5b9c17.zip | |
Merge branch 'master' of https://github.com/not-surt/godot into snapping2
Conflicts:
tools/editor/plugins/canvas_item_editor_plugin.cpp
tools/editor/plugins/canvas_item_editor_plugin.h
Diffstat (limited to 'scene/gui/label.cpp')
| -rw-r--r-- | scene/gui/label.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index d2e1e7f0b..892e4c9bc 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -72,6 +72,7 @@ void Label::_notification(int p_what) { if (clip && !autowrap) VisualServer::get_singleton()->canvas_item_set_clip(get_canvas_item(),true); + if (word_cache_dirty) regenerate_word_cache(); @@ -87,7 +88,8 @@ void Label::_notification(int p_what) { bool use_outlinde = get_constant("shadow_as_outline"); Point2 shadow_ofs(get_constant("shadow_offset_x"),get_constant("shadow_offset_y")); - + VisualServer::get_singleton()->canvas_item_set_distance_field_mode(get_canvas_item(),font.is_valid() && font->is_distance_field_hint()); + int font_h = font->get_height(); int line_from=(int)get_val(); // + p_exposed.pos.y / font_h; int lines_visible = size.y/font_h; |
