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

タッチ操作. More...

#include <Touch.h>

Public Member Functions

void Update ()
 状態の更新. More...
 
void Reset ()
 状態のリセット. More...
 

Public Attributes

double x = 0
 タッチしている座標
 
double y = 0
 タッチしている座標
 
double moveX = 0
 前回更新時からの移動量
 
double moveY = 0
 前回更新時からの移動量
 
bool on = false
 タッチされた直後は true
 
bool off = false
 指を離した直後は true
 
bool hold = false
 タッチしている間は true
 
unsigned int holdCount = 0
 押されている時間
 

Friends

class Input
 

Detailed Description

タッチ操作.

//Copyright © 2014 SDXFramework
//[License]GNU Affero General Public License, version 3
//[Contact]http://sourceforge.jp/projects/dxframework/
//ライブラリの初期化等を行う
#include <SDXFramework.h>
bool SampleTouch()
{
using namespace SDX;
System::Initialise("sample", 640, 480);//ウィンドウタイトルを指定して、初期化する
while (System::Update())//ウィンドウの更新や、入力の更新等を行う
{
if (Input::key.Return.on){ break;}//Enterで終了
}
System::End();//ライブラリの終了処理を行う
return true;
}

Member Function Documentation

void SDX::Touch::Update ( )
inline

状態の更新.

void SDX::Touch::Reset ( )
inline

状態のリセット.