mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-04 15:04:28 +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()
|
C.EndDrawing()
|
||||||
}
|
}
|
||||||
|
|
||||||
//export ebiten_EbitenOpenGLView_Initialized
|
//export ebiten_Initialized
|
||||||
func ebiten_EbitenOpenGLView_Initialized() {
|
func ebiten_Initialized() {
|
||||||
if currentUI.graphicsDevice != nil {
|
if currentUI.graphicsDevice != nil {
|
||||||
panic("The graphics device is already initialized")
|
panic("The graphics device is already initialized")
|
||||||
}
|
}
|
||||||
@ -116,8 +116,8 @@ func ebiten_EbitenOpenGLView_Initialized() {
|
|||||||
currentUI.screenScale)
|
currentUI.screenScale)
|
||||||
}
|
}
|
||||||
|
|
||||||
//export ebiten_EbitenOpenGLView_InputUpdated
|
//export ebiten_InputUpdated
|
||||||
func ebiten_EbitenOpenGLView_InputUpdated(inputType C.InputType, cx, cy C.int) {
|
func ebiten_InputUpdated(inputType C.InputType, cx, cy C.int) {
|
||||||
if inputType == C.InputTypeMouseUp {
|
if inputType == C.InputTypeMouseUp {
|
||||||
currentUI.gameContext.inputState = ebiten.InputState{-1, -1}
|
currentUI.gameContext.inputState = ebiten.InputState{-1, -1}
|
||||||
return
|
return
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "ebiten_content_view.h"
|
#include "ebiten_content_view.h"
|
||||||
#include "input.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 {
|
@implementation EbitenContentView {
|
||||||
}
|
}
|
||||||
@ -17,7 +17,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
|||||||
fromView:nil];
|
fromView:nil];
|
||||||
int x = location.x;
|
int x = location.x;
|
||||||
int y = location.y;
|
int y = location.y;
|
||||||
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseDown, x, y);
|
ebiten_InputUpdated(InputTypeMouseDown, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)mouseUp:(NSEvent*)theEvent {
|
- (void)mouseUp:(NSEvent*)theEvent {
|
||||||
@ -26,7 +26,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
|||||||
fromView:nil];
|
fromView:nil];
|
||||||
int x = location.x;
|
int x = location.x;
|
||||||
int y = location.y;
|
int y = location.y;
|
||||||
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseUp, x, y);
|
ebiten_InputUpdated(InputTypeMouseUp, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)mouseDragged:(NSEvent*)theEvent {
|
- (void)mouseDragged:(NSEvent*)theEvent {
|
||||||
@ -34,7 +34,7 @@ void ebiten_EbitenOpenGLView_InputUpdated(InputType inputType, int x, int y);
|
|||||||
fromView:nil];
|
fromView:nil];
|
||||||
int x = location.x;
|
int x = location.x;
|
||||||
int y = location.y;
|
int y = location.y;
|
||||||
ebiten_EbitenOpenGLView_InputUpdated(InputTypeMouseDragged, x, y);
|
ebiten_InputUpdated(InputTypeMouseDragged, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#import "ebiten_content_view.h"
|
#import "ebiten_content_view.h"
|
||||||
|
|
||||||
void ebiten_EbitenOpenGLView_Initialized(void);
|
void ebiten_Initialized(void);
|
||||||
|
|
||||||
@implementation EbitenWindow
|
@implementation EbitenWindow
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@ void ebiten_EbitenOpenGLView_Initialized(void);
|
|||||||
shareContext:nil];
|
shareContext:nil];
|
||||||
[self->glContext_ setView:[self contentView]];
|
[self->glContext_ setView:[self contentView]];
|
||||||
[self->glContext_ makeCurrentContext];
|
[self->glContext_ makeCurrentContext];
|
||||||
ebiten_EbitenOpenGLView_Initialized();
|
ebiten_Initialized();
|
||||||
|
|
||||||
[format release];
|
[format release];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user