Table of Contents

Class Input

Namespace
GB
Assembly
GBSharp.Framework.dll

The joypad, sampled at the point of use.

public static class Input
Inheritance
Input
Inherited Members

Remarks

Each property reads the joypad register directly, so testing several buttons costs several reads. Call Read() once and test the result with Button when that matters.

Properties

A

[Native("gbs_input_a")]
public static bool A { get; }

Property Value

bool

B

[Native("gbs_input_b")]
public static bool B { get; }

Property Value

bool

Down

[Native("gbs_input_down")]
public static bool Down { get; }

Property Value

bool

Left

[Native("gbs_input_left")]
public static bool Left { get; }

Property Value

bool

Right

[Native("gbs_input_right")]
public static bool Right { get; }

Property Value

bool

Select

[Native("gbs_input_select")]
public static bool Select { get; }

Property Value

bool

Start

[Native("gbs_input_start")]
public static bool Start { get; }

Property Value

bool

Up

[Native("gbs_input_up")]
public static bool Up { get; }

Property Value

bool

Methods

Read()

Samples every button once, returning a Button mask.

[Native("joypad")]
public static byte Read()

Returns

byte