Rémi Verschelde
eeda603355
Merge pull request #58055 from markdibarry/add_get_line_offset
2022-02-16 14:07:23 +01:00
Rémi Verschelde
fe8f4cebce
Merge pull request #58154 from markdibarry/fix_scroll_to_line
2022-02-16 14:07:06 +01:00
markdibarry
4d53c086ff
Fix scroll_to_line ignoring line separation
2022-02-15 12:52:11 -05:00
Rémi Verschelde
0f5455230c
Use `switch` consistently in `_notification` (`scene` folder)
2022-02-15 18:44:55 +01:00
Rémi Verschelde
89996be091
Merge pull request #57988 from markdibarry/add_get_last_visible_character_line
2022-02-14 15:22:03 +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
bruvzg
d7f6a4853a
[RTL] Fix "img" tag not setting image size.
2022-02-12 11:48:56 +02:00
bruvzg
2e01a0d7a3
[RTL / Label] Reorganize property order to ensure "visible_characters" / "percent_visible" are set after the "text".
2022-02-11 12:31:13 +02: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
38c6611b91
Merge pull request #57344 from bruvzg/rtl_fix_tab_offset
2022-01-28 14:04:33 +01:00
bruvzg
a2f5f7cccf
Fix RTL table offset, if indent is set.
2022-01-28 12:27:47 +02:00
bruvzg
978f2edeea
[RTL] Fix calculation of the last line height.
2022-01-28 10:13:23 +02:00
bruvzg
0014f0233a
[RTL] Fix min. height calculation when fit_content_height is enabled.
2022-01-27 12:05:21 +02:00
bruvzg
cf3d3a6ffa
Fix RichTextLabel [ol type=1] tag closing.
2022-01-26 13:52:24 +02:00
bruvzg
268bab077f
[RTL] Fix missing line separation in the paragraph offset and click calculation.
2022-01-23 19:09:14 +02:00
Rémi Verschelde
82efb1d262
Merge pull request #53923 from KoBeWi/RichBugLabel
2022-01-19 15:23:13 +01:00
kobewi
42c79161c2
Fix bottom line in editor log
2022-01-19 14:26:31 +01:00
Yuri Sizov
3f5ed098bb
Fix RichTextLabel tables shrinking expanded columns when there is not enough space
2022-01-19 00:44:19 +03:00
Yuri Sizov
3b1c02a139
Fix RichTextLabel not respecting line separation in several cases
2022-01-18 23:01:01 +03:00
bruvzg
40c56ed410
Improve locale detection.
...
Use separate language, script and country lists.
Add locale selection dialog and property hint.
2022-01-18 14:30:00 +02:00
Rémi Verschelde
019474f2b8
Merge pull request #56586 from dalexeev/rtl-bracket-escapes
2022-01-11 16:17:16 +01:00
Haoyu Qiu
df1c64feba
Fix BBCode underline prevents strikethrough from rendering
2022-01-11 12:54:04 +08:00
Rémi Verschelde
d2772af0d8
Merge pull request #54351 from LeaoLuciano/leak-remove-line-richtextlabel
2022-01-07 15:22:24 +01:00
Danil Alexeev
884f1acff8
Add BBCode escape sequences
2022-01-07 11:40:13 +03: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
luz paz
a124f1effe
Fix various typos
...
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05: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
49403cbfa0
Replace String comparisons with "", String() to is_empty()
...
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related
2021-12-09 01:38:46 -06:00
kobewi
ea7cc1dea9
Rename minimum_size_changed() method
2021-12-06 14:02:34 +01: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
Lightning_A
e078f970db
Rename `remove()` to `remove_at()` when removing by index
2021-11-23 18:58:57 -07:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums
2021-11-12 15:37:54 -06:00
Rémi Verschelde
88c4380737
Modules: Make sure to include modules_enabled.gen.h where needed
2021-11-12 13:42:58 +01:00
bruvzg
76d42c7b32
Fix RichTextLabel selection copy with table cells.
2021-11-11 12:06:51 +02:00
bruvzg
5f9cd9ccbc
Fix Label and RichTextLabale text shadows and shadow outlines.
2021-11-06 10:22:09 +02:00
LeaoLuciano
f21b5e4d2f
Fix memory leak in RichTextLabel.remove_line
2021-10-28 07:51:48 -03: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
Rémi Verschelde
b2ab5cb504
Merge pull request #54045 from ConteZero/primary_clipboard_linux_fix_warning
2021-10-23 19:13:34 +02:00
ConteZero
8c48b4a7e0
Fix primary clipboard warning
2021-10-23 15:50:01 +02:00
Haoyu Qiu
4f8dfa1667
Make RichTextLabel's parse_bbcode and append_text return void
2021-10-23 14:25:39 +08:00
Rémi Verschelde
8748247d6f
Merge pull request #53702 from ConteZero/primary_clipboard_linux
2021-10-20 16:35:04 +02:00
Murilo Gonçalves
94cba835eb
Fix: typo in TextParagraph class and docs
2021-10-19 16:38:58 -03:00
ConteZero
838c9d37b4
Added primary clipboard for Linux
2021-10-18 14:01:06 +02:00
Yuri Sizov
bdbb7b3999
Remove EDSCALE dependency from /scene/gui
2021-10-04 15:25:08 +03:00
bruvzg
0c0b5c84b0
Implement TextServer GDExtension interface, remove TextServer GDNative interface.
2021-10-01 15:13:29 +03:00
Anilforextra
cdd912c48e
Construct values only when necessary.
2021-09-25 14:46:45 +05:45
Anilforextra
cc51b045da
Construct values only when necessary.
2021-09-23 22:26:07 +05:45
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
bruvzg
9d0e3cff09
Fix `Label` and `RichTextLabel` `visible_characters` and `percent_visible` methods.
2021-09-20 09:35:24 +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
Rémi Verschelde
39e35ab6ee
Merge pull request #52353 from williamd67/documentation-view-scroll-to-end
...
Documentation view scroll to end
2021-09-14 22:25:58 +02:00
Max Hilbrunner
43c896ac6a
Merge pull request #52082 from williamd67/fix-custom-effects-dropdown-menu
...
RichTextLabel returns member (Array) for custom effects for Editor
2021-09-07 21:52:05 +02:00
William Deurwaarder
b54b0bc580
Fix documentation viewer to scroll to end
...
Extra `line separation` height was not taken into account when the offset for
the different paragraphs (lines) was calculated.
2021-09-02 22:11:14 +02:00
kobewi
a913ae8d56
Add support for internal nodes
2021-08-28 02:07:23 +02:00
bruvzg
4c3f7d1290
Makes FontData importable resource.
...
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03: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
Haoyu Qiu
d12cceadd2
Make RichTextLabel honour default cursor shape property
2021-08-24 22:07:42 +08: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
Menderes
31face36e7
Fix line_separation working incorrectly in find_click of RichTextLabel
...
Apply suggestions from code review
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2021-08-21 00:59:44 +03:00
requizm
39b90802d0
Fix line_separation constant working incorrectly in RichTextLabel
2021-08-20 23:03: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
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations
2021-07-23 17:38:28 -04:00
reduz
6631f66c2a
Optimize StringName usage
...
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.
This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Eric M
cfbdaa2eb7
Fix RichTextLabel custom_effects export to be properly filtered in the Editor
2021-06-25 22:58:46 +10:00
golfinq
0c1d10d1ca
Rich Text Label now allows for foreground colors and background colors
2021-06-20 11:29:37 -04: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
Hugo Locurcio
87f503310b
Tweak dozens of editor property hints for consistency
...
- Update Viewport MSAA property hints to match the currently
exposed values.
- Add some performance hints to property hints.
2021-05-25 02:50:35 +02:00
Eoin O'Neill
c4f976b38b
Attempt to fix rich text label effects processing even when
...
the node is invisible.
ISSUE:47687
2021-05-13 19:59:08 -07:00
Eric M
87ffb213c8
Fixed issues with Editor Log after recent changes
...
Fixed #48446 , Fixed #48443
2021-05-05 00:25:14 +10:00
Rémi Verschelde
4e7ca279fc
Merge pull request #47855 from aaronfranke/doubleclick
...
Rename `doubleclick` to `double_click`
2021-05-04 13:12:17 +02:00
Aaron Franke
0de9a7d803
Rename `doubleclick` to `double_click`
2021-05-04 04:38:08 -04: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
Rafał Mikrut
504bc5cc67
Fix crashes in *_input functions
2021-04-05 08:52:21 +02:00
bruvzg
9f73abfa9f
RichTextLabel: On custom effect change, parse bbcode only if it's enabled and not empty.
2021-03-30 10:20:39 +03:00
bruvzg
9f4893c70b
Use extra font spacing in the RichTextLabel line height calculation, and stylebox size in the minimum size calculation.
2021-03-29 17:26:53 +03:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton
2021-03-23 07:13:23 -04:00
jmb462
25af026d9e
Fix BBCode tables overlap with bottom text
...
New row height was added only if all the column was full.
2021-03-16 10:45:16 +01:00
bruvzg
48698ccb9f
Fix RTL BBCode range regression and selection issues.
2021-03-14 19:54:48 +02:00
Michael Alexsander
4be282a269
Hide more options of disabled properties
2021-03-03 20:51:35 -03:00
Eric M
d91e915d79
Fixed 'nonexistent action' errors spammed at startup on OSX
2021-02-24 23:16:22 +10:00
Eric M
49714b0963
Removed hardcoded shortcuts from /scene and converted to input actions
...
This removes hardcoded actions from things like LineEdit and TextEdit.
Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-02-18 16:22:51 +01:00
PouleyKetchoupp
4586357dde
Expose RichTextLabel selection to script
...
Expose existing get_selection_text and add methods to get the current
selection index from and index to.
2021-02-15 17:26:58 -07:00
kleonc
a4afdd4a77
RichTextLabel::add_image Fail if passed image has no area
2021-02-14 16:09:55 +01:00
bruvzg
1f60ac1e08
[CTL] Fix RichTextLabel cell horizontal padding.
2021-02-14 14:11:49 +02:00
bruvzg
d78336c65e
[CTL] Add missing font outline drawing routines and theme constants.
2021-02-14 14:11:44 +02:00
bruvzg
6c9e608a34
Use get_char_size(' ') to calculate space width.
2021-02-12 15:06:50 +02:00
reduz
1aa2823fa3
Removed _change_notify
...
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rafał Mikrut
7961a1dea3
Initialize class variables with default values in scene/ [2/2]
2021-02-09 18:24:36 +01:00
Marcel Admiraal
8eb39f4e8b
Change themes *_color_* to *_*_color
...
Changed:
font_color_accel -> font_accelerator_color
font_color_bg -> font_unselected_color
font_color_disabled -> font_disabled_color
font_color_fg -> font_selected_color
font_color_hover -> font_hover_color
font_color_hover_pressed -> font_hover_pressed_color
font_color_pressed -> font_pressed_color
font_color_readonly -> font_readonly_color
font_color_selected -> font_selected_color
font_color_shadow -> font_shadow_color
font_color_uneditable -> font_uneditable_color
icon_color_disabled -> icon_disabled_color
icon_color_hover -> icon_hover_color
icon_color_hover_pressed -> icon_hover_pressed_color
icon_color_normal -> icon_normal_color
icon_color_pressed -> icon_pressed_color
Also includes:
font_outline_modulate -> font_outline_color
tab_fg -> tab_selected
tab_bg -> tab_unselected
2021-01-24 06:28:49 +00:00