From 654c400487e822ce6ca8b5fdf10676ad8787631b Mon Sep 17 00:00:00 2001 From: Eva Krebs Date: Fri, 13 Sep 2024 18:11:20 +0200 Subject: [PATCH] fix Morph extensions --- .../instance/gmDeregisterBlockForKey..st | 7 +++++++ .../instance/gmDeregisterMethodInvocationForKey..st | 7 +++++++ .../instance/gmEvaluateRegisteredEvents.st | 6 ++++++ .../Morph.extension/instance/gmIsKeyPressed..st | 6 ++++++ .../instance/gmRegisterBlock.forKey..st | 7 +++++++ .../instance/gmRegisterMethodInvocation.on.forKey..st | 8 ++++++++ .../instance/gmRegisterToKeyHandler.st | 5 +++++ .../Morph.extension/methodProperties.json | 11 +++++++++++ .../Morph.extension/properties.json | 2 ++ 9 files changed, 59 insertions(+) create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterBlockForKey..st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterMethodInvocationForKey..st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmEvaluateRegisteredEvents.st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmIsKeyPressed..st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterBlock.forKey..st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterMethodInvocation.on.forKey..st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterToKeyHandler.st create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/methodProperties.json create mode 100644 src/GameMecha-KeyHandling.package/Morph.extension/properties.json diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterBlockForKey..st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterBlockForKey..st new file mode 100644 index 00000000..531b07eb --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterBlockForKey..st @@ -0,0 +1,7 @@ +*GameMecha-KeyHandling +gmDeregisterBlockForKey: aCharacter + self eventHandler class = GMKeyHandler + ifTrue: [self extension eventHandler gmDeregisterBlockForKey: aCharacter] + ifFalse: [self error: 'Morph has no GMKeyHandler']. + + \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterMethodInvocationForKey..st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterMethodInvocationForKey..st new file mode 100644 index 00000000..97fc833f --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmDeregisterMethodInvocationForKey..st @@ -0,0 +1,7 @@ +*GameMecha-KeyHandling +gmDeregisterMethodInvocationForKey: aCharacter + self eventHandler class = GMKeyHandler + ifTrue: [self extension eventHandler gmDeregisterMethodInvocationForKey: aCharacter] + ifFalse: [self error: 'Morph has no GMKeyHandler']. + + \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmEvaluateRegisteredEvents.st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmEvaluateRegisteredEvents.st new file mode 100644 index 00000000..6026b3c6 --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmEvaluateRegisteredEvents.st @@ -0,0 +1,6 @@ +*GameMecha-KeyHandling +gmEvaluateRegisteredEvents + self eventHandler class = GMKeyHandler + ifTrue: [self extension eventHandler gmEvaluateRegisteredEvents] + ifFalse: [self error: 'Morph has no GMKeyHandler']. + \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmIsKeyPressed..st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmIsKeyPressed..st new file mode 100644 index 00000000..8d59eecd --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmIsKeyPressed..st @@ -0,0 +1,6 @@ +*GameMecha-KeyHandling +gmIsKeyPressed: aCharacter + self eventHandler class = GMKeyHandler + ifTrue: [^ self eventHandler gmIsKeyPressed: aCharacter] + ifFalse: [self error: 'Morph has no GMKeyHandler']. + \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterBlock.forKey..st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterBlock.forKey..st new file mode 100644 index 00000000..6ed70c02 --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterBlock.forKey..st @@ -0,0 +1,7 @@ +*GameMecha-KeyHandling +gmRegisterBlock: aBlock forKey: aCharacter + self eventHandler class = GMKeyHandler + ifTrue: [self extension eventHandler gmRegisterBlock: aBlock forKey: aCharacter] + ifFalse: [self error: 'Morph has no GMKeyHandler']. + + \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterMethodInvocation.on.forKey..st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterMethodInvocation.on.forKey..st new file mode 100644 index 00000000..16cec4ee --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterMethodInvocation.on.forKey..st @@ -0,0 +1,8 @@ +*GameMecha-KeyHandling +gmRegisterMethodInvocation: aSelector on: aReceivingObject forKey: aCharacter + self eventHandler class = GMKeyHandler + ifTrue: [self extension eventHandler gmRegisterMethodInvocation: aSelector + on: aReceivingObject forKey: aCharacter] + ifFalse: [self error: 'Morph has no GMKeyHandler']. + + \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterToKeyHandler.st b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterToKeyHandler.st new file mode 100644 index 00000000..c0293584 --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/instance/gmRegisterToKeyHandler.st @@ -0,0 +1,5 @@ +*GameMecha-KeyHandling +gmRegisterToKeyHandler + self assureExtension. + self extension eventHandler: (GMKeyHandler new). + ActiveHand newKeyboardFocus: self. \ No newline at end of file diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/methodProperties.json b/src/GameMecha-KeyHandling.package/Morph.extension/methodProperties.json new file mode 100644 index 00000000..6c25fc8f --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/methodProperties.json @@ -0,0 +1,11 @@ +{ + "class" : { + }, + "instance" : { + "gmDeregisterBlockForKey:" : "NK 7/25/2018 17:02", + "gmDeregisterMethodInvocationForKey:" : "TP 7/25/2018 16:03", + "gmEvaluateRegisteredEvents" : "TP 7/25/2018 16:04", + "gmIsKeyPressed:" : "TP 7/25/2018 16:04", + "gmRegisterBlock:forKey:" : "TP 7/25/2018 16:04", + "gmRegisterMethodInvocation:on:forKey:" : "TP 7/25/2018 16:06", + "gmRegisterToKeyHandler" : "TP 7/10/2018 16:24" } } diff --git a/src/GameMecha-KeyHandling.package/Morph.extension/properties.json b/src/GameMecha-KeyHandling.package/Morph.extension/properties.json new file mode 100644 index 00000000..58989fd6 --- /dev/null +++ b/src/GameMecha-KeyHandling.package/Morph.extension/properties.json @@ -0,0 +1,2 @@ +{ + "name" : "Morph" }