Commit graph

188 commits

Author SHA1 Message Date
Pāvels Nadtočajevs
b983b9d9f4 [RTL] Add cell option to control if cell is shrinked to its contents width. 2025-01-13 21:44:06 +02:00
HolonProduction
617e3456fd Allow dragging selection when selecting whole words in RichTextLabel 2025-01-13 09:56:09 +01:00
Rémi Verschelde
c1f65b429d
Merge pull request #100329 from eviltrout/add-custom-line-offset
Add `get_selection_line_offset` to `RichTextLabel`
2025-01-06 22:47:33 +01:00
Rémi Verschelde
8a743f23e6
Merge pull request #98385 from RandomShaper/thread_yield
Rationalize busy waits
2024-12-20 23:56:39 +01:00
havi05
b905014128 Fix RichTextLabel bbcode rainbow play reversed and paused 2024-12-16 23:52:26 +01:00
Thaddeus Crews
4d4c229a83
Merge pull request #100432 from markdibarry/add_get_line_range_rtl
Add `get_line_range()` to `RichTextLabel`
2024-12-16 12:09:54 -06:00
Mark DiBarry
53a1be61a1 Add get_line_range to RTL 2024-12-15 19:09:42 -05:00
Danil Alexeev
80d11500b5
Code Editor: Add documentation tooltips 2024-12-15 10:51:33 +03:00
Pedro J. Estébanez
4f8dd96b3d Rationalize busy waits 2024-12-13 10:14:26 +01:00
Robin Ward
b3e970dde8 Adds get_selection_line_offset to RichTextLabel
This new method allow you to get the line offset of the current
selection (returns -1 if nothing is selected.)

This is useful if you want to pop up a control or menu above the
currently selected text. Previously there was no accurate way to get
this information.

The logic is moved from the implementation of `scroll_to_selection`
verbatim, and that method has been adjusted to avoid repetition.
2024-12-12 16:02:21 -05:00
bruvzg
121e640637 [RTL] Fix indent in tables and tables in indent. 2024-12-03 23:30:08 +02:00
bruvzg
4b23e504e8 [RTL] Keep tag stack between append_text calls. 2024-12-02 18:45:03 +02:00
Pāvels Nadtočajevs
dc71fbacc5 [RTL] Add tooltip support to meta/url tag. 2024-12-02 15:26:14 +02:00
Rémi Verschelde
5d74c5370b
Merge pull request #97963 from bruvzg/rtl_valign
[RTL] Add support for vertical alignment.
2024-11-29 22:46:14 +01:00
Michael Alexsander
250de088e3
Fix RichTextLabel's modified stack being wiped on translation changes 2024-11-22 16:09:26 -03:00
bruvzg
7ed90a4f07
[RTL] Add support for vertical alignment. 2024-10-08 09:58:54 +03:00
bruvzg
b59fd28dec
[RTL] Improve BBCode parsing. 2024-09-06 13:50:47 +03:00
bruvzg
94ad663c0f
[RTL] Expose missing default properties, ensure bbcode is reparserd when these are changed. 2024-08-28 08:43:30 +03:00
Micky
edb3d99942 Add RichTextLabel is_finished(), deprecate is_ready() 2024-08-16 20:08:38 +02:00
bruvzg
fff71db5b1
[RTL] Fix list item prefix width not taken into account. 2024-06-10 13:14:56 +03:00
aaronp64
6ecccd6085 Fix RichTextLabel table overlapping with next line
When calculating table height, RichTextLabel::_shape_line would increase the height when it reached the end of a complete row, or the final cell of the table.  RichTextLabel::_resize_line would only increase the height at the end of a complete row, causing the height to ignore the final row if not all cells were populated.  This would cause the final row to overlap with the following line in the RichTextLabel if it was the last visible line in the RichTextLabel, as _resize_line is called when updating scrolling properties.

This change moves the common table size calculations to a separate function to reuse the code between _shape_line and _resize_line, keeping the final cell check that was used in _shape_line.

