1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
package net.tylermurphy.Minecraft.UI.UIFactory;
import static net.tylermurphy.Minecraft.UI.UIMaster.add;
import static net.tylermurphy.Minecraft.UI.UIMaster.createUI;
import static net.tylermurphy.Minecraft.UI.UIMaster.setEnabled;
import net.tylermurphy.Minecraft.Render.Data.Texture;
import net.tylermurphy.Minecraft.UI.UIFont;
import net.tylermurphy.Minecraft.UI.UIText;
public class F3UI {
public static void initF3UI() {
createUI(1);
setEnabled(false);
String maxMem = "Max memory (bytes): " + Runtime.getRuntime().maxMemory();
String freeMem = "Free memory (bytes): " + Runtime.getRuntime().freeMemory();
String allocMem = "Allocated memory (bytes): " + Runtime.getRuntime().totalMemory();
String cores = "Available processors (cores): "+ Runtime.getRuntime().availableProcessors();
UIText maxMemText = new UIText(maxMem,1,UIStore.FONTS.get("yugothic"),1000,false);
maxMemText.setPosition(0, 0, .125f, 0);
UIText freeMemText = new UIText(freeMem,1,UIStore.FONTS.get("yugothic"),1000,false);
freeMemText.setPosition(0, 0, .15f, 0);
freeMemText.setKey("freemem");
UIText allocMemText = new UIText(allocMem,1,UIStore.FONTS.get("yugothic"),1000,false);
allocMemText.setPosition(0, 0, .175f, 0);
UIText coresText = new UIText(cores,1,UIStore.FONTS.get("yugothic"),1000,false);
coresText.setPosition(0, 0, .2f, .2f);
UIText position = new UIText("",1,UIStore.FONTS.get("yugothic"),1000,false);
position.setPosition(0, 0, 0, 0);
position.setKey("position");
UIText rotation = new UIText("",1,UIStore.FONTS.get("yugothic"),1000,false);
rotation.setPosition(0, 0, .025f, 0);
rotation.setKey("rotation");
UIText fps = new UIText("",1,UIStore.FONTS.get("yugothic"),1000,false);
fps.setPosition(0, 0, .05f, 0);
fps.setKey("fps");
UIText tps = new UIText("",1,UIStore.FONTS.get("yugothic"),1000,false);
tps.setPosition(0, 0, 0.075f, 0);
tps.setKey("tps");
UIText block = new UIText("Block Selected: minecraft:dirt",1,UIStore.FONTS.get("yugothic"),1000,false);
block.setPosition(0, 0, .25f, 0);
block.setKey("block");
add(maxMemText,freeMemText,allocMemText,coresText,position,rotation,fps,block,tps);
}
}
|