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.
Property Value
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.
Property Value
Methods
RecieveCommandInput(char)
Parameters
command Char
RecieveSpecialInput(Keys)
Parameters
key Keys
RecieveTextInput(char)
Parameters
inputChar Char
RecieveTextInput(string)
Parameters
text string
ReleaseCapture()
Stops input capturing from this target.