SDXFrameWork
0.09
SDXFrameWork
Main Page
Related Pages
Classes
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Pages
Multimedia
Key.h
1
#pragma once//☀SDL
2
#include <Multimedia/SDX.h>
3
4
namespace
SDX
5
{
8
class
Key
9
{
10
public
:
11
bool
on =
false
;
//押した瞬間
12
bool
off =
false
;
//離した瞬間
13
bool
hold =
false
;
//押されている
14
unsigned
int
holdCount = 0;
//押されている時間
15
17
void
Reset
()
18
{
19
on =
false
;
20
off =
false
;
21
hold =
false
;
22
holdCount = 0;
23
}
24
26
void
Update
(
int
押下フラグ)
27
{
28
if
(!hold && 押下フラグ) on =
true
;
29
else
on =
false
;
30
if
(hold && !押下フラグ) off =
true
;
31
else
off =
false
;
32
33
if
(押下フラグ){
34
hold =
true
;
35
holdCount++;
36
}
else
{
37
hold =
false
;
38
holdCount = 0;
39
}
40
}
41
};
42
}
SDX::Key::Reset
void Reset()
キーのリセット.
Definition:
Key.h:17
SDX::Key::Update
void Update(int 押下フラグ)
押下状態の更新.
Definition:
Key.h:26
SDX::Key
各ボタンとキーを表すクラス.
Definition:
Key.h:8
Generated on Thu Sep 4 2014 21:28:56 for SDXFrameWork by
1.8.7