summaryrefslogtreecommitdiffstats
path: root/scene/gui/label.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-211/+214
|
* [RTL / Label] Reorganize property order to ensure "visible_characters" / ↵bruvzg2022-02-111-5/+9
| | | | "percent_visible" are set after the "text".
* [TextServer] Add function to change font, font size, and OpenType features ↵bruvzg2022-02-021-15/+25
| | | | without invalidating line break points, justification points, or recreating shaped text buffer.
* Improve locale detection.bruvzg2022-01-181-1/+1
| | | | | Use separate language, script and country lists. Add locale selection dialog and property hint.
* [TextServer] Implement locale and context sensitive case conversion functions.bruvzg2022-01-171-2/+3
|
* [TextServer] Improvements for line breaking, "Fill" alignment, overrun, and ↵bruvzg2022-01-131-25/+23
| | | | | | | | | | | | 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.
* [TextServer] Improve ligature cursor handling.bruvzg2022-01-091-3/+3
| | | | | | Fix mid-grapheme hit test. Fix OpenType features property handling, add default features override option. Enable mid-grapheme cursor by default.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #55636 from bruvzg/vis_char_modesRémi Verschelde2021-12-231-9/+66
|\ | | | | Add different "visible characters" behavior modes.
| * Add different "visible characters" behavior modes.bruvzg2021-12-061-9/+66
| |
* | Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-1/+1
| | | | | | | | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* | align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-40/+31
| |
* | Rename minimum_size_changed() methodkobewi2021-12-061-5/+5
|/
* Fix Label and RichTextLabale text shadows and shadow outlines.bruvzg2021-11-061-6/+4
|
* Implement TextServer GDExtension interface, remove TextServer GDNative ↵bruvzg2021-10-011-37/+41
| | | | interface.
* Fix RTL layout Label text, VBox child, 3D node editor controls, and popup ↵bruvzg2021-09-211-2/+15
| | | | menu alignment.
* Fix `Label` and `RichTextLabel` `visible_characters` and `percent_visible` ↵bruvzg2021-09-201-56/+29
| | | | methods.
* Merge pull request #52012 from bruvzg/fix_label_outlineRémi Verschelde2021-09-131-7/+70
|\
| * Fix label outline overlaps.bruvzg2021-08-231-7/+70
| |
* | Makes FontData importable resource.bruvzg2021-08-271-10/+13
|/ | | | | | | 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.
* Various text layout improvements (TextLine, TextParagraph, Label, TextServer)Hendrik Brucker2021-08-111-99/+127
|
* Add `auto_translate` toggle for automatic translationMichael Alexsander2021-07-291-2/+2
|
* Optimize StringName usagereduz2021-07-181-22/+22
| | | | | | | | | | | * 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.
* Improvements to Label's layout optionsHendrik Brucker2021-07-041-18/+109
| | | | | | - Added options to trim the text in case it overruns - Added more autowrap modes - Improved line breaking, which ignores trailing spaces
* Update min size on Label::set_textHaoyu Qiu2021-06-211-0/+1
|
* Merge pull request #49011 from KoBeWi/totally_hRémi Verschelde2021-06-151-0/+1
|\ | | | | Fix valign with stylebox borders
| * Fix valign with stylebox borderskobewi2021-05-231-0/+1
| |
* | Tweak dozens of editor property hints for consistencyHugo Locurcio2021-05-251-1/+1
|/ | | | | | - Update Viewport MSAA property hints to match the currently exposed values. - Add some performance hints to property hints.
* fix Label visible_characters bad precisionjmb4622021-03-071-1/+4
|
* Label::set_lines_skipped Fail if passed a negative valuekleonc2021-02-211-0/+1
|
* Keep Label's min height when emptyMichael Alexsander2021-02-121-6/+10
|
* Removed _change_notifyreduz2021-02-101-3/+1
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-2/+2
|
* Change themes *_color_* to *_*_colorMarcel Admiraal2021-01-241-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Changed: font_color_accel -> font_accelerator_color font_color_bg -> font_unselected_color font_color_disabled -> font_disabled_color font_color_fg -> font_selected_color font_color_hover -> font_hover_color font_color_hover_pressed -> font_hover_pressed_color font_color_pressed -> font_pressed_color font_color_readonly -> font_readonly_color font_color_selected -> font_selected_color font_color_shadow -> font_shadow_color font_color_uneditable -> font_uneditable_color icon_color_disabled -> icon_disabled_color icon_color_hover -> icon_hover_color icon_color_hover_pressed -> icon_hover_pressed_color icon_color_normal -> icon_normal_color icon_color_pressed -> icon_pressed_color Also includes: font_outline_modulate -> font_outline_color tab_fg -> tab_selected tab_bg -> tab_unselected
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Rename Control margin to offsetMarcel Admiraal2020-12-231-2/+2
|
* [Complex Text Layouts] Performance optimizations.bruvzg2020-12-071-5/+9
|
* [Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, ↵bruvzg2020-12-061-9/+12
| | | | | | TextEdit, TextLine and TextParagraph. Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
* [Complex Text Layouts] Refactor Label and LineEdit controls.bruvzg2020-11-261-346/+370
|
* [Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg2020-11-261-8/+10
| | | | | | | | use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-3/+3
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Merge pull request #40649 from themvl/masterRémi Verschelde2020-09-051-1/+17
|\ | | | | Fix bug where leading and trailing spaces werent taken into account with center and right allignment
| * Fix bug where leading and trailing spaces werent taken into account with ↵mvl2020-08-311-1/+17
| | | | | | | | center and right allignment.
* | [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-6/+6
|/
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-21/+40
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-58/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-16/+1
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Replace NULL with nullptrlupoDharkael2020-04-021-4/+4
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-2/+2
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.