Commit graph

129 commits

Author SHA1 Message Date
Yuri Rubinsky
52889ab7ee [Scene] Add SceneStringName::toggled 2024-08-28 15:14:26 +03:00
Sébastien Dunne Fulmer
c3ed8a842c
Remove confusing USER prefix from script-logged errors 2024-08-27 15:00:48 +01: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
Pedro J. Estébanez
20298fbf07 Let EditorLog use the right call queue for thread safety
This is a complement to f61c63e3a1.
2024-07-08 17:18:46 +02:00
A Thousand Ships
fbb879debd
[Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
A Thousand Ships
d519715d94
[Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
A Thousand Ships
4ed62665a2
Replace .bind(...).call_deferred() with .call_deferred(...) 2024-05-27 13:29:57 +02:00
Christian Kaiser
6c62392fb0 Fixed log rebuilding crashing when there's no messages 2024-05-19 14:55:43 -03:00
A Thousand Ships
ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
A Thousand Ships
b4c6cc7d82
[Core] Add case-insensitive String::containsn 2024-05-08 12:48:01 +02:00
Sofox
b823724e00 Add line limit to Editor Output Log 2024-05-02 13:28:59 +01:00
passivestar
cae610b1d2 Make the "Clear Output" shortcut not require panel focus 2024-03-15 11:40:21 +04:00
Yuri Sizov
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
Hugo Locurcio
4a11d48420
Handle clickable [url] tags in print_rich() editor output log
Since this uses `OS.shell_open()`, this allows the use of any standard URL
including `file://` paths, `mailto:`, custom protocols set up by the user, etc.
2024-01-15 14:54:13 +01:00
Yuri Sizov
215e036600 Add bulk change guards to successive theme overrides in Editor and GUI 2023-10-19 18:14:14 +02:00
Yuri Sizov
cdec1ee6cb Color match editor log toggles and flat pressed buttons 2023-09-26 16:41:50 +02:00
Yuri Sizov
4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +02:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
bruvzg
9a6ecda591
[Editor Log] Clear rich print tags only after the last line. 2023-08-10 09:48:53 +03: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
488626701d
Fix editor log flicker. 2023-06-12 20:15:23 +03:00
bruvzg
2af75a066f
[Editor] Enable multithread processing for the editor log. 2023-05-25 22:14:15 +03:00
Hugo Locurcio
0d1f6adf98
Disable padding around highlighted rich text in the editor Output panel
This prevents `[bgcolor]` and `[fgcolor]` rendering from overlapping
on nearby characters (especially on the line below).

This also makes it look closer to terminal output (which never uses padding).
2023-05-21 00:06:23 +02:00
kobewi
61465ee9a1 Allow showing messages from threads in Editor Log 2023-05-15 01:58:27 +02:00
bruvzg
282e4231c2
Improve line BiDi handling, prevent crash on recursive log updates. 2023-04-12 11:39:05 +03:00
Danil Alexeev
306308d957
Editor Theme: Set selection_color property of RichTextLabel 2023-04-11 10:53:42 +03:00
Haoyu Qiu
2c0db8222a Set font sizes for various styles in editor output panel 2023-04-07 20:01:55 +08:00
Danil Alexeev
06c7940a5a
Enable RichTextLabel context menu if selection is enabled 2023-03-06 13:18:36 +03:00
Rémi Verschelde
b342dcdf04
Remove some unused signals
Part of #37604.
2023-01-31 18:54:04 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Koyper
e846b22da6 Renamed RTL remove_line() to remove_paragraph(). 2022-12-21 11:54:18 -06:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
kobewi
15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
Rémi Verschelde
3a5eac7ca3 Merge pull request #62860 from Calinou/editor-log-bold-italic-mono-fonts
Define bold, italics and mono fonts in editor log for `print_rich()`
2022-10-04 10:30:22 +02:00
bruvzg
6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde
f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky
ef5b9a06a9 Rename hint_tooltip to tooltip_text & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Aaron Record
74eb2a70bd Refactor and remove excessive calls of NOTIFICATION_THEME_CHANGED 2022-08-25 14:50:49 -06:00
kobewi
ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
kobewi
be0de927c7 Optimize theme usage in editor log 2022-08-11 12:48:43 +02:00
Yuri Sizov
9f55bd971e Extract EditorResourceConversionPlugin into its own source files and clean up editor includes 2022-07-31 21:14:15 +03:00
Aaron Franke
ac870ab1c8
Move editor paths into the EditorPaths class 2022-07-29 11:07:30 -05:00
Hugo Locurcio
3e7bcc4755
Define bold, italics and mono fonts in editor log for print_rich()
This is also used by the number indicator for message grouping,
as it uses a bold font.

Mono font does not actually turn proportional fonts into monospace.
Instead, it's a more faint version of the regular font, intended
to emulate the look of the "faint" ANSI escape code (and make `[code]`
distinguishable from regular text).

The custom code font will be used to generate the bold/italic/mono
variants if specified in the Editor Settings.
2022-07-09 19:18:02 +02:00
Voylin
c6291bcd8a Adding print_rich for printing with BBCode 2022-06-29 00:41:29 +09:00
FireForge
7f7244f04a Use consistent casing in editor filter/search bars 2022-05-28 18:43:16 -05:00
ConteZero
ee8fc125bf Fix editor_log text copy 2022-04-08 22:13:48 +02:00