Commit graph

120 commits

Author SHA1 Message Date
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
bruvzg f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
ConteZero deddbc142c Disable deselect on focus lost on editor_log 2022-04-04 22:21:49 +02:00
Eric M df2c71efd1 Improve editor log message filter button styles. 2022-03-15 21:25:24 +10:00
jmb462 dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462 a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Yuri Roubinsky 5003d4351e Fix theming update in several editor classes 2022-01-16 14:49:03 +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