summaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
AgeCommit message (Collapse)Author
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
2018-12-17Don't accidentally convert string content to charHein-Pieter van Braam
Due to the right hand side of the :? trickery the rhs was cast to a char losing precision. Previously this didn't matter, but with CharProxy it does. (Previously we could just happily cast it back to a wchar_t and get the original 16 - 32 bits. Now we'll only ever get the first 8).
2018-12-17Label: Fix kerning when using Uppercase modeRémi Verschelde
Seemingly a typo, I did not check what exact impact it had, but the x_ofs would likely have accumulated errors when using fonts with varying char widths.
2018-11-15Fix return value of get_total_character_countThomas ten Cate
Also document that it only counts visible characters. Fixes #23720
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-10-04fix enum cast warnings on clangkarroffel
2018-09-19Fix Label::get_minimum_size not updating cache size for autowrapGuilherme Felipe
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-07-18Fix Label autowrap clips textvolzhs
2018-05-14Ceil char width within Label instead of FontRuslan Mustakov
Some classes use Font::get_char_size directly and not only for autowrapping. RichTextLabel is one such example. So this commit reverts aa8561d (PR #17504) and instead ceils character width within Label. This makes sure Label autowraps correctly while not affecting other Font clients. Fixes #18835.
2018-05-08Always emit dynamic font change in update_oversamplingRuslan Mustakov
Fixes #15787. The issue occurred when two (or more) separate DynamicFont instances used the same DynamicFontAtSize instance due to having equal properties. The first instance updated its data_at_size and emitted "changed" signal, but the second did not because it considered the data_at_size to be up to date, even though it has just been updated.
2018-05-08Perfect FreeType-based outlines for DynamicFontsRuslan Mustakov
- Implement outlines based on FreeType Stroker API. This allows artifact-free results, similar to what you will see in Web or any text editing tools. Outline is a part of DynamicFont rather than Label, because outlines have to be baked into the font's atlas. Font has a default outline_color and a Label can specify font_outline_modulator that will be multiplied with the Font's color to get the final result. - draw_char now has to be called twice to fully render a text - first with p_outline == true for each character and then with p_outline == false for each character. - Number of draw-calls is reduced from 5 to 2 per outlined character. - Overall cleanup of DynamicFont code, extracted duplicated code pieces into separate methods. - The change is backward-compatible - Labels still have outline properties that work exactly as they worked before. Closes #16279.
2018-01-12Bind many more properties to scriptsBojidar Marinov
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-12-19Added font oversampling supportJuan Linietsky
2017-09-02Fix use of unitialized variablesHein-Pieter van Braam
The second in my quest to make Godot 3.x compile with -Werror on GCC7
2017-08-31Merge pull request #10096 from toger5/label_styleboxRémi Verschelde
fixed Import LineEdit to label + label stylebox
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-20ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry
2017-08-19Fixes to label and code editor to make editing code hopefully fast again.Juan Linietsky
2017-08-18Rename localization method to `tr` againRémi Verschelde
Partial revert of #10380 based on contributor ~~bullying~~ feedback.
2017-08-17Rename `XL_MESSAGE` aka `tr` to `localize`Rémi Verschelde
Also renames `set_message_translation` to `set_message_localization` for consistency.
2017-08-17fixed Import LineEdit to label + label styleboxtoger5
- added a normal stylebox to label. default is StyleBoxEmpty - changed drawing so that it draws correct with styleboxes with margins - changed the LineEdit in the import to use a label with the lineEdit stylebox
2017-07-25Label: update min size when regenerate wordcachePoommetee Ketson
2017-07-21Label: add auto_heightPoommetee Ketson
2017-07-19-Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky
-Added system for feature overrides, it's pretty cool :)
2017-07-17Change label so they appear vertically alligned on fillJuan Linietsky
2017-06-28Reworked translation systemJuan Linietsky
-Label and Button reload translation on the fly -Resources are loaded and reload depending on locale
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-02-21-renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky
modified files) -.pck and .zip exporting redone, seems to be working..
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-02-13Remove use of _SCS from ADD_METHODHein-Pieter van Braam
This saves typing and is a step towards fixing #56
2017-01-16Style: Fix statements ending with ';;'Rémi Verschelde
2017-01-09-Translation text will change automatically for in-game buttons, labels, ↵Juan Linietsky
poups when translation is changed. -Added a NOTIFICATION_TRANSLATION_CHANGED for controls that need custom code -Sorry, editor will not update automatically because it uses a different translatio method.
2017-01-09-All types have editable script now in propertiesJuan Linietsky
-Changed clip to a property in Control which can be set by the user
2017-01-08-removed stop mouse and ignore mouse from control, which were confusing, ↵Juan Linietsky
replaced by mouse filter
2017-01-02ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky
Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
2017-01-01Welcome in 2017, dear changelog reader!Rémi Verschelde
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
2016-11-07Fix Label valign positionvolzhs
Fix #7055
2016-11-04fix a tiny typoScotFlux
2016-08-02Added extra spacing support for DynamicFontZher Huei Lee
Side effect is that label min-size will now take into account kerning.
2016-07-18Label: Added `get_visible_line_count` methodIgnacio Etcheverry
2016-07-09line/col label was changing size with each cursor move, forcing the GUI to ↵Juan Linietsky
resize upwards and costing considerably CPU usage. It has been changed so it won't resize the UI when modified. This will make the code editor feel a lot smoother.
2016-07-07Remove unused variables (third pass) + dead codeRémi Verschelde
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable