Focus OOC hotkey (#1272)
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Content.Client.Input
|
|||||||
{
|
{
|
||||||
var common = contexts.GetContext("common");
|
var common = contexts.GetContext("common");
|
||||||
common.AddFunction(ContentKeyFunctions.FocusChat);
|
common.AddFunction(ContentKeyFunctions.FocusChat);
|
||||||
|
common.AddFunction(ContentKeyFunctions.FocusOOC);
|
||||||
common.AddFunction(ContentKeyFunctions.ExamineEntity);
|
common.AddFunction(ContentKeyFunctions.ExamineEntity);
|
||||||
common.AddFunction(ContentKeyFunctions.OpenTutorial);
|
common.AddFunction(ContentKeyFunctions.OpenTutorial);
|
||||||
common.AddFunction(ContentKeyFunctions.TakeScreenshot);
|
common.AddFunction(ContentKeyFunctions.TakeScreenshot);
|
||||||
|
|||||||
@@ -41,6 +41,9 @@ namespace Content.Client.State
|
|||||||
|
|
||||||
_inputManager.SetInputCommand(ContentKeyFunctions.FocusChat,
|
_inputManager.SetInputCommand(ContentKeyFunctions.FocusChat,
|
||||||
InputCmdHandler.FromDelegate(s => FocusChat(_gameChat)));
|
InputCmdHandler.FromDelegate(s => FocusChat(_gameChat)));
|
||||||
|
|
||||||
|
_inputManager.SetInputCommand(ContentKeyFunctions.FocusOOC,
|
||||||
|
InputCmdHandler.FromDelegate(s => FocusOOC(_gameChat)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Shutdown()
|
public override void Shutdown()
|
||||||
@@ -61,5 +64,16 @@ namespace Content.Client.State
|
|||||||
chat.Input.IgnoreNext = true;
|
chat.Input.IgnoreNext = true;
|
||||||
chat.Input.GrabKeyboardFocus();
|
chat.Input.GrabKeyboardFocus();
|
||||||
}
|
}
|
||||||
|
internal static void FocusOOC(ChatBox chat)
|
||||||
|
{
|
||||||
|
if (chat == null || chat.UserInterfaceManager.KeyboardFocused != null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
chat.Input.IgnoreNext = true;
|
||||||
|
chat.Input.GrabKeyboardFocus();
|
||||||
|
chat.Input.InsertAtCursor("[");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ Open inventory: [color=#a4885c]{7}[/color]
|
|||||||
Open character window: [color=#a4885c]{8}[/color]
|
Open character window: [color=#a4885c]{8}[/color]
|
||||||
Open crafting window: [color=#a4885c]{9}[/color]
|
Open crafting window: [color=#a4885c]{9}[/color]
|
||||||
Focus chat: [color=#a4885c]{10}[/color]
|
Focus chat: [color=#a4885c]{10}[/color]
|
||||||
|
Focus OOC: [color=#a4885c]{26}[/color]
|
||||||
Use hand/object in hand: [color=#a4885c]{22}[/color]
|
Use hand/object in hand: [color=#a4885c]{22}[/color]
|
||||||
Do wide attack: [color=#a4885c]{23}[/color]
|
Do wide attack: [color=#a4885c]{23}[/color]
|
||||||
Use targeted entity: [color=#a4885c]{11}[/color]
|
Use targeted entity: [color=#a4885c]{11}[/color]
|
||||||
@@ -110,7 +111,8 @@ Toggle sandbox window: [color=#a4885c]{21}[/color]",
|
|||||||
Key(Use),
|
Key(Use),
|
||||||
Key(WideAttack),
|
Key(WideAttack),
|
||||||
Key(SmartEquipBackpack),
|
Key(SmartEquipBackpack),
|
||||||
Key(SmartEquipBelt)));
|
Key(SmartEquipBelt),
|
||||||
|
Key(FocusOOC)));
|
||||||
|
|
||||||
//Gameplay
|
//Gameplay
|
||||||
VBox.AddChild(new Label { FontOverride = headerFont, Text = "\nGameplay" });
|
VBox.AddChild(new Label { FontOverride = headerFont, Text = "\nGameplay" });
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace Content.Shared.Input
|
|||||||
public static readonly BoundKeyFunction Drop = "Drop";
|
public static readonly BoundKeyFunction Drop = "Drop";
|
||||||
public static readonly BoundKeyFunction ExamineEntity = "ExamineEntity";
|
public static readonly BoundKeyFunction ExamineEntity = "ExamineEntity";
|
||||||
public static readonly BoundKeyFunction FocusChat = "FocusChatWindow";
|
public static readonly BoundKeyFunction FocusChat = "FocusChatWindow";
|
||||||
|
public static readonly BoundKeyFunction FocusOOC = "FocusOOCWindow";
|
||||||
public static readonly BoundKeyFunction OpenCharacterMenu = "OpenCharacterMenu";
|
public static readonly BoundKeyFunction OpenCharacterMenu = "OpenCharacterMenu";
|
||||||
public static readonly BoundKeyFunction OpenContextMenu = "OpenContextMenu";
|
public static readonly BoundKeyFunction OpenContextMenu = "OpenContextMenu";
|
||||||
public static readonly BoundKeyFunction OpenCraftingMenu = "OpenCraftingMenu";
|
public static readonly BoundKeyFunction OpenCraftingMenu = "OpenCraftingMenu";
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ binds:
|
|||||||
- function: FocusChatWindow
|
- function: FocusChatWindow
|
||||||
type: State
|
type: State
|
||||||
key: T
|
key: T
|
||||||
|
- function: FocusOOCWindow
|
||||||
|
type: State
|
||||||
|
key: LBracket
|
||||||
- function: EditorLinePlace
|
- function: EditorLinePlace
|
||||||
type: State
|
type: State
|
||||||
key: MouseLeft
|
key: MouseLeft
|
||||||
|
|||||||
Reference in New Issue
Block a user