Commit Graph

263 Commits

Author SHA1 Message Date
kobewi
42c79161c2 Fix bottom line in editor log 2022-01-19 14:26:31 +01: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
bruvzg
e4651a44ab
RichTextLabel: adds separate get_total_x_count, get_visible_x_count and scroll_to_x functions for wrapped lines and paragraphs (newlines). 2021-01-18 11:26:55 +02:00