summaryrefslogtreecommitdiffstats
path: root/editor/action_map_editor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #71322 from ↵Rémi Verschelde2023-02-011-0/+15
|\ | | | | | | | | | | EricEzaM/55856-proj-settings-initial-array-dict-shared-instance Fix Project Settings array/dicts initial value being shared instances of the current value.
| * Fix Project Settings array/dicts initial value being shared instances of the ↵Eric M2023-01-131-0/+15
| | | | | | | | current value.
* | Cleanup and unify keyboard input.bruvzg2023-01-231-2/+6
| | | | | | | | | | | | | | | | | | | | - Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
* | Remove set_drag_forwarding_compat()kobewi2023-01-141-5/+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".
* Fix closing project setting window with ESC while listening for inputMarkus Sauermann2022-12-211-0/+13
| | | | | This is done by disallowing ESC to be used for closing the window while the filter-LineEdit is focused.
* Refactor `get_event_text` to a static method, remove high deadzone from ↵Eric M2022-11-181-1/+1
| | | | | | | event configuration. * `get_event_text` and `get_device_string` are now static methods (they always could have been) * Applied 90% deadzone on joypad motion inputs in the configurator had the effect of ignoring most joypad motion inputs. Low ones do not need to be filtered out as JoypadMotion is only considered 'pressed' if it as above 50% strength - and that works well.
* Fix -Wunused-but-set-variable warnings from Emscripten 3.1.20Rémi Verschelde2022-11-041-6/+1
|
* Split `action_map_editor` file into one file per class it contained.Eric M2022-10-061-770/+5
| | | | | | * ActionMapEditor * EventListenerLineEdit * InputEventConfigurationDialog
* Add searching by event for Editor Settings shortcuts and Project Settings ↵EricEzaM2022-10-031-105/+184
| | | | | | | | | | input map. * Focus into the LineEdit, then perform input to search the list of events by the events assigned. * New specialised editor-only control for this: EventListenerLineEdit. Line edit is a good candidate for such a control because you can focus it, override it's input handling, and show the event all in one control. Update InputEventConfigurationDialog to use event listener line edit rather than the separate tabs. * Cleaner look - no need for tabs. * Simpler code.
* Fix key mapping changes when moving from macOS to other platformbruvzg2022-09-071-42/+38
| | | | | Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #64885 from Mickeon/rename-tooltip-hintRémi Verschelde2022-08-281-4/+4
|\ | | | | Rename `hint_tooltip` to `tooltip_text` & setter getter
| * Rename `hint_tooltip` to `tooltip_text` & setgetMicky2022-08-271-4/+4
| | | | | | | | | | | | | | | | `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-2/+0
|/
* Fix input map settings themingYuri Rubinsky2022-08-251-0/+3
|
* 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()
* Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge2022-07-181-1/+1
|
* Use "odd" style for TabContainers on base BG colorFireForge2022-05-261-0/+1
| | | | - Use the "odd" style for TabContainers that are on a background with the same color as the default TabContainer background color to add contrast
* Add the button pressed to some signals in Treetrollodel2022-05-211-3/+7
|
* Cleanup metadata usagekobewi2022-05-061-4/+3
|
* Disable add button when action name is invalidAaron Record2022-05-041-8/+25
|
* Redesign InputEvent editor pluginFireForge2022-04-121-6/+4
| | | | | - Use vertical layout and add text wrapping - Fix Window.popup_centered() rect calculation
* Action Map Editor fixes and improvementsEric M2022-04-011-35/+70
| | | | | | | | | Multiple fixes: * Fixed device not being updated correctly (changing the device dropdown did not actually change the underlying event's device) * Device selection now defaults to `All Devices` * Device is now displayed in the text shown in the input event editor, and in the action list. * There was code running twice previously because of the following interaction: 1) input via "Listen for Input" tab. 2) `_set_event` gets called. 3) input list tree selection gets updated to match the listened event. 4) tree "item_selection" signal is emitted. 5) eventually `_set_event` is called again. * The only reason this was not an infinite loop is because reselection is disabled on the tree. So, the code runs twice - not a big deal, but it is unnecessary processing and it could cause an issue in the future. If someone turns on reselection on the tree, the whole thing comes crashing down. This should prevent that scenario and make the code a bit safer and more robust.
* Fixup enum compare after #53734Rémi Verschelde2022-03-251-1/+1
|
* Merge pull request #53734 from jmb462/fix-missing-action-iconsRémi Verschelde2022-03-251-0/+25
|\
| * Fix missing action icons in action map editorjmb4622021-10-121-0/+25
| |
* | Make `TabBar/Container` default their alignments to the left instead of centerMichael Alexsander2022-03-171-1/+0
| |
* | Initialize bools in the headers in editorAaron Franke2022-03-121-2/+0
| |
* | Make `TabContainer` use `TabBar` internallyMichael Alexsander2022-03-031-1/+1
| |
* | Port existing _notification code to use switch statements (part 1/3)jmb4622022-02-161-4/+0
| |
* | Editor: Cleanup some includes dependenciesRémi Verschelde2022-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Removes some unnecessary includes from `editor_node.h`, and instead add those where they're used. Removes unnecessary `editor_node.h` includes in various editor classes. Renames `dynamicfont` to `dynamic_font` in a couple files. Misc cleanup while jumping through that rabbit hole.
* | Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-121-0/+1
| |
* | Merge pull request #56221 from YeldhamDev/inputmap_undo_masterRémi Verschelde2022-01-131-5/+3
|\ \
| * | Fix undo/redo operations in Input MapMichael Alexsander2021-12-241-5/+3
| | |
* | | Check if action name exists before adding it or renaming an action to itMarcel Admiraal2022-01-121-0/+20
| | |
* | | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ / | | | | | | Happy new year to the wonderful Godot community!
* | Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-2/+2
| | | | | | | | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* | align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-2/+2
| |
* | Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
| |
* | Rename built-in `SGN()` macro to `SIGN()`Hugo Locurcio2021-11-161-1/+1
| | | | | | | | | | This matches the name of the GDScript function (except it's uppercase here).
* | Use "enum class" for input enumsAaron Franke2021-11-121-15/+15
| |
* | clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-4/+10
| | | | | | | | | | | | | | | | | | Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
* | Create key inputs as physical by default in the input action editorHugo Locurcio2021-10-121-2/+8
|/ | | | | | | | | | Physical Key should be used for most game inputs as it allows keys to work on non-QWERTY layouts out of the box. This is especially important for WASD movement layouts. In contrast, remapped (non-physical) keys are mainly useful in non-game applications, where shortcuts are expected to match a precise letter rather than a location on the keyboard.
* Fix crash when searching action map creates empty catagoriesPaulb232021-10-091-20/+22
|
* Allow mouse button event detection in Action Map Editorjmb4622021-09-201-14/+33
|
* Fix wrong behavior of Action Map Editor with non QWERTY layoutsjmb4622021-09-141-2/+0
|
* Use Key enum instead of plain integersAaron Franke2021-08-101-20/+18
|
* Make "remove action" translatable in Input Mapfoxydevloper2021-07-201-1/+1
|