Commit Graph

293 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
bruvzg b9a00feb66 [Windows, FileDialog] Prepend drive letter to the absolute paths without drive letter. 2024-12-19 09:47:46 +07:00
Chaosus ba39b078f5 [Scene] Add `SceneStringName::FlatButton` 2024-12-10 11:12:26 +07:00
Thaddeus Crews 44cda51110
Merge pull request #98812 from bruvzg/macos_bundles_as_file
[macOS] Handle bundles as files in the embedded file dialogs.
2024-12-03 14:41:07 +07:00
Thaddeus Crews 6472e9e961
Merge pull request #99310 from syntaxerror247/filedialog_issue
Android: Set default ACCESS_FILESYSTEM root
2024-12-03 14:41:03 +07:00
bruvzg d5e599f77e [macOS] Handle bundles as files in the embedded file dialogs. 2024-12-03 12:41:52 +07:00
Pāvels Nadtočajevs 6a331dafe1 Fix native file dialog filter selection in save dialogs. 2024-12-02 18:38:53 +07:00
Anish Mishra 7f64f230a7 Android: Set FileDialog default Filesystem root 2024-12-02 21:58:09 +07:00
Rémi Verschelde aab12fd273
Merge pull request #99652 from bruvzg/fd_cd_win
[Windows] Fix root and current folder in native file dialog.
2024-12-02 17:20:27 +07:00
Rémi Verschelde 60e1490df1
Merge pull request #99644 from bruvzg/fd_all_name
Change file dialog all files filter name from `All Files (*)` to `All Files (*.*)`.
2024-12-02 17:20:23 +07:00
A Thousand Ships af56d6e8e8
Use `SceneStringName` in more places 2024-12-02 14:39:16 +07:00
Rémi Verschelde 8de2abd075
Merge pull request #85789 from DevilboxGames/FileDialogCaseSensitivity
Make `FileDialog` filtering case insensitive
2024-11-29 22:45:32 +07:00
Rémi Verschelde a1365dcb12
Merge pull request #98765 from Calinou/editor-bottom-panel-no-icon-tint
Don't tint editor bottom panel icons when hovered or pressed
2024-11-29 22:01:55 +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 1d43fa9a64 Change file dialog all files filter name from `All Files (*)` to `All Files(*.*)`. 2024-11-24 20:09:05 +07:00
A Thousand Ships 68f638cf02
Use `(r)find_char` instead of `(r)find` for single characters 2024-11-17 10:02:18 +07:00
Pāvels Nadtočajevs f5fad7592f Use processed filter list for native dialogs. 2024-11-15 12:08:33 +07:00
Pāvels Nadtočajevs 932b2269f8 Fix missing native file dialog title translation. 2024-11-14 14:48:52 +07:00
Hugo Locurcio dafba55c69
Don't tint editor bottom panel icons when hovered or pressed
This prevents the error/warning icons from turning gray or green,
making them hard to recognize. A similar mechanism is already used
for EditorLog filter button icons.

This also fixes typos in FileDialog theme color assignment
(`icon_color_pressed` instead of `icon_pressed_color`). The exposed theme
item names remain the same.
2024-11-02 18:35:45 +07:00
Haoyu Qiu b131476d40 Disable auto translate of FileDialog's file list 2024-11-01 12:41:56 +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
Aaron Franke 562c666e3d
Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 +07:00
Alex Darby cd269b825f Make File Dialog case insensitive
Change FileDialog and EditorFileDialog to use case insensitive string
comparisons when saving files to avoid duplicate file extensions.
2024-10-07 15:07:36 +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
Giganzo a863c385f7 Fix FileDialog default size 2024-09-17 14:35:18 +07:00
bruvzg 0a3a483ca7 Fix native file dialog showing on loading project in editor. 2024-09-12 10:49:50 +07:00
Rémi Verschelde 3cc99d3e31
Merge pull request #95983 from bruvzg/win_fd_opt_fix
[Windows] Emit native file dialog callback from event loop, fix selected options not saved.
2024-09-04 17:11:57 +07:00
Yuri Rubinsky 52889ab7ee [Scene] Add SceneStringName::toggled 2024-08-28 15:14:26 +07:00
bruvzg ea252675aa [Windows] Emit native file dialog callback from event loop, fix selected options not saved. 2024-08-23 09:53:16 +07:00
Yuri Rubinsky af5fc8354b Fix a bunch of orphan StringName errors at ProjectSettings/Editor exit 2024-07-09 19:38:52 +07:00
A Thousand Ships ca18a06ecb
[Scene] Add `SceneStringNames::confirmed` 2024-06-19 09:40:54 +07:00
A Thousand Ships d9e2fc74c7
[Scene] Add `SceneStringNames::item_selected` 2024-06-19 09:39:05 +07:00
Anni Ryynänen b14b222e9d
Fix native file dialogs being shown on `set_visible(false)` 2024-06-09 17:54:18 +07:00
A Thousand Ships ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +07:00
Gilles Roudière 7705265477 Fix PropertyListHelper::_get_property returning a valid value even if an index is outside the array valid indices
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-05-10 10:46:04 +07:00
kobewi 0b877a9962 Expose is_part_of_edited_scene() 2024-04-26 11:49:38 +07:00
kobewi e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +07:00
Michael Alexsander 44e2c56daa
Fix built-in `FileDialog` appearing instead of the native one on some cases 2024-04-06 15:45:45 +07:00
bruvzg 61f7145f43
[Native File Dialog] Add support for using native dialogs in the editor. 2024-03-28 11:53:03 +07:00
bruvzg dc01658ee9
[DisplayServer] Add separate feature flags for different native dialog types. 2024-03-26 15:18:06 +07:00
Alistair Leslie-Hughes 13d83dd4d7 Correct FileDialog Theme overrides
Introduced in 15fd025f90

