Repe [T3DU] Update - 31f26d171bba0355ce2a77031e3aad4c64dbc7e9

This commit is contained in:
2026-09-04 10:46:13 -07:00
parent c915312901
commit 0460b9d587
482 changed files with 27797 additions and 3226 deletions

View File

@ -237,8 +237,24 @@ class App {
traitRenders.remove(f);
}
public static function notifyOnRender2D(f: kha.graphics2.Graphics->Void) {
traitRenders2D.push(f);
public static function notifyOnRender2D(f: kha.graphics2.Graphics->Void, index: Int = -1) {
if (index < 0 || index >= traitRenders2D.length) {
traitRenders2D.push(f);
} else {
traitRenders2D.insert(index, f);
}
}
public static function moveRender2D(f: kha.graphics2.Graphics->Void, newIndex: Int) {
var oldIndex = traitRenders2D.indexOf(f);
if (oldIndex != -1) {
traitRenders2D.splice(oldIndex, 1);
if (newIndex >= traitRenders2D.length) {
traitRenders2D.push(f);
} else {
traitRenders2D.insert(newIndex, f);
}
}
}
public static function removeRender2D(f: kha.graphics2.Graphics->Void) {