1
0
Fork 0
Commit Graph

628 Commits

Author SHA1 Message Date
Rémi Verschelde cbb1e0ef7a
Merge pull request #103653 from dugramen/popup_respect_scale
Apply transforms for LineEdit, RichTextLabel, and TextEdit popup positions
2025-03-12 22:56:58 +01:00
dugramen ad812cf29d Apply transform for LineEdit, RichTextLabel, and TextEdit popup positions 2025-03-08 17:57:44 -05:00
Thaddeus Crews 3c43508ed7
Merge pull request #102427 from AThousandShips/fix_substr
Clean up some uses of `String::substr`
2025-03-07 15:12:33 -06:00
Thaddeus Crews 6b4fda04c9
Merge pull request #89442 from KoBeWi/internal_duplicaten't
Don't duplicate internal nodes
2025-03-07 12:06:36 -06:00
Thaddeus Crews 5e48f26e7f
Merge pull request #103580 from yangyey/bugfixing
Add space for BBCode Ordered Lists
2025-03-07 12:06:32 -06:00
kobewi 92ab92114e Don't duplicate internal nodes 2025-03-07 16:08:53 +01:00
A Thousand Ships 5113022dfe
Clean up some uses of `String::substr`
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
Pedro Yang 9270fcd9d2 Fix #103433: Added space for BBCode Ordered Lists
Now [ol] and [ul] have a seperating space by default
2025-03-04 20:01:18 +00:00
Pāvels Nadtočajevs 7397e33cc9 Fix text shadow outline draw batching. 2025-03-02 19:28:48 +02:00
A Thousand Ships 5dcab0e606
Prevent some internal nodes being duplicated in Controls 2025-02-10 13:27:08 +01:00
Thaddeus Crews 4186f57fe8
Merge pull request #102344 from bruvzg/rtl_reg
[RTL] Fix updating region without updating texture.
2025-02-04 09:04:06 -06:00
Pāvels Nadtočajevs 5b57904bef [RTL] Fix updating region without updating texture. 2025-02-03 00:06:55 +02:00
Pāvels Nadtočajevs 50740c4e91 Make `CharFXTransform.font` property read only, add some extra documentation notes. 2025-02-02 23:08:35 +02:00
Pāvels Nadtočajevs a5e8c266af [RTL] Fix `ready` signal sent too early in single threaded RTL. 2025-01-21 08:37:08 +02:00
Pāvels Nadtočajevs 88a719f291 [RTL] Fix character effect offset. 2025-01-14 11:56:24 +02:00
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
Rémi Verschelde 2c521ea57d Merge pull request #101481 from bruvzg/rtl_fade
[RTL] Fix "fade" effect char index calculations.
2025-01-13 20:22:37 +01:00
HolonProduction 617e3456fd Allow dragging selection when selecting whole words in `RichTextLabel` 2025-01-13 09:56:09 +01:00
Pāvels Nadtočajevs c5dc6e1c6d [RTL] Fix "fade" effect char index calculations. 2025-01-13 08:11:59 +02:00
Rémi Verschelde 2e657bf2ae Merge pull request #101205 from voylin/get_visible_line_count_fix
Fix `get_visible_line_count` in RichTextLabel
2025-01-09 13:50:51 +01:00
voylin 3e333df623
fix get_visible_lint_count in RichTextLabel 2025-01-09 10:24:52 +09:00
bruvzg cc1db569e1 [TextServer] Improve embedded objects handling performance. 2025-01-07 08:01:29 +02: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
A Thousand Ships a1846b27ea
Improve use of `Ref.is_null/valid`
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Yufeng Ying 73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08: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
Robin Ward 1e749f628e Fix user selection on top of `bgcolor` areas in a `RichTextLabel` 2024-12-09 11:37:37 -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
Rémi Verschelde 0c4ad02e6d
Merge pull request #99668 from bruvzg/rtl_rn_notes
[RTL] Parse "\r\n" as a single paragraph break, add some documentation notes.
2024-12-02 17:20:35 +01:00
Rémi Verschelde e78ad1dfca
Merge pull request #99665 from bruvzg/rtl_clean
[RTL] Fix clearing text with `set_text("")`.
2024-12-02 17:20:31 +01:00
Pāvels Nadtočajevs 2210dd1126 [RTL] Parse "\r\n" as a single paragraph break, add some documentation notes. 2024-12-02 17:50:04 +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 680142984d
Merge pull request #98450 from bruvzg/rtl_img_align
[RTL] Allow setting image alignment as separate bbcode argument.
2024-11-29 22:46:33 +01: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
Pāvels Nadtočajevs a2b8b51097 [RTL] Fix clearing text with `set_text("")`. 2024-11-25 09:36:53 +02:00
Michael Alexsander 250de088e3
Fix `RichTextLabel`'s modified stack being wiped on translation changes 2024-11-22 16:09:26 -03:00
A Thousand Ships 68f638cf02
Use `(r)find_char` instead of `(r)find` for single characters 2024-11-17 10:02:18 +01:00
bruvzg 503574441e
[RTL] Allow setting image alignment as separate bbcode argument. 2024-10-23 10:15:33 +03:00
bruvzg 7ed90a4f07
[RTL] Add support for vertical alignment. 2024-10-08 09:58:54 +03:00
kobewi 9bf6148e00 Handle scroll events in RichtTextLabel 2024-10-02 15:47:36 +02:00
Haoyu Qiu 14321b8ed5 Set auto translate mode for drag previews
- Controls
  - `LineEdit`, `TextEdit`: Always disabled since it's dragging user input.
  - `TabBar`: Use the same auto translate mode as the node.
  - `RichTextLabel`: Always disable since auto translation is done
    differently from other controls (selection text you get
    programmatically is always after auto translation).
