mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Rename functions
This commit is contained in:
parent
75a362d5b1
commit
c3968a5aaa
@ -105,8 +105,8 @@ func (ui *UI) Draw(f func(graphics.Context)) {
|
||||
C.EndDrawing()
|
||||
}
|
||||
|
||||
//export ebiten_EbitenOpenGLView_Initialized
|
||||
func ebiten_EbitenOpenGLView_Initialized() {
|
||||
//export ebiten_Initialized
|
||||
func ebiten_Initialized() {
|
||||
if currentUI.graphicsDevice != nil {
|
||||
panic("The graphics device is already initialized")
|
||||
}
|
||||
@ -116,8 +116,8 @@ func ebiten_EbitenOpenGLView_Initialized() {
|
||||
currentUI.screenScale)
|
||||
}
|
||||
|
||||
//export ebiten_EbitenOpenGLView_InputUpdated
|
||||
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.InputType, cx, cy C.int) {
|
||||
//export ebiten_InputUpdated
|
||||
func ebiten_InputUpdated(inputType C.InputType, cx, cy C.int) {
|
||||
if inputType == C.InputTypeMouseUp {
|
||||
currentUI.gameContext.inputState = ebiten.InputState{-1, -1}
|
||||
return
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "ebiten_content_view.h"
|
||||
#include "input.h"
|
||||
|
||||
void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
||||
void ebiten_InputUpdated(InputType inputType, int x, int y);
|
||||
|
||||
@implementation EbitenContentView {
|
||||
}
|
||||
@ -17,7 +17,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
||||
fromView:nil];
|
||||
int x = location.x;
|
||||
int y = location.y;
|
||||
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseDown, x, y);
|
||||
ebiten_InputUpdated(InputTypeMouseDown, x, y);
|
||||
}
|
||||
|
||||
- (void)mouseUp:(NSEvent*)theEvent {
|
||||
@ -26,7 +26,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
||||
fromView:nil];
|
||||
int x = location.x;
|
||||
int y = location.y;
|
||||
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseUp, x, y);
|
||||
ebiten_InputUpdated(InputTypeMouseUp, x, y);
|
||||
}
|
||||
|
||||
- (void)mouseDragged:(NSEvent*)theEvent {
|
||||
@ -34,7 +34,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
||||
fromView:nil];
|
||||
int x = location.x;
|
||||
int y = location.y;
|
||||
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseDragged, x, y);
|
||||
ebiten_InputUpdated(InputTypeMouseDragged, x, y);
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#import "ebiten_content_view.h"
|
||||
|
||||
void ebiten_EbitenOpenGLView_Initialized(void);
|
||||
void ebiten_Initialized(void);
|
||||
|
||||
@implementation EbitenWindow
|
||||
{
|
||||
@ -61,7 +61,7 @@ void ebiten_EbitenOpenGLView_Initialized(void);
|
||||
shareContext:nil];
|
||||
[self->glContext_ setView:[self contentView]];
|
||||
[self->glContext_ makeCurrentContext];
|
||||
ebiten_EbitenOpenGLView_Initialized();
|
||||
ebiten_Initialized();
|
||||
|
||||
[format release];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user