Commit Graph

95 Commits

Author SHA1 Message Date
eff2f822a1 Merge pull request #111439 from bruvzg/fd_filt_add
Add MIME argument to the `FileDialog.add_filter`.
2025-10-21 10:27:07 -05:00
263a2bdec6 Rework FileDialog shortcuts 2025-10-11 14:37:40 +02:00
e4988b4bf3 Add MIME argument to the FileDialog.add_filter. 2025-10-09 22:17:56 +03:00
9af58c1133 Unify FileDialog context menus 2025-10-02 23:10:27 +02:00
fdc79f5286 Remaining FileDialog changes before unification 2025-10-02 19:13:04 +02:00
f88b51995b Expose FileDialog callbacks for getting custom icons 2025-10-01 12:08:34 +02:00
3615b188d7 Expose methods to access FileDialog's favorite/recent lists 2025-09-30 22:46:09 +02:00
4b1d5b55c7 Allow customizing FileDialog's features 2025-06-11 20:12:15 +02:00
706bfd810b Add thumbnail mode to FIleDialog 2025-06-03 02:06:14 +02:00
f75c564d58 Add favorites and recent directories to FileDialog 2025-05-29 15:50:29 +02:00
33dcd7a6d9 Add file sort to FileDialog 2025-05-15 13:23:38 +02:00
a2c9e7920d Merge pull request #105647 from KoBeWi/optional_options
Improve FileDialog options
2025-05-06 08:38:01 -05:00
7fe61c7e84 Change FileDialog's Tree to ItemList 2025-05-03 01:34:35 +02:00
92f15d33ee Improve FileDialog options 2025-04-24 17:12:53 +02:00
e565ee86ce FileDialog code cleanup 2025-04-23 19:28:14 +02:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
d5e599f77e [macOS] Handle bundles as files in the embedded file dialogs. 2024-12-03 12:41:52 +02:00
e0b4f3d314 [Windows] Fix root and current folder in native file dialog.
Co-authored-by: RedMser <redmser.jj2@gmail.com>
2024-11-25 15:00:25 +02:00
f5fad7592f Use processed filter list for native dialogs. 2024-11-15 12:08:33 +02:00
0dfd18c84b [DisplayServer] Add feature flag for native file dialog access to user/res and options 2024-10-30 14:13:43 +05:30
62edb4eee8 Add filename filter field to FileDialog
Added possibility to filter files and folders through a text entry.
2024-10-04 11:12:33 +02:00
b365a63403 Automatically use property count in PropertyListHelper 2024-05-25 10:51:37 +02:00
e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +02:00
61f7145f43 [Native File Dialog] Add support for using native dialogs in the editor. 2024-03-28 11:53:03 +02:00
fd3666298c Add create folder icon 2024-02-26 09:04:24 -05:00
a8f521bcad [Native File Dialog] Add support for adding custom options to the dialogs.
Add support for adding custom options (checkboxes and optionboxes) to the dialogs (both native and built-in).
2024-01-24 15:00:31 +02:00
43e4708dff [Native File Dialogs] Improve filter list handling, add selected filter to the callback. 2023-10-03 19:26:16 +03:00
c52db6190c [FileDialog] Make set_visible compatible with native dialogs. 2023-09-30 00:40:49 +03:00
d0e26572fe Hide the dialog_text property from FileDialog
It's useless in `FileDialog`, because dialogs can have either
a text label or a custom layout, and `FileDialog` already
has a custom layout.
2023-09-11 16:24:54 +02:00
2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
4790da7900 [macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +03:00
fc3d9d9d46 Defer invalidation on FileDialog nodes 2023-03-25 14:24:46 -03:00
236cec0633 Add a custom icon for the project.godot file in the EditorFileDialog 2023-02-17 22:42:23 +01:00
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
43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
15fd025f90 Add dumb and manual theme caching systems to Window 2022-09-01 16:05:02 +03:00
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
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
af19501cc7 Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05:00
9d48cd502b Add root_subfolder to FileDialog 2022-06-28 18:56:18 +02:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
d1207a0504 [Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
cba8280515 [Windows] Add support for handling network share paths. 2022-01-24 16:22:59 +02:00
9dbe314da6 Create function focus_file_text
This function focuses the text field when saving a file
It is called when the save file dialogue is opened
2022-01-12 01:34:04 +08:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
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
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