Fixes #92603
2024-05-31 16:21:17 -04:00
bruvzg
360d365b33
[RTL] Adds extra argument to remove_paragraph to skip cache invalidation and a method for manual cache invalidation. 2024-05-02 14:03:21 +03:00
Rémi Verschelde
77caf02802
Merge pull request #89705 from bruvzg/rtl_draw_steps
[RTL] Move shadow and foreground/background boxes drawing into a separate draw steps.
2024-04-29 13:00:22 +02:00
bruvzg
0adb55423d
[RTL] Rewrite remove_paragraph code. 2024-04-22 10:32:24 +03:00
bruvzg
fe8737da49
[RTL] Move shadow and foreground/background boxes drawing into a separate draw steps. 2024-04-09 21:44:53 +03:00
bruvzg
2a3de7adc3
[RTL] Add optional push_meta argument to control how meta underline is drawn. 2024-03-01 12:07:06 +02:00
bruvzg
6d17fc1f73
[RTL] Connect image update signals. 2024-01-26 12:18:24 +02:00
Nicholas Foo
c0f8e0061d
Fix RichTextLabel.remove_paragraph crash by popping current 2024-01-16 13:52:19 +02:00
Rémi Verschelde
ca8b229e1c
Merge pull request #80410 from bruvzg/rtl_img_features
[RTL] Add support for image dynamic updating, padding, tooltips and size in percent.
2023-09-26 13:44:46 +02:00
Rémi Verschelde
21cdedb79c
Merge pull request #77819 from 0xafbf/char-fx-tests
Make it possible to change character transform in RichTextEffect
2023-09-26 13:44:28 +02:00
bruvzg
bc6585a5a7
[RTL] Add support for image dynamic updating, padding, tooltips and size in percent. 2023-09-26 09:39:51 +03:00
Yuri Sizov
fe000277ea Bind remaining theme properties to their respective classes
This adds binds for GraphEdit/GraphElement/GraphNode, which were
skipped before due to a rework. This also adds binds for Window,
which was skipped before due to a complicated code organization.

Also adds theme cache entries/direct cache access to a few places
that previously missed it. Some theme properties are now exposed
to other classes via friendships or public getters for convenience.

This removes all string-based theme access from scene/ classes.
2023-09-13 19:31:35 +02:00
Yuri Sizov
2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
Andrés Botero
eee95aff04 Add transform support to CharFXTransform
Use absolute transforms for CharFX

fix formatting
2023-08-23 00:18:37 -05:00
bruvzg
299808cc26
[RTL] Adds "lang" tag to allow overriding language specific text rendering without starting a new paragraph. 2023-08-21 14:56:43 +03:00
Hugo Locurcio
e9f723006a
Use compile-time Unicode string conversion
Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
2023-08-07 10:38:16 +02:00
unknown
cfe98c57b9 Add drag and drop option for line edit and rich text label 2023-07-19 22:18:34 -04:00
Hendrik Brucker
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Yuri Sizov
5c56206e6c Merge pull request #79011 from bruvzg/pop_all
[RTL] Add `pop_all`, `push_context` and `pop_context` methods, and use it for `print_rich` to avoid unclosed tags.
2023-07-14 18:49:21 +02:00
Yuri Sizov
7550b02dfc Merge pull request #77117 from Calinou/richtextlabel-add-pulse-effect
Add a `[pulse]` built-in effect to RichTextLabel
2023-07-12 15:08:43 +02:00
bruvzg
5216a08617
[RTL] Add pop_all, push_context and pop_context methods, and use it for print_rich to avoid unclosed tags. 2023-07-09 19:53:15 +03:00
bruvzg
cda9cd7587
[RTL] Fix multithreaded resizing. 2023-06-14 23:15:16 +03:00
bruvzg
488626701d
Fix editor log flicker. 2023-06-12 20:15:23 +03:00
Hugo Locurcio
70e6c3cbb0
Add a [pulse] built-in effect to RichTextLabel
In games, blinking text is one of the more frequently used animations.
It can be (sparingly) used to bring attention to important messages
in a chat log or inventory tooltip, for instance.

This effect accepts the following options:

- `freq`: How fast text blinks (higher is faster).
- `color`: The target color multiplier for blinking.
  The default mostly fades out text, but not entirely (for better accessibility).
- `ease`: The easing function exponent to use.
  Negative values provide in-out easing, which is why `-2.0` is the default.
2023-06-05 18:45:00 +02:00
Rémi Verschelde
a1058313a9
Merge pull request #75622 from joao-pedro-braz/parse_string_paths_with_quotes_correctly_bb_code
Make sure to normalize subtags when parsing BBCode
2023-05-24 08:45:35 +02:00
João Pedro Braz
8b6e57256f Make sure to normalize subtags when parsing BBCode
This PR makes it so that all subtags are normalized before usage.
Normalization means removing any leading and/or trailing quotation marks
from any given subtag.

Fixes: https://github.com/godotengine/godot/issues/75501
2023-05-23 18:55:06 -03:00
bruvzg
fb78889904
[RichTextLabel] Add support for tab stops. 2023-05-20 22:58:51 +03:00
bruvzg
9163d8c336
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification. 2023-05-15 19:23:54 +03:00
bruvzg
282e4231c2
Improve line BiDi handling, prevent crash on recursive log updates. 2023-04-12 11:39:05 +03:00
Timothée Giet
e861ea5903 Add translation support to RichTextLabel
BUG: 34050
add translation support to RichTextLabel, and respect its Auto Translate setting
2023-04-11 14:17:59 +02:00