Commit Graph

95 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
Thaddeus Crews eff2f822a1
Merge pull request #111439 from bruvzg/fd_filt_add
Add MIME argument to the `FileDialog.add_filter`.
2025-10-21 10:27:07 +07:00
kobewi 263a2bdec6 Rework FileDialog shortcuts 2025-10-11 14:37:40 +07:00
Pāvels Nadtočajevs e4988b4bf3
Add MIME argument to the `FileDialog.add_filter`. 2025-10-09 22:17:56 +07:00
kobewi 9af58c1133 Unify FileDialog context menus 2025-10-02 23:10:27 +07:00
kobewi fdc79f5286 Remaining FileDialog changes before unification 2025-10-02 19:13:04 +07:00
kobewi f88b51995b Expose FileDialog callbacks for getting custom icons 2025-10-01 12:08:34 +07:00
kobewi 3615b188d7 Expose methods to access FileDialog's favorite/recent lists 2025-09-30 22:46:09 +07:00
kobewi 4b1d5b55c7 Allow customizing FileDialog's features 2025-06-11 20:12:15 +07:00
kobewi 706bfd810b Add thumbnail mode to FIleDialog 2025-06-03 02:06:14 +07:00
kobewi f75c564d58 Add favorites and recent directories to FileDialog 2025-05-29 15:50:29 +07:00
kobewi 33dcd7a6d9 Add file sort to FileDialog 2025-05-15 13:23:38 +07:00
Thaddeus Crews a2c9e7920d
Merge pull request #105647 from KoBeWi/optional_options
Improve FileDialog options
2025-05-06 08:38:01 +07:00
kobewi 7fe61c7e84 Change FileDialog's Tree to ItemList 2025-05-03 01:34:35 +07:00
kobewi 92f15d33ee Improve FileDialog options 2025-04-24 17:12:53 +07:00
kobewi e565ee86ce FileDialog code cleanup 2025-04-23 19:28:14 +07:00
Thaddeus Crews 324512e11c
Style: Replace header guards with `#pragma once` 2025-03-07 17:33:47 +07:00
bruvzg d5e599f77e [macOS] Handle bundles as files in the embedded file dialogs. 2024-12-03 12:41:52 +07:00
bruvzg 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 +07:00
Pāvels Nadtočajevs f5fad7592f Use processed filter list for native dialogs. 2024-11-15 12:08:33 +07:00
Anish Mishra 0dfd18c84b [DisplayServer] Add feature flag for native file dialog access to `user/res` and `options` 2024-10-30 14:13:43 +07:00
vPumpking 62edb4eee8
Add filename filter field to FileDialog
Added possibility to filter files and folders through a text entry.
2024-10-04 11:12:33 +07:00
kobewi b365a63403 Automatically use property count in PropertyListHelper 2024-05-25 10:51:37 +07:00
kobewi e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +07:00
bruvzg 61f7145f43
[Native File Dialog] Add support for using native dialogs in the editor. 2024-03-28 11:53:03 +07:00
Adam Scott fd3666298c
Add create folder icon 2024-02-26 09:04:24 +07:00
bruvzg 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 +07:00
bruvzg 43e4708dff
[Native File Dialogs] Improve filter list handling, add selected filter to the callback. 2023-10-03 19:26:16 +07:00
bruvzg c52db6190c
[FileDialog] Make set_visible compatible with native dialogs. 2023-09-30 00:40:49 +07:00
Yuri Sizov 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 +07:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +07:00
bruvzg 4790da7900
[macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +07:00
Michael Alexsander fc3d9d9d46 Defer invalidation on FileDialog nodes 2023-03-25 14:24:46 +07:00
Yuri Sizov 236cec0633 Add a custom icon for the `project.godot` file in the EditorFileDialog 2023-02-17 22:42:23 +07: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 +07:00
Yuri Sizov 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 +07:00
Yuri Sizov 15fd025f90 Add dumb and manual theme caching systems to Window 2022-09-01 16:05:02 +07: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 +07:00
Aaron Record 4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 +07:00
Rémi Verschelde 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 +07:00
FireForge af19501cc7 Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 +07:00
kobewi 9d48cd502b Add root_subfolder to FileDialog 2022-06-28 18:56:18 +07:00
bruvzg 9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +07:00
bruvzg 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 +07:00
Rémi Verschelde 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 +07:00
Rémi Verschelde 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 +07:00
bruvzg cba8280515 [Windows] Add support for handling network share paths. 2022-01-24 16:22:59 +07:00
Ger Hean 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 +07:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +07: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 +07: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