SDXFrameWork  0.09
SDXFrameWork
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | Public Attributes | Friends | List of all members
SDX::Mouse Class Reference

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

#include <Mouse.h>

Public Member Functions

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

Public Attributes

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
 

Friends

class Input
 

Detailed Description

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

//©SDXFramework http://sourceforge.jp/projects/dxframework/
//🍣入力を取得する
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;
}

Member Function Documentation

void SDX::Mouse::Reset ( )

状態のリセット.

void SDX::Mouse::Update ( )

状態の更新.

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

カーソルの表示設定[未実装].

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

カーソル位置を移動.