From 3fa2b9fe797fbb31255b4c487ed66fbcb83a62ef Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:34:34 +0200 Subject: [PATCH] Add delete hotkey (cherry picked from commit 269542c4b0373e1f200afaab01d7d102c5d6194c) --- mods/cnc/chrome/editor.yaml | 10 +++++++++- mods/cnc/fluent/chrome.ftl | 6 +++++- mods/common/chrome/editor.yaml | 10 +++++++++- mods/common/fluent/chrome.ftl | 6 +++++- mods/common/fluent/hotkeys.ftl | 1 + mods/common/hotkeys/editor.yaml | 7 +++++++ 6 files changed, 36 insertions(+), 4 deletions(-) diff --git a/mods/cnc/chrome/editor.yaml b/mods/cnc/chrome/editor.yaml index 02cccd1651..385706057d 100644 --- a/mods/cnc/chrome/editor.yaml +++ b/mods/cnc/chrome/editor.yaml @@ -695,6 +695,10 @@ Container@EDITOR_WORLD_ROOT: Height: 25 Text: button-delete-area.label Font: Bold + Key: EditorDeleteSelection + TooltipTemplate: BUTTON_TOOLTIP + TooltipText: button-delete-area.tooltip + TooltipContainer: TOOLTIP_CONTAINER Button@SELECTION_CANCEL_BUTTON: X: 208 Y: 222 @@ -786,8 +790,12 @@ Container@EDITOR_WORLD_ROOT: X: 7 Width: 75 Height: 25 - Text: button-container-delete + Text: button-delete-actor.label Font: Bold + Key: EditorDeleteSelection + TooltipTemplate: BUTTON_TOOLTIP + TooltipText: button-delete-actor.tooltip + TooltipContainer: TOOLTIP_CONTAINER Button@CANCEL_BUTTON: X: 127 Width: 75 diff --git a/mods/cnc/fluent/chrome.ftl b/mods/cnc/fluent/chrome.ftl index dc6de9ccbf..a86a828690 100644 --- a/mods/cnc/fluent/chrome.ftl +++ b/mods/cnc/fluent/chrome.ftl @@ -55,7 +55,6 @@ label-save-map-background-directory = Directory: label-save-map-background-filename = Filename: button-save-map-panel = Save label-actor-edit-panel-id = ID -button-container-delete = Delete button-container-ok = OK button-editor-world-root-options-tooltip = Menu label-tiles-bg-search = Search: @@ -87,6 +86,11 @@ button-map-editor-tab-container-history-tooltip = History button-delete-area = .label = Delete + .tooltip = Remove everything in the selected area + +button-delete-actor = + .label = Delete + .tooltip = Remove the selected actor button-editor-world-root-copy = .label = Copy diff --git a/mods/common/chrome/editor.yaml b/mods/common/chrome/editor.yaml index a302ed3c03..33c78ce206 100644 --- a/mods/common/chrome/editor.yaml +++ b/mods/common/chrome/editor.yaml @@ -661,6 +661,10 @@ Container@EDITOR_WORLD_ROOT: Height: 25 Text: button-delete-area.label Font: Bold + Key: EditorDeleteSelection + TooltipTemplate: BUTTON_TOOLTIP + TooltipText: button-delete-area.tooltip + TooltipContainer: TOOLTIP_CONTAINER Button@SELECTION_CANCEL_BUTTON: X: 208 Y: 222 @@ -754,8 +758,12 @@ Container@EDITOR_WORLD_ROOT: X: 5 Width: 75 Height: 25 - Text: button-container-delete + Text: button-delete-actor.label Font: Bold + Key: EditorDeleteSelection + TooltipTemplate: BUTTON_TOOLTIP + TooltipText: button-delete-actor.tooltip + TooltipContainer: TOOLTIP_CONTAINER Button@CANCEL_BUTTON: X: 127 Width: 75 diff --git a/mods/common/fluent/chrome.ftl b/mods/common/fluent/chrome.ftl index 76b9b922bb..ee3884d120 100644 --- a/mods/common/fluent/chrome.ftl +++ b/mods/common/fluent/chrome.ftl @@ -52,7 +52,6 @@ label-save-map-panel-directory = Directory: label-save-map-panel-filename = Filename: button-save-map-panel = Save label-actor-edit-panel-id = ID -button-container-delete = Delete button-container-ok = OK label-tiles-bg-search = Search: label-bg-filter = Filter: @@ -83,6 +82,11 @@ button-map-editor-tab-container-history-tooltip = History button-delete-area = .label = Delete + .tooltip = Remove everything in the selected area + +button-delete-actor = + .label = Delete + .tooltip = Remove the selected actor button-editor-world-root-options = .label = Menu diff --git a/mods/common/fluent/hotkeys.ftl b/mods/common/fluent/hotkeys.ftl index 611fe4469b..a685657b1b 100644 --- a/mods/common/fluent/hotkeys.ftl +++ b/mods/common/fluent/hotkeys.ftl @@ -70,6 +70,7 @@ hotkey-description-editorredo = Redo hotkey-description-editorcopy = Copy hotkey-description-editorquicksave = Save Map hotkey-description-editorpaste = Paste +hotkey-description-editordeleteselection = Delete Selection hotkey-description-editorselecttab = Select Tab hotkey-description-editortilestab = Tiles Tab hotkey-description-editoroverlaystab = Overlays Tab diff --git a/mods/common/hotkeys/editor.yaml b/mods/common/hotkeys/editor.yaml index ba704043ba..37193473af 100644 --- a/mods/common/hotkeys/editor.yaml +++ b/mods/common/hotkeys/editor.yaml @@ -34,6 +34,13 @@ EditorPaste: V Ctrl Platform: OSX: V Meta +EditorDeleteSelection: DELETE + Description: hotkey-description-editordeleteselection + Types: Editor + Contexts: editor + Platform: + OSX: BACKSPACE + EditorSelectTab: E Description: hotkey-description-editorselecttab Types: Editor