mirror of
https://github.com/lxsang/Diya-API.git
synced 2025-03-12 10:32:48 +01:00
Allow to test Diya directly in the Pharo image
This commit is contained in:
parent
4ecbd0af73
commit
cb9cf2f49e
@ -87,7 +87,10 @@ DiyaBoot >> createWindow [
|
||||
{ #category : #events }
|
||||
DiyaBoot >> init [
|
||||
| status nvdrivers |
|
||||
Transcript show:'System: ', (Smalltalk globals at: #CODENAME),'-v',(Smalltalk globals at: #VERSION);cr.
|
||||
Transcript show:'System: ',
|
||||
(Smalltalk globals at: #CODENAME ifAbsent:['']),
|
||||
'-v',(Smalltalk globals at: #VERSION ifAbsent: ['']);
|
||||
cr.
|
||||
status := SDL2 init: SDL_INIT_EVERYTHING.
|
||||
status = 0
|
||||
ifFalse: [ ^ self error: SDL2 getErrorMessage ].
|
||||
@ -108,10 +111,10 @@ DiyaBoot >> initialize [
|
||||
DiyaBoot >> processEvent: event [
|
||||
|mappedEvt|
|
||||
mappedEvt := event mapped.
|
||||
mappedEvt type = SDL_KEYDOWN ifTrue: [ Transcript show: 'keydown...'. running := false. ].
|
||||
mappedEvt type = SDL_QUIT ifTrue:[ running:= false ].
|
||||
mappedEvt type = SDL_FINGERDOWN ifTrue:[self setCursorPosition: mappedEvt ].
|
||||
mappedEvt type = SDL_FINGERMOTION ifTrue:[self setCursorPosition: mappedEvt ].
|
||||
mappedEvt type = SDL_KEYDOWN ifTrue: [ Transcript show: 'keydown...'. ^running := false. ].
|
||||
mappedEvt type = SDL_QUIT ifTrue:[ ^running:= false ].
|
||||
mappedEvt type = SDL_FINGERDOWN ifTrue:[^self setCursorPosition: mappedEvt ].
|
||||
mappedEvt type = SDL_FINGERMOTION ifTrue:[^self setCursorPosition: mappedEvt ].
|
||||
]
|
||||
|
||||
{ #category : #events }
|
||||
|
Loading…
x
Reference in New Issue
Block a user