summaryrefslogtreecommitdiff
path: root/editor/action_map_editor.cpp
AgeCommit message (Collapse)Author
2022-12-21Fix closing project setting window with ESC while listening for inputMarkus Sauermann
This is done by disallowing ESC to be used for closing the window while the filter-LineEdit is focused.
2022-11-18Refactor `get_event_text` to a static method, remove high deadzone from ↵Eric M
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.
2022-11-04Fix -Wunused-but-set-variable warnings from Emscripten 3.1.20Rémi Verschelde
2022-10-06Split `action_map_editor` file into one file per class it contained.Eric M
* ActionMapEditor * EventListenerLineEdit * InputEventConfigurationDialog
2022-10-03Add searching by event for Editor Settings shortcuts and Project Settings ↵EricEzaM
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.
2022-09-07Fix key mapping changes when moving from macOS to other platformbruvzg
Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-08-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
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()`).
2022-08-28Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-27Rename `hint_tooltip` to `tooltip_text` & setgetMicky
`hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
2022-08-25Fix input map settings themingYuri Rubinsky
2022-07-29Remove Signal connect bindsJuan Linietsky
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-18Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge
2022-05-26Use "odd" style for TabContainers on base BG colorFireForge
- Use the "odd" style for TabContainers that are on a background with the same color as the default TabContainer background color to add contrast
2022-05-21Add the button pressed to some signals in Treetrollodel
2022-05-06Cleanup metadata usagekobewi
2022-05-04Disable add button when action name is invalidAaron Record
2022-04-12Redesign InputEvent editor pluginFireForge
- Use vertical layout and add text wrapping - Fix Window.popup_centered() rect calculation
2022-04-01Action Map Editor fixes and improvementsEric M
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.
2022-03-25Fixup enum compare after #53734Rémi Verschelde
2022-03-25Merge pull request #53734 from jmb462/fix-missing-action-iconsRémi Verschelde
2022-03-17Make `TabBar/Container` default their alignments to the left instead of centerMichael Alexsander
2022-03-12Initialize bools in the headers in editorAaron Franke
2022-03-03Make `TabContainer` use `TabBar` internallyMichael Alexsander
2022-02-16Port existing _notification code to use switch statements (part 1/3)jmb462
2022-02-15Editor: Cleanup some includes dependenciesRémi Verschelde
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.
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-01-13Merge pull request #56221 from YeldhamDev/inputmap_undo_masterRémi Verschelde
2022-01-12Check if action name exists before adding it or renaming an action to itMarcel Admiraal
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-24Fix undo/redo operations in Input MapMichael Alexsander
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-16Rename built-in `SGN()` macro to `SIGN()`Hugo Locurcio
This matches the name of the GDScript function (except it's uppercase here).
2021-11-12Use "enum class" for input enumsAaron Franke
2021-10-28clang-format: Disable alignment of operands, too unreliableRémi Verschelde
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`.
2021-10-12Fix missing action icons in action map editorjmb462
2021-10-12Create key inputs as physical by default in the input action editorHugo Locurcio
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.
2021-10-09Fix crash when searching action map creates empty catagoriesPaulb23
2021-09-20Allow mouse button event detection in Action Map Editorjmb462
2021-09-14Fix wrong behavior of Action Map Editor with non QWERTY layoutsjmb462
2021-08-10Use Key enum instead of plain integersAaron Franke
2021-07-20Make "remove action" translatable in Input Mapfoxydevloper
2021-07-19Make various strings translatablefoxydevloper
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-13Add header theme type variations to labelskobewi
2021-07-04Clean up Treereduz
Fixes some problems introduced by #49917 * Tree used minimum size as a stretch ratio, so it forced a minimum size of 1. * Minimum size redone, stretch ratio moved to a separate setting * Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired. * Added a clip content option for situations where fit to contents does not apply. * Icon would scroll with the item, making it invislbe if the item is too long. * Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
2021-06-28Implement Tree's internal minimum width calculationGilles Roudière
2021-06-20Use mouse and joypad enums instead of plain integersAaron Franke
Also MIDIMessage