summaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
AgeCommit message (Collapse)Author
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.
2021-05-23Fix valign with stylebox borderskobewi
2021-03-07fix Label visible_characters bad precisionjmb462
2021-02-21Label::set_lines_skipped Fail if passed a negative valuekleonc
2021-02-12Keep Label's min height when emptyMichael Alexsander
2021-02-10Removed _change_notifyreduz
-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.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-24Change themes *_color_* to *_*_colorMarcel Admiraal
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
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-23Rename Control margin to offsetMarcel Admiraal
2020-12-07[Complex Text Layouts] Performance optimizations.bruvzg
2020-12-06[Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, ↵bruvzg
TextEdit, TextLine and TextParagraph. Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
2020-11-26[Complex Text Layouts] Refactor Label and LineEdit controls.bruvzg
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-09-05Merge pull request #40649 from themvl/masterRémi Verschelde
Fix bug where leading and trailing spaces werent taken into account with center and right allignment
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-08-31Fix bug where leading and trailing spaces werent taken into account with ↵mvl
center and right allignment.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
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.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-01-28Revert "make Label consider spaces for visible_characters"Rémi Verschelde
This reverts commit 695980a0f21adbe66eb12e1015fdc8c51fb62bf9. Fixes #35668.
2020-01-10Update minimum size on Label::set_autowrapHaoyu Qiu
If `clip_text` is true, the minimum height is one line if `autowrap` is true , or one pixel otherwise.
2020-01-08Merge pull request #34874 from wingedadventurer/bugfix-label-visible-charactersRémi Verschelde
Make Label node consider spaces for visible_characters property
2020-01-06make Label consider spaces for visible_characterswingedadventurer
2020-01-07Calculate label size more accuratelyvolzhs
2020-01-06Fix calculating label sizevolzhs
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-11-04Fixed cases where labels with autowrap can overflow the editor uiPouleyKetchoupp
Fixes #33155
2019-10-16Allow Label autowrap to cut words when they exceed line widthPouleyKetchoupp
Fixes #30832
2019-06-28Draw the outline as part of the Label font shadowHugo Locurcio
This closes #30165.
2019-06-26Some code changed with Clang-Tidyqarmin
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-18Merge pull request #24428 from akien-mga/label-uppercaseRémi Verschelde
Label: Fix kerning when using Uppercase mode