Skip to content

Class KeyboardSubscriberWithOwner

Definition

Namespace: StardewUI.Input
Assembly: StardewUI.dll

An implementation of IKeyboardSubscriber that forwards keys to the owning IKeyboardSubscriberOwnerView.

public class KeyboardSubscriberWithOwner : StardewUI.Input.ICaptureTarget, 
    StardewValley.IKeyboardSubscriber

Inheritance
Object ⇦ KeyboardSubscriberWithOwner

Implements
ICaptureTarget, IKeyboardSubscriber

Members

Constructors

Name Description
KeyboardSubscriberWithOwner(IKeyboardSubscriberOwnerView, GameWindow) An implementation of IKeyboardSubscriber that forwards keys to the owning IKeyboardSubscriberOwnerView.

Properties

Name Description
CapturingView The view that initiated the capturing. May be the same object as the ICaptureTarget, or may be the "owner" of a hidden TextBox or other IKeyboardSubscriber.
Selected Whether this subscriber is active. When this is changed to true, this subscriber is registered to keyboardDispatcher and key capturing begins. When this is changed to false, it is removed from keyboardDispatcher and key capturing ends.

Methods

Name Description
RecieveCommandInput(Char)
RecieveSpecialInput(Keys)
RecieveTextInput(Char)
RecieveTextInput(string)
ReleaseCapture() Stops input capturing from this target.

Details

Constructors

KeyboardSubscriberWithOwner(IKeyboardSubscriberOwnerView, GameWindow)

An implementation of IKeyboardSubscriber that forwards keys to the owning IKeyboardSubscriberOwnerView.

public KeyboardSubscriberWithOwner(StardewUI.Input.IKeyboardSubscriberOwnerView owner, Microsoft.Xna.Framework.GameWindow window);
Parameters

owner   IKeyboardSubscriberOwnerView
The view that owns this subscriber.

window   GameWindow


Properties

CapturingView

The view that initiated the capturing. May be the same object as the ICaptureTarget, or may be the "owner" of a hidden TextBox or other IKeyboardSubscriber.

public StardewUI.IView CapturingView { get; }
Property Value

IView


Selected

Whether this subscriber is active. When this is changed to true, this subscriber is registered to keyboardDispatcher and key capturing begins. When this is changed to false, it is removed from keyboardDispatcher and key capturing ends.

public bool Selected { get; set; }
Property Value

Boolean


Methods

RecieveCommandInput(char)

public void RecieveCommandInput(char command);
Parameters

command   Char


RecieveSpecialInput(Keys)

public void RecieveSpecialInput(Microsoft.Xna.Framework.Input.Keys key);
Parameters

key   Keys


RecieveTextInput(char)

public void RecieveTextInput(char inputChar);
Parameters

inputChar   Char


RecieveTextInput(string)

public void RecieveTextInput(string text);
Parameters

text   string


ReleaseCapture()

Stops input capturing from this target.

public void ReleaseCapture();