Commit graph

124 commits

Author SHA1 Message Date
bruvzg
46af7cbfdd
[RTL] Add option to apply built-in effects to the individual connected glyphs. 2022-09-19 18:10:32 +03:00
bruvzg
2a0b4244b7
Fix RichTextLabel not updating on theme/theme override change until text is updated. 2022-09-16 22:24:11 +03:00
Yuri Sizov
fc7cef8dec Fix theme propagation in various parts of the editor 2022-09-02 13:18:31 +03:00
Micky
64bd36ecee Rename Label & RichTextLabel.percent_visible to visible_ratio
Also updates the documentation of both `visible_characters` and `visible_ratio` to, better describe what they do and improve consistency between the two Classes.
2022-08-26 12:15:57 +02:00
bruvzg
80a47ab0f9
[RTL] Improve meta click position. 2022-08-23 09:57:22 +03:00
bruvzg
94e5ad2019
[RichTextLabel] Fix theme bold / italics / bold italics and mono font size not applied correctly. 2022-07-26 10:45:40 +03:00
Rindbee
74f99f7fa3 Make the meta click area fit
Eliminate the click vacuum area, mainly the indentation generated by indent/ul/ol tags
2022-07-13 07:12:22 +08:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
bruvzg
b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
iwek
c179ba665a Fix richTextLabel scroll showing 2022-06-05 20:33:17 +02:00
bruvzg
cfcdfc38e2
[RTL] Add support for shaping in background thread. 2022-05-19 09:34:44 +03:00
bruvzg
be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
ConteZero
645aded7e9 Add context menu to RichTextLabel 2022-04-12 16:28:38 +02:00
ConteZero
addadaaa24 Add select_all() to RichTextLabel 2022-04-10 18:03:10 +02:00
bruvzg
9c61fa7ad8
[RTL] Improve table cell selection. 2022-04-06 09:03:08 +03:00
ConteZero
45159e88e1 Add deselect() to RichTextLabel 2022-04-04 16:06:57 +02:00
Rémi Verschelde
19950076b1
Merge pull request #58394 from bruvzg/rtl_hint 2022-03-18 14:49:13 +01:00
Hugo Locurcio
a06f82ca4d
Add optional constructor arguments to more Control nodes
This can be used to make editor code more compact.
However, as of writing, these constructor arguments cannot be used
from the scripting API.

This was already provided for Label and CheckBox, but it was missing
for other Control nodes where it made sense to provide a default value.
2022-03-04 09:48:41 +01:00
bruvzg
7385c3602d
Add RichTextLabel "hint" tag. 2022-02-21 19:34:16 +02:00
Rémi Verschelde
eeda603355
Merge pull request #58055 from markdibarry/add_get_line_offset 2022-02-16 14:07:23 +01:00
markdibarry
c0caafe960 Add offset methods for lines and paragraphs in RichTextLabel
Adds `get_line_offset` and `get_paragraph_offset` methods to `RichTextLabel`

Fix arg mismatch
2022-02-13 13:15:21 -05:00
markdibarry
ae7eec53c0 Add get_character_line method for RichTextLabel
Adds the ability to get the line number of provided character position

Fix arg name

Add get_character_paragraph

Replaced glyph logic with code suggestions, added get_character_paragraph method

Run doctool

Use built-in method

Replace TS access with built in method
2022-02-13 11:12:12 -05:00
Rémi Verschelde
9abf5f01fd
Merge pull request #55207 from ConteZero/rich_text_label_drag 2022-02-10 22:14:08 +01:00
ConteZero
cb222f6c9d Add drag to RichTextLabel 2022-02-10 20:24:28 +01:00
markdibarry
29c21ac590 Add get_content_width method
Adds a get_content_width method to RichTextLabel
2022-02-10 10:56:11 -05:00
bruvzg
ead6f67670
Add auto-wrap mode property to the RichTextLabel, set default auto-wrap mode to AUTOWRAP_WORD_SMART to match 3.x behavior. 2022-02-03 16:04:07 +02:00
bruvzg
215bede6ff
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer. 2022-02-02 11:20:44 +02:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde
1032c2c434
Merge pull request #55487 from YeldhamDev/scroll_bikeshedding 2022-01-03 14:10:41 +01:00
Rémi Verschelde
1906b59675
Merge pull request #55636 from bruvzg/vis_char_modes
Add different "visible characters" behavior modes.
2021-12-23 00:43:33 +01:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
bruvzg
ad4408d413
Add different "visible characters" behavior modes. 2021-12-06 12:14:49 +02:00
Michael Alexsander
ec4f4c6cda Rename all methods that return ScrollBar nodes to get_*_scroll_bar() 2021-11-30 13:46:36 -03:00
bruvzg
5f9cd9ccbc Fix Label and RichTextLabale text shadows and shadow outlines. 2021-11-06 10:22:09 +02:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Rémi Verschelde
21529c90f8
Merge pull request #54166 from ConteZero/unique_selection 2021-10-27 20:50:54 +02:00
ConteZero
fbee4efa5f Add option to make selection unique 2021-10-27 19:45:52 +02:00
Haoyu Qiu
4f8dfa1667 Make RichTextLabel's parse_bbcode and append_text return void 2021-10-23 14:25:39 +08:00
bruvzg
c931906af7 Add flag to connected grapheme. Apply RTL displacement FX only to the whole connected grapheme. Pass more glyph info to the custom RTL FX. 2021-09-21 13:51:38 +03:00
HaSa1002
053b3b946c
Remove bbcode_text from RichTextLabel
Also renames:
 - append_bbcode -> append_text
 - get_bbcode -> get_text
 - set_bbcode -> set_text
 - get_text -> get_parsed_text

Property text is:
set_text
get_text
2021-09-16 22:27:08 +02:00
William Deurwaarder
d875706e01 RichTextLabel returns member (Array) for custom effects for Editor
As RichTextLabel returned a copy of the member (Vector) the editor was notified
that the value had changed which caused the dropdown menu to be immediately
closed after opening.

The fix is to return the member (Array) in stead of a copy which is the same
instance and thereby does not notify the editor that the value has changed.
2021-08-24 22:02:24 +02:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
Aaron Franke
84f720966c
Use doubles for time in many other places 2021-08-09 14:05:42 -05:00
bruvzg
7c3c5603d0 [Text Server] Improve object (image/table) inline alignment. 2021-08-08 22:35:47 +03:00
Rémi Verschelde
953de68cfc
Merge pull request #35608 from golfinq/master 2021-06-20 18:51:15 +02:00
golfinq
0c1d10d1ca Rich Text Label now allows for foreground colors and background colors 2021-06-20 11:29:37 -04:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Gregory Basile
8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
Eric M
471f7f1a75 Fixed implementation of RTL remove_line(), which fixed issues in EditorLog.
There were some issues in RichTextLabel `remove_line()` method, where items were not correctly removed, and line decremending for items in later lines was not correctly done.
This also fixed several headaches with EditorLog, which relied on the `remove_line()` method for collapsing of duplicate messages. The fix to RTL also fixed the issues with EditorLog.

Fixes #49030
2021-05-26 15:08:13 +10:00
Eric M
77fd9e4dd3 Improve output log performance.
Added method to create a new line in RichTextLabel without adding an ItemNewline to the previous line. Previously, removing a line then adding a newline was adding unnecessary ItemNewline instances to the previous line, significantly the remove_line method.
2021-05-04 16:21:33 +10:00