SDXFrameWork  0.07
SDXFrameWork
 全て クラス ネームスペース 関数 変数 列挙型 列挙型の値 ページ
Public メソッド | Static Public メソッド | Public 変数 | すべてのメンバ一覧
クラス SDX::Keyboard

キーボードの状態を表すクラス. [詳細]

#include <Keyboard.h>

Public メソッド

void Reset ()
 状態のリセット. [詳細]
 
void Update ()
 状態の更新. [詳細]
 

Static Public メソッド

static bool HoldAnyKey ()
 いずれかのキーが押されているか取得. [詳細]
 

Public 変数

bool press [256]
 
Key Back
 
Key Tab
 
Key Return
 
Key LShift
 
Key RShift
 
Key LControl
 
Key RControl
 
Key Escape
 
Key Space
 
Key PageUp
 
Key PageDown
 
Key End
 
Key Home
 
Key Left
 
Key Up
 
Key Right
 
Key Down
 
Key Insert
 
Key Delete
 
Key Minus
 
Key Yen
 
Key PrevTrack
 
Key Period
 
Key Slash
 
Key LAlt
 
Key RAlt
 
Key Scroll
 
Key Semicolon
 
Key Colon
 
Key LBracket
 
Key RBracket
 
Key At
 
Key Backslash
 
Key Comma
 
Key Capslock
 
Key Pause
 
Key Numpad0
 
Key Numpad1
 
Key Numpad2
 
Key Numpad3
 
Key Numpad4
 
Key Numpad5
 
Key Numpad6
 
Key Numpad7
 
Key Numpad8
 
Key Numpad9
 
Key Multiply
 
Key Add
 
Key Subtract
 
Key Decimal
 
Key Divide
 
Key NUMPADEnter
 
Key F1
 
Key F2
 
Key F3
 
Key F4
 
Key F5
 
Key F6
 
Key F7
 
Key F8
 
Key F9
 
Key F10
 
Key F11
 
Key F12
 
Key A
 
Key B
 
Key C
 
Key D
 
Key E
 
Key F
 
Key G
 
Key H
 
Key I
 
Key J
 
Key K
 
Key L
 
Key M
 
Key N
 
Key O
 
Key P
 
Key Q
 
Key R
 
Key S
 
Key T
 
Key U
 
Key V
 
Key W
 
Key X
 
Key Y
 
Key Z
 
Key _0
 
Key _1
 
Key _2
 
Key _3
 
Key _4
 
Key _5
 
Key _6
 
Key _7
 
Key _8
 
Key _9
 

説明

キーボードの状態を表すクラス.

//入力を取得する
bool SampleInput()
{
using namespace SDX;
System::Initialise("sample", 600, 400);
std::string message = "";
while (System::Update())
{
if (Input::mouse.Left.on) message = "クリックした";
if (Input::mouse.Left.off) message = "離した";
if (Input::key.Z.hold) message = "Zを押している";
if (Input::key.Z.holdCount > 60) message = "Zを長押し";
//マウスの位置に文字を描画
Drawing::String(Input::mouse.x, Input::mouse.y, Color::White, message.c_str());
if (Input::key.Return.on) break;//Enterで終了
}
return true;
}

関数

void SDX::Keyboard::Reset ( )

状態のリセット.

void SDX::Keyboard::Update ( )

状態の更新.

static bool SDX::Keyboard::HoldAnyKey ( )
static

いずれかのキーが押されているか取得.