SDXFrameWork  0.04
SDXFrameWork
 全て クラス ネームスペース 関数 変数 ページ
Public メソッド | Public 変数 | すべてのメンバ一覧
クラス SDX::Mouse

マウスの状態を表すクラス. [詳細]

#include <Mouse.h>

Public メソッド

void Reset ()
 状態のリセット. [詳細]
 
void Update ()
 状態の更新. [詳細]
 
bool SetVisible (bool 表示フラグ)
 カーソルの表示設定. [詳細]
 
bool SetPoint (int 移動先X, int 移動先Y)
 カーソル位置を移動. [詳細]
 

Public 変数

int x
 
int y
 
int moveX
 
int moveY
 
int Whell
 
bool press [8]
 
Key Left
 
Key Right
 
Key Middle
 
Key Button4
 
Key Button5
 
Key Button6
 
Key Button7
 
Key Button8
 
int maxButton
 

説明

マウスの状態を表すクラス.

//入力を取得する
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::Mouse::Reset ( )

状態のリセット.

void SDX::Mouse::Update ( )

状態の更新.

bool SDX::Mouse::SetVisible ( bool  表示フラグ)

カーソルの表示設定.

bool SDX::Mouse::SetPoint ( int  移動先X,
int  移動先Y 
)

カーソル位置を移動.