Gestion de toutes les lettres pour Text.java
This commit is contained in:
parent
df57374117
commit
a6f25bb75b
@ -230,7 +230,7 @@ public class Engine {
|
|||||||
background.translate(new Vector3f(-3011.0f, 1400.0f, 1.0f));
|
background.translate(new Vector3f(-3011.0f, 1400.0f, 1.0f));
|
||||||
engine.add_objectGl(background);
|
engine.add_objectGl(background);
|
||||||
|
|
||||||
Text TexTest = new Text("aaaaa",20.0f, 10, engine);
|
Text TexTest = new Text("ABCDEFGHIJKLMNOPQRSTUVWXYZ",20.0f, 10, engine);
|
||||||
|
|
||||||
long timer = System.currentTimeMillis();
|
long timer = System.currentTimeMillis();
|
||||||
long lastFrame;
|
long lastFrame;
|
||||||
|
@ -36,11 +36,11 @@ public class Text {
|
|||||||
private ObjectGl charToObjectGl(char a){
|
private ObjectGl charToObjectGl(char a){
|
||||||
ObjectGl objectGl = new ObjectGl(this.zPos, 1.0f, 1.0f, this.size, "textures/dejavu10x10_gs_tc.png", null);
|
ObjectGl objectGl = new ObjectGl(this.zPos, 1.0f, 1.0f, this.size, "textures/dejavu10x10_gs_tc.png", null);
|
||||||
objectGl.setShader("shaders/StylishShaders/BasicVert.glsl","shaders/StylishShaders/TextFrag.glsl");
|
objectGl.setShader("shaders/StylishShaders/BasicVert.glsl","shaders/StylishShaders/TextFrag.glsl");
|
||||||
switch (a){
|
if (a < 132 && a > 96){
|
||||||
case ('a'): {
|
objectGl.setTextureWrap(0.0f + (a - 97) * 10.0f,40.0f,10.0f,10.0f, ObjectGl.DEFAULT);
|
||||||
objectGl.setTextureWrap(0.0f,40.0f,10.0f,10.0f, ObjectGl.DEFAULT);
|
}
|
||||||
break;
|
else if (a < 91 && a > 64){
|
||||||
}
|
objectGl.setTextureWrap(0.0f + (a - 97) * 10.0f,30.0f,10.0f,10.0f, ObjectGl.DEFAULT);
|
||||||
}
|
}
|
||||||
return objectGl;
|
return objectGl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user