interface name consistency

This commit is contained in:
2024-03-13 10:39:22 +01:00
parent 2ab5a38894
commit 4ab3d868c1
37 changed files with 94 additions and 94 deletions

View File

@@ -1,21 +1,21 @@
package lib.ui.elements;
import lib.ui.rendere.UIEventDelegate;
import lib.ui.rendere.IUIEventDelegate;
/**
Find the responsable UIElement to handle the event based on position. Element can be layerd.
Elements added first are lower in the layer.
**/
abstract EventMap(Array<{bound:Rect, delegate:UIEventDelegate}>) {
inline public function new(?i:Array<{bound:Rect, delegate:UIEventDelegate}>) {
abstract EventMap(Array<{bound:Rect, delegate:IUIEventDelegate}>) {
inline public function new(?i:Array<{bound:Rect, delegate:IUIEventDelegate}>) {
if (i == null) {
this = new Array<{bound:Rect, delegate:UIEventDelegate}>();
this = new Array<{bound:Rect, delegate:IUIEventDelegate}>();
} else {
this = i;
}
}
public function findResponseableDelegate(pos:Pos):UIEventDelegate {
public function findResponseableDelegate(pos:Pos):IUIEventDelegate {
for (i in 0...this.length) {
var newi = (this.length - 1) - i;
var element = this[newi];
@@ -26,7 +26,7 @@ abstract EventMap(Array<{bound:Rect, delegate:UIEventDelegate}>) {
return null;
}
public inline function addElement(element:UIEventDelegate, bound:Rect) {
public inline function addElement(element:IUIEventDelegate, bound:Rect) {
this.push({bound: bound, delegate: element});
}
}