Une belle liste mtn toujours des gros problèmes de perf
This commit is contained in:
parent
63c67424db
commit
d06411aff2
@ -2,11 +2,13 @@ package engine.gui;
|
||||
|
||||
import engine.Engine;
|
||||
import engine.loader.ControllerPromptTextureLoader;
|
||||
import engine.math.Vector3f;
|
||||
import engine.object.ObjectGl;
|
||||
import gameplay.input.InputBuffer;
|
||||
import gameplay.input.Inputs;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class UIInputList extends UIDummy{
|
||||
@ -35,6 +37,21 @@ public class UIInputList extends UIDummy{
|
||||
}
|
||||
|
||||
protected void getObjInPosition(){
|
||||
int index = 0;
|
||||
for (ObjectGl obj : listIcon){
|
||||
obj.resetTransform();
|
||||
obj.scale(new Vector3f(this.scalingFactor, this.scalingFactor, 1.0f));
|
||||
// Position in the camera space
|
||||
float dimension = this.camera.getDimension();
|
||||
float ar = this.camera.getAspectRatio().y / this.camera.getAspectRatio().x;
|
||||
float x = dimension * 2 * this.xPos - dimension;
|
||||
float y = dimension * ar * 2 * this.yPos - dimension * ar;
|
||||
obj.translate(new Vector3f(x, y, this.zPos));
|
||||
// Camera position
|
||||
obj.translate(new Vector3f(- engine.getTransformationView().x, -engine.getTransformationView().y));
|
||||
obj.translate(new Vector3f(index * 10 * this.scalingFactor, 0f, 0f));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
public void createNextButton(int i){
|
||||
@ -101,6 +118,7 @@ public class UIInputList extends UIDummy{
|
||||
}
|
||||
} while(count < 30);
|
||||
|
||||
Collections.reverse(listIcon);
|
||||
engine.add_objectsGl(listIcon);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user