From d49cb30df22699e3e3e602b92b056d2345d4306d Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 13 Nov 2022 06:56:01 +0100 Subject: [PATCH] Content changes for TextEdit (#12557) --- Content.Client/Stylesheets/StyleNano.cs | 4 ++++ Resources/keybinds.yml | 30 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Content.Client/Stylesheets/StyleNano.cs b/Content.Client/Stylesheets/StyleNano.cs index c5dd457ee8..b350602767 100644 --- a/Content.Client/Stylesheets/StyleNano.cs +++ b/Content.Client/Stylesheets/StyleNano.cs @@ -795,6 +795,10 @@ namespace Content.Client.Stylesheets { new StyleProperty("font-color", Color.Gray), }), + + Element().Pseudo(TextEdit.StylePseudoClassPlaceholder) + .Prop("font-color", Color.Gray), + // Chat lineedit - we don't actually draw a stylebox around the lineedit itself, we put it around the // input + other buttons, so we must clear the default stylebox new StyleRule(new SelectorElement(typeof(LineEdit), new[] {StyleClassChatLineEdit}, null, null), diff --git a/Resources/keybinds.yml b/Resources/keybinds.yml index 56dc8090f4..81a9fe3258 100644 --- a/Resources/keybinds.yml +++ b/Resources/keybinds.yml @@ -226,6 +226,16 @@ binds: type: State key: Right canRepeat: true +- function: TextCursorUp + type: State + key: Up + canRepeat: true + priority: 2 +- function: TextCursorDown + type: State + key: Down + canRepeat: true + priority: 2 - function: TextCursorWordLeft type: State key: Left @@ -257,6 +267,18 @@ binds: mod1: Shift canRepeat: true allowSubCombs: true +- function: TextCursorSelectUp + type: State + key: Up + mod1: Shift + canRepeat: true + allowSubCombs: true +- function: TextCursorSelectDown + type: State + key: Down + mod1: Shift + canRepeat: true + allowSubCombs: true - function: TextCursorSelectWordLeft type: State key: Left @@ -286,6 +308,14 @@ binds: type: State key: BackSpace canRepeat: true +- function: TextNewline + type: State + key: Return + canRepeat: true +- function: TextNewline + type: State + key: NumpadEnter + canRepeat: true - function: TextSubmit type: State key: Return