This commit is contained in:
Antoine 2021-06-04 01:05:05 +02:00
parent 0a8b5e7e7c
commit ab6939466d
2 changed files with 5 additions and 3 deletions

View File

@ -91,8 +91,10 @@ public class Text {
private void removeFromIndexToEnd(int i){
int j = 0;
for (ObjectGl objectGl : this.charList){
if (j >= i) this.engine.remove_objectGl(objectGl);
if (linkedUIElement != null) linkedUIElement.removeObj(objectGl);
if (j >= i) {
this.engine.remove_objectGl(objectGl);
if (linkedUIElement != null) linkedUIElement.removeObj(objectGl);
}
j++;
}
this.charList = this.charList.subList(0, i);

View File

@ -33,7 +33,7 @@ public class UIElement {
}
public void removeObj(ObjectGl obj){
this.objs.remove(obj);
}
public void update(){