Paper save button, back to ctrl+enter save. (#25870)

* Revert "Change keybindings for paper (#25853)"

This reverts commit 4b56996fcd.

* Add a save button to the paper editing UI instead.
This commit is contained in:
Pieter-Jan Briers
2024-03-06 02:35:26 +01:00
committed by GitHub
parent b5066dc4c6
commit d385c1bb23
5 changed files with 39 additions and 12 deletions

View File

@@ -1,6 +1,5 @@
using JetBrains.Annotations;
using Robust.Client.UserInterface.Controls;
using Robust.Shared.Input;
using Robust.Shared.Utility;
using static Content.Shared.Paper.SharedPaperComponent;
@@ -22,15 +21,7 @@ public sealed class PaperBoundUserInterface : BoundUserInterface
_window = new PaperWindow();
_window.OnClose += Close;
_window.Input.OnKeyBindDown += args => // Solution while TextEdit don't have events
{
if (args.Function == EngineKeyFunctions.MultilineTextSubmit)
{
var text = Rope.Collapse(_window.Input.TextRope);
Input_OnTextEntered(text);
args.Handle();
}
};
_window.OnSaved += Input_OnTextEntered;
if (EntMan.TryGetComponent<PaperVisualsComponent>(Owner, out var visuals))
{