diff options
| author | Anton Yabchinskiy | 2015-04-04 09:31:21 +0300 |
|---|---|---|
| committer | Anton Yabchinskiy | 2015-04-04 09:31:21 +0300 |
| commit | 16746f157f83d666079ba3266acec13d35b84c3f (patch) | |
| tree | 8c872d18ccdef90a15e72622cd0139e0e64801a6 /scene/gui/label.cpp | |
| parent | 43713810deaadfec6a1656767cf5520073e58a06 (diff) | |
| parent | 5d99e15e43d5a446b35d48e8a3b08a478f1998a9 (diff) | |
| download | godot-16746f157f83d666079ba3266acec13d35b84c3f.tar.gz godot-16746f157f83d666079ba3266acec13d35b84c3f.tar.zst godot-16746f157f83d666079ba3266acec13d35b84c3f.zip | |
Merge branch 'master' of github.com:okamstudio/godot
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; |
