Logo
Peripheral.h
1#pragma once
2
3#include "Types.h"
4#include "io/Peripheral.h"
5
6namespace SharpKmyIO
7{
8 public enum class INPUTID{
9
30
32 kWIN_MOUSE_POS_Y,//ファイナルレンダー領域の入力
33
37
39
42
55
60
78
83
86
87 kANDROID_BUTTON_HOME,//JNI_~と合わせる
90
94
98
102
106
110
114
118
122
126
130
132 kWIN_MOUSE_TOOL_POS_Y,//ツールで使用できる、常にウィンドウ全体をターゲットにした入力
133
135
136 //keyboard
137 kKEYBOARD_BEGIN, //=0
138 kKEYBOARD_END = kKEYBOARD_BEGIN + 0xff, //=0xff
139
141 };
142
143 public ref class Controller{
144
145 public:
146 kmyIO::Controller *obj = nullptr;
147
149 {
150 //obj = KMY_NEW kmyIO::Controller();
151 obj = kmyIO::Controller::newController();
152 }
153
154 void Release()
155 {
156 delete obj;
157 obj = nullptr;
158 }
159
160 void addInput(System::String ^name, int deviceId, INPUTID inputId, float threshold);
161
162 float getValue(System::String ^name);
163 float getOldValue(System::String ^name);
164 bool isDown(System::String ^name);
165 bool isUp(System::String ^name);
166 bool isHold(System::String ^name);
167 bool isRelease(System::String ^name);
168 bool isDownAny(int deviceId);
169 void update(float elapsed);
170
171 void setGamePadID(int id, bool force);
172 };
173
174
175 public ref class Peripheral
176 {
177 public:
178 static int getMinimumGamepadID();
179 static void setMousePos(int x, int y);
180 static void setMouseButtonState(int state, int flag);
181 static void setCheckActive(bool check);
182 static void setVibrationForce(float force);
183 };
184
185}
Definition: Peripheral.h:143
kmyIO::Controller * obj
Definition: Peripheral.h:146
bool isHold(System::String ^name)
Definition: Peripheral.cpp:60
void update(float elapsed)
Definition: Peripheral.cpp:90
void addInput(System::String ^name, int deviceId, INPUTID inputId, float threshold)
Definition: Peripheral.cpp:6
bool isDownAny(int deviceId)
Definition: Peripheral.cpp:82
void setGamePadID(int id, bool force)
Definition: Peripheral.cpp:101
bool isUp(System::String ^name)
Definition: Peripheral.cpp:49
float getOldValue(System::String ^name)
Definition: Peripheral.cpp:27
bool isRelease(System::String ^name)
Definition: Peripheral.cpp:71
float getValue(System::String ^name)
Definition: Peripheral.cpp:16
bool isDown(System::String ^name)
Definition: Peripheral.cpp:38
Controller()
Definition: Peripheral.h:148
void Release()
Definition: Peripheral.h:154
Definition: Peripheral.h:176
static void setVibrationForce(float force)
Definition: Peripheral.cpp:137
static void setMousePos(int x, int y)
Definition: Peripheral.cpp:116
static void setCheckActive(bool check)
Definition: Peripheral.cpp:130
static void setMouseButtonState(int state, int flag)
Definition: Peripheral.cpp:123
static int getMinimumGamepadID()
Definition: Peripheral.cpp:109
Definition: FSEx.h:4
INPUTID
Definition: Peripheral.h:8