aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Ceil char width within Label instead of FontRuslan Mustakov2018-05-141-5/+8
| | | | | | | | | | 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.
* Always emit dynamic font change in update_oversamplingRuslan Mustakov2018-05-081-2/+2
| | | | | | | | | | 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.
* Perfect FreeType-based outlines for DynamicFontsRuslan Mustakov2018-05-081-5/+7
| | | | | | | | | | | | | | | | | | | | | | | - 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.
* Bind many more properties to scriptsBojidar Marinov2018-01-121-0/+3
| | | | | | | 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
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Added font oversampling supportJuan Linietsky2017-12-191-1/+1
|
* Fix use of unitialized variablesHein-Pieter van Braam2017-09-021-1/+1
| | | | The second in my quest to make Godot 3.x compile with -Werror on GCC7
* Merge pull request #10096 from toger5/label_styleboxRémi Verschelde2017-08-311-10/+14
|\ | | | | fixed Import LineEdit to label + label stylebox
| * fixed Import LineEdit to label + label styleboxtoger52017-08-171-10/+14
| | | | | | | | | | | | | | - 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
* | Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
| |
* | ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-8/+8
| |
* | Fixes to label and code editor to make editing code hopefully fast again.Juan Linietsky2017-08-191-1/+4
| |
* | Rename localization method to `tr` againRémi Verschelde2017-08-181-2/+2
| | | | | | | | Partial revert of #10380 based on contributor ~~bullying~~ feedback.
* | Rename `XL_MESSAGE` aka `tr` to `localize`Rémi Verschelde2017-08-171-2/+2
|/ | | | | Also renames `set_message_translation` to `set_message_localization` for consistency.
* Label: update min size when regenerate wordcachePoommetee Ketson2017-07-251-6/+1
|
* Label: add auto_heightPoommetee Ketson2017-07-211-8/+8
|
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-1/+1
| | | | -Added system for feature overrides, it's pretty cool :)
* Change label so they appear vertically alligned on fillJuan Linietsky2017-07-171-0/+1
|
* Reworked translation systemJuan Linietsky2017-06-281-1/+6
| | | | | -Label and Button reload translation on the fly -Resources are loaded and reload depending on locale
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-298/+261
| | | | | | | | | | | | | | | | | | | | | | | | 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
* -renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky2017-02-211-1/+1
| | | | | | modified files) -.pck and .zip exporting redone, seems to be working..
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-24/+24
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-9/+9
| | | | This saves typing and is a step towards fixing #56
* Style: Fix statements ending with ';;'Rémi Verschelde2017-01-161-1/+1
|
* -Translation text will change automatically for in-game buttons, labels, ↵Juan Linietsky2017-01-091-16/+22
| | | | | | | 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.
* -All types have editable script now in propertiesJuan Linietsky2017-01-091-1/+2
| | | | -Changed clip to a property in Control which can be set by the user
* -removed stop mouse and ignore mouse from control, which were confusing, ↵Juan Linietsky2017-01-081-1/+1
| | | | replaced by mouse filter
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-24/+24
| | | | | | | | 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()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | 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!
* Fix Label valign positionvolzhs2016-11-071-3/+3
| | | | Fix #7055
* fix a tiny typoScotFlux2016-11-041-2/+2
|
* Added extra spacing support for DynamicFontZher Huei Lee2016-08-021-2/+2
| | | | | Side effect is that label min-size will now take into account kerning.
* Label: Added `get_visible_line_count` methodIgnacio Etcheverry2016-07-181-0/+16
|
* line/col label was changing size with each cursor move, forcing the GUI to ↵Juan Linietsky2016-07-091-1/+3
| | | | | | | 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.
* Remove unused variables (third pass) + dead codeRémi Verschelde2016-07-071-1/+0
| | | | Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
* Fix last line of label being deleted by line spacingJuan Linietsky2016-06-091-1/+3
|
* Revert "Fix min size bug of Label"Juan Linietsky2016-06-091-2/+2
|
* Fix min size bug of Labelvolzhs2016-06-061-2/+2
| | | | caused by #5030
* fix line_edit&label get min size bugsanikoyes2016-06-041-2/+2
| | | | fix line_edit draw char(x ofs_max)
* -Added configuration warning system for nodesJuan Linietsky2016-05-171-3/+5
| | | | | -Added a new "add" and "instance" buttons for scene tree -Added a vformat() function to ease translation work
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* fix minsize-related issues with LabelZher Huei Lee2015-09-081-10/+11
| | | | | | | - 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
* added get_visible_characters() to LabelZher Huei Lee2015-09-071-1/+7
|
* reworked Label classZher Huei Lee2015-09-071-105/+145
| | | | | | | - no longer inherits Range - instead, more sensible function names controlling lines visible - more accurate vertical alignment - percent_visible preserved even after setting new text
* Several performance improvements, mainly in loading and instancing scenes ↵Juan Linietsky2015-06-291-5/+5
| | | | | | | | 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.
* fixed latin separation in label, broke it? for cjkJuan Linietsky2015-05-191-3/+7
| | | | | | 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
* clearified parenthesis of if constructehriche2015-05-061-1/+1
|
* Optimize the code.Gen2015-05-011-66/+31
|