summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_picker.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix `draw_multiline_colors` usageDanil Alexeev2023-05-151-8/+7
|
* Improve includes of EditorNode (and everything else)Yuri Sizov2023-04-071-1/+1
| | | | | | Also start organizing editor-specific GUI components into a dedicated folder, `editor/gui`. Also move `editor_file_server` next to the rest of debugger classes.
* Make icons of scripted and custom classes fit the editor UIYuri Sizov2023-03-311-0/+2
| | | | | | | | | | | Also: - Add an option to limit the icon size in PopupMenu. This is similar to how this works in Tree and TreeItem. - Add the same option to TabBar. - Add a theme constant for Tree, PopupMenu, Button, and TabBar to apply this limit on the control level. Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
* Turn off auto translate for some editor controlsHaoyu Qiu2023-03-281-0/+1
| | | | | | | | | | | | * Scene tab * Animation name list in Animation panel * Feature profile name list in Editor Feature Profile dialog * Layout names in editor layout menu * Subresource list in Inspector dock * Resource type shown in EditorResourcePicker * Enum dropdowns in inspectors: We'll eventually allow auto translating these after implementing a way to opt-out auto translation on a property-by-property basis and a way to extract enumerators.
* Fix crash when revealing file in floating FileSystem DockHayden Leete2023-03-081-2/+6
| | | | | | | | When selecting "Show in FileSystem" from the context menu of a resource in the inspector, the engine would crash if the FileSystem dock was floating because it was trying to focus the FileSystem tab, but floating docks don't use Tab Containers. This commit makes the FileSystem dock's window grab focus instead if it's floating.
* Merge pull request #71686 from YuriSizov/stylebox-min-size-but-betterRémi Verschelde2023-01-221-1/+1
|\ | | | | | | Clean-up, harmonize, and improve StyleBox API
| * Clean-up, harmonize, and improve StyleBox APIYuri Sizov2023-01-191-1/+1
| | | | | | | | | | | | - Make all margin properties follow the same naming convention (their getter and setter too). - Remove a virtual counterpart of `get_style_margin` from API. - Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
* | Implement a quick script inheritance checkJuan Linietsky2023-01-191-71/+44
|/ | | | Optimizes, simplifies and fixes EditorResourcePicker (was not refreshing custom clases).
* Remove set_drag_forwarding_compat()kobewi2023-01-141-4/+1
|
* Add expand modes to TextureRectkobewi2023-01-121-1/+1
|
* Change set_drag_forwarding() to use callables.Juan Linietsky2023-01-101-1/+1
| | | | | | | | * This solution is much cleaner than the one in 3.x thanks to the use of callables. * Works without issues in any language (no need to worry about camel or snake case). * Editor code uses a compatibility function (too much work to redo). Fixes #59899
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Merge pull request #68709 from MewPurPur/instance-begone-part3Rémi Verschelde2022-11-161-1/+1
|\ | | | | | | Remove more instances of 'instance' being used as a verb
| * Remove more instances of 'instance' being used as a verbVolTer2022-11-161-1/+1
| |
* | Merge pull request #67651 from KoBeWi/❗_of_damnationRémi Verschelde2022-11-151-1/+1
|\ \ | |/ |/| | | Fix double hint paste in EditorResourcePicker
| * Fix double hint paste in EditorResourcePickerkobewi2022-10-201-1/+1
| |
* | Don't allow instancing virtual resources in the resource picker dialogAaron Franke2022-11-051-4/+12
| |
* | Merge pull request #67578 from KoBeWi/GEDITORRémi Verschelde2022-10-311-1/+1
|\ \ | | | | | | | | | Unify usage of GLOBAL/EDITOR_GET
| * | Unify usage of GLOBAL/EDITOR_GETkobewi2022-10-181-1/+1
| |/
* | Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don'tRémi Verschelde2022-10-311-6/+3
|\ \ | | | | | | | | | Simplify GDVIRTUAL_CALL calls
| * | Simplify GDVIRTUAL_CALL callskobewi2022-10-191-6/+3
| |/
* / Make texture preview and picker use mipmap filterMrBlockers2022-10-201-0/+1
|/
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-8/+8
| | | | change warnings=all to use /W4.
* fix error dialog from appearing after loading material resManuel Dun2022-10-021-1/+1
|
* Script-class-aware Inspector & related controls.willnationsdev2022-09-171-55/+91
|
* Merge pull request #65494 from V-Sekai/fix_inspect_command_contextRémi Verschelde2022-09-141-1/+1
|\
| * In inspector, show 'edit' button instead of 'inspect' when resource is part ↵SaracenOne2022-09-071-1/+1
| | | | | | | | of an editable scene.
* | Improve naming of theme properties throughout GUI codeYuri Sizov2022-09-061-1/+1
|/ | | | | | | | | | | | | | 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
* Improve null and object printing to avoid confusion with arraysHugo Locurcio2022-08-311-2/+2
| | | | | | | - Use different syntax for object printing to avoid confusion with arrays. - Print null as `<null>` to avoid confusion with a string `"null"`. - Display `<empty>` in editor resource pickers to avoid confusion with array-based properties.
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-6/+6
| | | | | | | | | | Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. 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()`).
* Merge pull request #64555 from ↵Rémi Verschelde2022-08-281-1/+1
|\ | | | | | | | | nongvantinh/inspector_resource_preview_incorrect_size Fixed inspector resource preview shows up with incorrect size
| * Fixed inspector resource preview shows up with incorrect sizeNong Van Tinh2022-08-181-1/+1
| |
* | Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde2022-08-281-3/+3
|\ \ | | | | | | Rename `hint_tooltip` to `tooltip_text` & setter getter
| * | Rename `hint_tooltip` to `tooltip_text` & setgetMicky2022-08-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | `hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
* | | Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-3/+2
|/ /
* / Disable editing properties in foreign resourcesSaracenOne2022-08-231-44/+64
|/ | | | | | from imported scenes or objects returning true from a function named '_is_read_only' and disable resaving imported resources.
* Add "Make Unique (Recursive)" to resource picker, simplify "Make Unique"Hendrik Brucker2022-08-061-17/+26
|
* Extract EditorResourceConversionPlugin into its own source files and clean ↵Yuri Sizov2022-07-311-0/+1
| | | | up editor includes
* Remove Signal connect bindsJuan Linietsky2022-07-291-1/+1
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-1/+1
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Implement BPM supportreduz2022-07-231-47/+230
| | | | | | | | | | | Based on #62896, only implements the BPM support part. * Implements BPM support in the AudioStreamOGG/MP3 importers. * Can select BPM/Bar Size and total beats in a song file, as well as edit looping points. * Looping is now BPM aware * Added a special importer UI for configuring this. * Added a special preview showing the audio waveform as well as the playback position in the resource picker. * Renamed `AudioStream::instance` to `instantiate` for correctness.
* Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge2022-07-181-1/+1
|
* Seperate filter and description in FileDialog.add_filter()FireForge2022-07-091-1/+1
|
* Add static methods for creating Image and ImageTexturekobewi2022-07-081-1/+1
|
* Refactor Font configuration and import UI, and Font resources.bruvzg2022-07-061-12/+0
|
* Add rounded corners to EditorProperty and EditorSpinSliderFireForge2022-05-251-0/+2
| | | | | | | | - Adds rounded corners to the EditorProperty child background, EditorSpinSlider label background, and resource sub-inspector borders and background. - Allows customizing EditorSpinSlider label background through a new Theme StyleBox property, label_bg. - Makes margins consistent in resource sub-inspectors. - Removes space between buttons in NodePath, Resource, and multiline string editors. - Adds space between label background and content for vertical property editors.
* Add a new HashSet templatereduz2022-05-201-12/+13
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use range iterators for RBSet in most casesAaron Record2022-05-191-8/+8
|
* Replace most uses of Map by HashMapreduz2022-05-161-15/+15
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!