- Editor
  - Disable drag preview auto translation if the text is user input,
    filename, or class name.
  - Also disabled unexpected auto translation for audio bus effect names.
2024-09-19 19:21:29 +08:00
bruvzg e517eaf053
[RTL] Fix font not updated for some spans. 2024-09-11 23:02:00 +03:00
bruvzg ccf837b75e
[RTL] Fix internal process incorrectly disabled on appending text. 2024-09-08 18:07:55 +03:00
bruvzg b59fd28dec
[RTL] Improve BBCode parsing. 2024-09-06 13:50:47 +03:00
Rémi Verschelde 5abb206040
Merge pull request #96247 from bruvzg/rtl_draw_order
[RTL] Move image/table draw to the `DRAW_STEP_TEXT`
2024-09-06 11:11:05 +02:00
bruvzg 02113dff83
[RTL] Do not add final newline to the paragraph context. 2024-09-02 11:11:37 +03:00
bruvzg b4efd27112
[RTL] Move image/table draw to the DRAW_STEP_TEXT 2024-08-29 00:23:57 +03:00
DictyosteliumDiscoideum 1f751516de
Fix RichTextLabel bottom margin for text clipping 2024-08-28 23:24:43 +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
Rémi Verschelde a041772ecf
Merge pull request #93940 from Mickeon/deprecate_RichTextLabel_is_ready
Add RichTextLabel `is_finished()`, deprecate `is_ready()`
2024-08-26 23:28:42 +02:00
Micky edb3d99942 Add RichTextLabel `is_finished()`, deprecate `is_ready()` 2024-08-16 20:08:38 +02:00
bruvzg 932acce8f2
Fix `TextServer::shaped_text_*_character_pos` for the first character of wrapped string. Allow starting/ending RTL selection before line start. 2024-08-09 00:03:00 +03:00
bruvzg 93ccf8e9e4
[RTL] Fix text size rounding with MSDF fonts. 2024-07-22 07:48:29 +03:00
Rémi Verschelde 013ee6a458
Merge pull request #94003 from KernRat/scroll-fix
Fix RichTextLabel + `ui_down` scrolling too far
2024-07-11 00:27:10 +02:00
Rémi Verschelde 17e7253ea8
Merge pull request #93721 from semensanyok/fix-RichTextLabel-fade-start-index
Fix RichTextLabel fade set `start_index` to command offset
2024-07-09 16:47:10 +02:00
KernRat 3f4222bad4
Fixed RichTextLabel + ui_down scrolling too far 2024-07-06 16:58:33 +02:00
Mark DiBarry 6b17d51425 Add alternative pixel rounding 2024-06-29 10:33:39 -04:00
semensanyok 5dffb9b5e6 fix RichTextLabel fade set start_index to command offset 2024-06-28 23:15:21 +02:00
A Thousand Ships fbb879debd
[Scene] Add `SceneStringNames::text/value_changed` 2024-06-19 09:44:38 +02:00
Rémi Verschelde 39ab252ba1
Merge pull request #93140 from bruvzg/rtl_table_bg_sep
[RTL] Fix table h/v separation alignment.
2024-06-18 17:59:13 +02:00
bruvzg 8ac0d81825
[RTL] Fix table h/v separation alignment. 2024-06-15 17:55:08 +03:00
bruvzg 23fbdacef8
[RTL] Fix `align_to_row` for the last table row. 2024-06-13 22:03:34 +03:00
bruvzg fff71db5b1
[RTL] Fix list item prefix width not taken into account. 2024-06-10 13:14:56 +03:00
bruvzg 5e616cedd4
[RTL] Fix nested ordered lists inside unordered lists. 2024-06-04 08:08:16 +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
A Thousand Ships 755a0efbb6
[Scene] Add `SceneStringNames::id_pressed` 2024-05-30 22:54:04 +02:00
bruvzg 3a52e0f5fd
[RTL] Clear default justification flags if custom are set and fix typo in the flag name. 2024-05-30 21:23:26 +03:00
bruvzg 061ad36732
[RTL] Use real text/object height instead of line height for meta click/hover detection. 2024-05-28 11:46:56 +03:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02: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
ajreckof 7faafb1448 Fix RichTextLabel "Scroll Following" randomly stops working. 2024-04-28 12:15:14 +02:00
Rémi Verschelde 7abe0c6014
Merge pull request #90988 from TheSofox/scrolling-signal-fix
Enable `Scrolling` signal when scrolling with middle mouse on `RichTextLabel` or `ScrollContainer`
2024-04-22 22:38:04 +02:00
Sofox 30356a488f Enabled 'Scrolling' signal when scrolling with middle mouse on RichTextLabel/ScrollContainer 2024-04-22 20:44:03 +01:00
bruvzg 0adb55423d
[RTL] Rewrite `remove_paragraph` code. 2024-04-22 10:32:24 +03:00
bruvzg 524a20f460
[RTL] Add support for character code bb tag. 2024-04-15 11:25:50 +03:00
bruvzg d34c1f7733
[RTL] Fix dropcaps and list prefixes not taking visible characters into account. 2024-04-10 11:08:57 +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
A Thousand Ships 79ba22a73f
Use `Vector*` component-wise `min/max/clamp` functions where applicable 2024-03-20 13:47:42 +01:00
bruvzg 433de7f1a8
[RTL] Use "visible characters" property for inline object visibility 2024-03-12 11:28:45 +02:00
bruvzg 42e6cda14e
[RTL] Fix meta hover area detection. 2024-03-04 22:06:16 +02:00
Michael Alexsander d6917d2206
Fix issues with text clearing in `RichTextLabel` 2024-03-02 21:38:32 -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
Michael Alexsander d70c45b5c8
Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
Michael Alexsander aa258c6c12
Fix `RichTextLabel`'s tag stack being overridden on translation change 2024-02-20 12:19:53 -03: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
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Wilson E. Alvarez a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Wilson E. Alvarez 80fb8db31f
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-12-13 11:06:26 -05:00
Rémi Verschelde 8580874d0f
Merge pull request #85363 from bruvzg/rtl_fx_nl
[RTL] Fix CharFX character offset calculation.
2023-12-04 23:12:48 +01:00
Rémi Verschelde cbae80006c
Merge pull request #82079 from RoyBerube/OutputScroll
Enable scrolling of output with UI scale changes
2023-12-04 22:57:33 +01:00
bruvzg 7a59efac32
[RTL] Fix CharFX character offset calculation. 2023-11-26 00:07:46 +02:00