summaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
AgeCommit message (Collapse)Author
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
2016-06-09Fix last line of label being deleted by line spacingJuan Linietsky
2016-06-09Revert "Fix min size bug of Label"Juan Linietsky
2016-06-06Fix min size bug of Labelvolzhs
caused by #5030
2016-06-04fix line_edit&label get min size bugsanikoyes
fix line_edit draw char(x ofs_max)
2016-05-17-Added configuration warning system for nodesJuan Linietsky
-Added a new "add" and "instance" buttons for scene tree -Added a vformat() function to ease translation work
2016-01-01Update copyright to 2016 in headersGeorge Marques
2015-09-08fix minsize-related issues with LabelZher Huei Lee
- fixed end of string adding to Label minsize - exposed set_clip_text() and is_clipping_text() to the script side - text would now never stick outside its boundaries - label min-height is now restricted by max_lines_visible
2015-09-07added get_visible_characters() to LabelZher Huei Lee
2015-09-07reworked Label classZher Huei Lee
- no longer inherits Range - instead, more sensible function names controlling lines visible - more accurate vertical alignment - percent_visible preserved even after setting new text
2015-06-29Several performance improvements, mainly in loading and instancing scenes ↵Juan Linietsky
and resources. A general speedup should be apparent, with even more peformance increase when compiling optimized. WARNING: Tested and it seems to work, but if something breaks, please report.
2015-05-19fixed latin separation in label, broke it? for cjkJuan Linietsky
changed non-separatable character detection so latin works properly. This is probably incorrect. If you speak chinese, korean or japanese, please help me fix it. closes #1935
2015-05-06clearified parenthesis of if constructehriche
2015-05-01Optimize the code.Gen