mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
Use typedef
This commit is contained in:
parent
ea6e88d06e
commit
a6ebcbbda6
@ -55,7 +55,7 @@ func ebiten_EbitenOpenGLView_Updating() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//export ebiten_EbitenOpenGLView_InputUpdated
|
//export ebiten_EbitenOpenGLView_InputUpdated
|
||||||
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.int, cx, cy C.int) {
|
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.InputType, cx, cy C.int) {
|
||||||
if inputType == C.InputTypeMouseUp {
|
if inputType == C.InputTypeMouseUp {
|
||||||
currentUI.input <- ebiten.InputState{-1, -1}
|
currentUI.input <- ebiten.InputState{-1, -1}
|
||||||
return
|
return
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
void ebiten_EbitenOpenGLView_Initialized(void);
|
void ebiten_EbitenOpenGLView_Initialized(void);
|
||||||
void ebiten_EbitenOpenGLView_Updating(void);
|
void ebiten_EbitenOpenGLView_Updating(void);
|
||||||
void ebiten_EbitenOpenGLView_InputUpdated(enum InputType inputType, int x, int y);
|
void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
||||||
|
|
||||||
// Reference:
|
// Reference:
|
||||||
// http://developer.apple.com/library/mac/#qa/qa1385/_index.html
|
// http://developer.apple.com/library/mac/#qa/qa1385/_index.html
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef GO_EBITEN_UI_COCOA_INPUT_H_
|
#ifndef GO_EBITEN_UI_COCOA_INPUT_H_
|
||||||
#define GO_EBITEN_UI_COCOA_INPUT_H_
|
#define GO_EBITEN_UI_COCOA_INPUT_H_
|
||||||
|
|
||||||
enum InputType {
|
typedef enum {
|
||||||
InputTypeMouseUp,
|
InputTypeMouseUp,
|
||||||
InputTypeMouseDragged,
|
InputTypeMouseDragged,
|
||||||
InputTypeMouseDown,
|
InputTypeMouseDown,
|
||||||
};
|
} InputType;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user