mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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
|
||||
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 {
|
||||
currentUI.input <- ebiten.InputState{-1, -1}
|
||||
return
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
void ebiten_EbitenOpenGLView_Initialized(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:
|
||||
// http://developer.apple.com/library/mac/#qa/qa1385/_index.html
|
||||
|
@ -1,10 +1,10 @@
|
||||
#ifndef GO_EBITEN_UI_COCOA_INPUT_H_
|
||||
#define GO_EBITEN_UI_COCOA_INPUT_H_
|
||||
|
||||
enum InputType {
|
||||
typedef enum {
|
||||
InputTypeMouseUp,
|
||||
InputTypeMouseDragged,
|
||||
InputTypeMouseDown,
|
||||
};
|
||||
} InputType;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user