summaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
AgeCommit message (Collapse)Author
2023-01-09Removed unused property hints and `Object::get_translatable_strings()`Juan Linietsky
* Remove unused `EditorPropertyMember` and related hints, previouly used by VisualScript. Such logic should be implemented in the VS module itself. * As the above broke compatibility with the VS module, clean up the other hacks that were still in core in support of VisualScript. * `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's `get_translatable_strings()`, which is a legacy function not used anywhere. So both are removed. * Reordered some usage flags after the above removal to minimize the diff. * General clean up. Fixes #30203. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-10-09Merge pull request #67083 from RedMser/label-font-warningRémi Verschelde
Add warning for missing characters in label font
2022-10-08Fix Label text length mismatch after localizationHaoyu Qiu
2022-10-08Add warning for missing characters in label fontRedMser
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-01Merge pull request #65213 from Mickeon/fix-label-visible-ratioRémi Verschelde
2022-09-01Fix Label & RichTextLabel's visible_ratio not workingMicky
2022-09-01Add a lifecycle method for manual theme item caching to ControlYuri Sizov
2022-09-01[TextServer] Add support for trimming edge spaces on line break.bruvzg
2022-08-29Rename `CanvasItem.update()` to `queue_redraw()`Micky
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-28Reorganized Label and RichTextLabel propertiesVolTer
2022-08-26Rename Label & RichTextLabel.`percent_visible` to `visible_ratio`Micky
Also updates the documentation of both `visible_characters` and `visible_ratio` to, better describe what they do and improve consistency between the two Classes.
2022-08-23Add some codes, returnes directly if the value is not changed.风青山
Avoid executing the following value-changed logics if the value does not really change.
2022-08-22Clamp Label's `percent_visible` properly between 0 and 1.0Micky
Also applies to RichTextLabel
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-19Merge pull request #62139 from bruvzg/label_font_setttingsRémi Verschelde
Add LabelSettings resource for quick Label theme property override.
2022-07-15Use BitField hint for the TextServer enums. Add missing parts for BitField ↵bruvzg
support to the GDextension API.
2022-07-12Add LabelSettings resource for quick Label theme property override.bruvzg
2022-07-06Refactor Font configuration and import UI, and Font resources.bruvzg
2022-06-16Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the ↵bruvzg
TextServer.
2022-04-22Implement Label3D node.bruvzg
Add "generate_mipmap" font import option. Add some missing features to the Sprite3D. Move BiDi override code from Control to TextServer. Add functions to access TextServer font cache textures. Add MSDF related flags and shader to the standard material. Change standard material cache to use HashMap instead of Vector.
2022-03-17Unify TextServer built-in module and GDExtension code.bruvzg
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-11[RTL / Label] Reorganize property order to ensure "visible_characters" / ↵bruvzg
"percent_visible" are set after the "text".
2022-02-02[TextServer] Add function to change font, font size, and OpenType features ↵bruvzg
without invalidating line break points, justification points, or recreating shaped text buffer.
2022-01-18Improve locale detection.bruvzg
Use separate language, script and country lists. Add locale selection dialog and property hint.
2022-01-17[TextServer] Implement locale and context sensitive case conversion functions.bruvzg
2022-01-13[TextServer] Improvements for line breaking, "Fill" alignment, overrun, and ↵bruvzg
interaction between these modes. Fix "Fill" alignment processing wrong side of the text if overrun trim was applied. Improve "Fill" alignment to avoid adding excessive subsequent spaces or elongations. Add font detection to the overrun, to correctly add ellipsis (was using last glyph font, which doesn't necessary have dot character). Improve line breaking to avoid adding excessive subsequent soft break points for languages without word separator. Port missing overrun/justification code to the Fallback text server. Fix inferred text direction detection by controls. Add tests for "Fill" alignment and line breaking glyph flags.
2022-01-09[TextServer] Improve ligature cursor handling.bruvzg
Fix mid-grapheme hit test. Fix OpenType features property handling, add default features override option. Enable mid-grapheme cursor by default.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-23Merge pull request #55636 from bruvzg/vis_char_modesRémi Verschelde
Add different "visible characters" behavior modes.
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-12-06Rename minimum_size_changed() methodkobewi
2021-12-06Add different "visible characters" behavior modes.bruvzg
2021-11-06Fix Label and RichTextLabale text shadows and shadow outlines.bruvzg
2021-10-01Implement TextServer GDExtension interface, remove TextServer GDNative ↵bruvzg
interface.
2021-09-21Fix RTL layout Label text, VBox child, 3D node editor controls, and popup ↵bruvzg
menu alignment.
2021-09-20Fix `Label` and `RichTextLabel` `visible_characters` and `percent_visible` ↵bruvzg
methods.
2021-09-13Merge pull request #52012 from bruvzg/fix_label_outlineRémi Verschelde
2021-08-27Makes FontData importable resource.bruvzg
Adds multi-channel SDF font texture generation and rendering support. Adds per-font oversampling support. Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading. Adds BMFont binary format and outline support.
2021-08-23Fix label outline overlaps.bruvzg
2021-08-11Various text layout improvements (TextLine, TextParagraph, Label, TextServer)Hendrik Brucker
2021-07-29Add `auto_translate` toggle for automatic translationMichael Alexsander
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-04Improvements to Label's layout optionsHendrik Brucker
- Added options to trim the text in case it overruns - Added more autowrap modes - Improved line breaking, which ignores trailing spaces
2021-06-21Update min size on Label::set_textHaoyu Qiu
2021-06-15Merge pull request #49011 from KoBeWi/totally_hRémi Verschelde
Fix valign with stylebox borders
2021-05-25Tweak dozens of editor property hints for consistencyHugo Locurcio
- Update Viewport MSAA property hints to match the currently exposed values. - Add some performance hints to property hints.