Fixes #89818
2024-03-24 19:33:05 +07:00
A Thousand Ships 2cbf469912
Fix sorting of files/dirs in dialogs
Sorts leading `_` before other characters except `.`.
2024-03-20 13:45:47 +07:00
Hugo Locurcio 4f8d7cae26
Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog
This also tweaks EditorFileDialog to use the same shortcut,
while making it select the path text after focusing
(like in most file managers).

Ctrl + L / Cmd + Shift + G can also now be used to focus on the
property name in the project settings editor, as well in the
Input Map, Autoload, Shader Globals and Global Groups tabs.
2024-03-05 00:02:09 +07:00
Michael Alexsander d70c45b5c8
Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 +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
Wilson E. Alvarez a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 +07:00
Yuri Sizov 215e036600 Add bulk change guards to successive theme overrides in Editor and GUI 2023-10-19 18:14:14 +07:00
Rémi Verschelde 49cdd330be
Merge pull request #81034 from garychia/open_folder
FileDialog: Avoid selecting the first item automatically in Open Folder Mode
2023-10-10 22:49:16 +07:00
Rémi Verschelde 4321806e46
Merge pull request #82743 from bruvzg/fd_no_editor
[File Dialog] Do not open native file dialogs in the edited scene.
2023-10-04 15:44:29 +07:00
bruvzg 2d9ba45e76
[File Dialog] Do not open native file dialogs in the edited scene. 2023-10-03 23:02:12 +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 4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +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
Chia-Hsiang Cheng f93f1952cb Avoid selecting the first item automatically in Open Folder Mode 2023-08-27 17:25:17 +07:00
bruvzg d3ca91ad6a [Windows] Implement native file selection dialog support. 2023-07-18 17:23:58 +07:00
bruvzg 4790da7900
[macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +07:00
HolonProduction cfac7c9a9a Update FileDialog button activity when file_mode is changed. 2023-07-08 18:10:57 +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
Nong Van Tinh 010ddfbc16
Prevent saving files with no name and only an extension.
Fixes #69768.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-02-17 00:23:15 +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
bruvzg 5eeefb2174
Fix file dialog crash on forward click when history is empty. 2023-01-03 10:23:49 +07:00
Dawid Marzec 5cd30be56d Remove auto selecting the first file for FileDialog with Save file mode selected 2022-11-13 02:24:17 +07:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +07:00
Rémi Verschelde 0e53dd642c Fix MSVC warning C4706: assignment within conditional expression
Part of #66537.
2022-09-28 16:05:07 +07: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 +07:00
Rindbee 88b72c3de4 Fix file list in FileDialog not updating on first run 2022-09-07 21:36:21 +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
Aaron Franke 10a56981dc
Rename String `plus_file` to `path_join` 2022-08-29 19:38:13 +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
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 +07:00
Aaron Record 4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 +07: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 +07:00
风青山 e561c68256 Add some codes, returnes directly if the value is not changed.
Avoid executing the following value-changed logics if the value does not really change.
2022-08-23 23:25:22 +07:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +07:00
FireForge 97dfbea6ad Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 +07:00
Rémi Verschelde b942c1ffe3
Merge pull request #62827 from fire-forge/ok-cancel
Add `ok_button_text` to AcceptDialog and `cancel_button_text` to ConfirmationDialog
2022-07-13 14:10:38 +07:00
FireForge af19501cc7 Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 +07:00
FireForge e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 +07:00
Thakee Nathees 446f1b7052 Fix FileDialog file name autocompletion with filters
Fixes #38195.
2022-07-04 01:26:34 +07:00
kobewi 9d48cd502b Add root_subfolder to FileDialog 2022-06-28 18:56:18 +07:00
kobewi cd02cb27af Replace some TTRCs with TTRs 2022-06-22 16:04:33 +07:00
FireForge 88a8038387 Capitalize/fix some property enum hints 2022-05-12 15:03:16 +07:00
bruvzg be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +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 71da4c4132
Merge pull request #54399 from Calinou/filedialog-current-properties-hint-no-editor
Don't store and show current file/directory/path FileDialog properties
2022-03-12 20:48:32 +07:00
kobewi 42078dec9f Allow negative indexes in ItemList and PopupMenu 2022-03-12 01:14:03 +07:00
miremrie a5e30c0228 Allow absolute file paths in file dialogs 2022-03-02 19:42:39 +07:00
Rémi Verschelde 0f5455230c
Use `switch` consistently in `_notification` (`scene` folder) 2022-02-15 18:44:55 +07: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 +07:00
jmb462 a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +07:00
bruvzg cba8280515 [Windows] Add support for handling network share paths. 2022-01-24 16:22:59 +07:00
kobewi 74d08a305e Fix FileDialog localization issues 2022-01-19 17:04:06 +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
kobewi b403954e41 Improve FileDialog filters 2022-01-08 16:27:15 +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