all: make pointer.Area an interface

With an interface instead of anonymous functions, amending an
area's parameters can be done even after adding it to an OpHandler.

This will be useful when we switch to serialized op lists.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-04-24 15:39:53 +02:00
parent 3ad94ed20e
commit a8bb3c2f14
6 changed files with 34 additions and 28 deletions
+3 -1
View File
@@ -25,7 +25,9 @@ type OpHandler struct {
Grab bool
}
type Area func(pos f32.Point) HitResult
type Area interface {
Hit(pos f32.Point) HitResult
}
type Key interface{}