Skip to content
This repository was archived by the owner on Aug 3, 2023. It is now read-only.

Commit 048ba38

Browse files
committed
Cleaned up console output
Added "Loading" screen
1 parent f46cbc0 commit 048ba38

32 files changed

+1629
-77
lines changed

BuildPlate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ public static BuildPlate Load(string path)
5959
{
6060
JsonBuildPlate jsonBuildPlate = Util.JsonDeserialize<JsonBuildPlate>(File.ReadAllText(path));
6161
string model = Util.Base64Decode(jsonBuildPlate.model);
62-
Console.WriteLine(model);
63-
File.WriteAllText("E:\\plate.plate", model);
62+
6463
return Util.JsonDeserialize<BuildPlate>(model);
6564
}
6665

6766
public static void Save(BuildPlate bp, string path, string originalPath)
6867
{
6968
JsonBuildPlate jsonBuildPlate = Util.JsonDeserialize<JsonBuildPlate>(File.ReadAllText(originalPath));
7069
jsonBuildPlate.model = Util.Base64Encode(Util.JsonSerialize(bp));
70+
7171
File.WriteAllText(path, Util.JsonSerialize(jsonBuildPlate));
7272
}
7373
}

BuildPlate_Editor.csproj

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<Compile Include="BuildPlateOffset.cs" />
8585
<Compile Include="Camera.cs" />
8686
<Compile Include="EXITCODE.cs" />
87+
<Compile Include="Font.cs" />
8788
<Compile Include="GLGetVersion.cs" />
8889
<Compile Include="JsonBuildPlate.cs" />
8990
<Compile Include="Maths\Vector2i.cs" />
@@ -96,14 +97,32 @@
9697
<Compile Include="SubChunk.cs" />
9798
<Compile Include="TargaImage.cs" />
9899
<Compile Include="Texture.cs" />
100+
<Compile Include="UI\GUI.cs" />
101+
<Compile Include="UI\GUIElement.cs" />
102+
<Compile Include="UI\IGUIElement.cs" />
103+
<Compile Include="UI\IRenderObject.cs" />
104+
<Compile Include="UI\UIButton.cs" />
105+
<Compile Include="UI\UICheckBox.cs" />
106+
<Compile Include="UI\UIImage.cs" />
107+
<Compile Include="UI\UISliceButton.cs" />
108+
<Compile Include="UI\UISliceImage.cs" />
109+
<Compile Include="UI\UISlider.cs" />
110+
<Compile Include="UI\UItext.cs" />
99111
<Compile Include="Util.cs" />
100112
<Compile Include="Vertex.cs" />
113+
<Compile Include="Vertex2D.cs" />
101114
<Compile Include="VoxelData.cs" />
102115
<Compile Include="Window.cs" />
103116
<Compile Include="World.cs" />
104117
</ItemGroup>
105118
<ItemGroup>
106119
<None Include="App.config" />
120+
<None Include="Data\Fonts\Minecraft.ifd">
121+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
122+
</None>
123+
<None Include="Data\Fonts\Minecraft.ifh">
124+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
125+
</None>
107126
<None Include="Data\Shaders\skybox.frag">
108127
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
109128
</None>
@@ -157,6 +176,25 @@
157176
<Content Include="Data\Textures\Skybox_Cold_Sunset\Cold_Sunset-Z.png">
158177
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
159178
</Content>
179+
<Content Include="Data\Textures\UI\Button.png">
180+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
181+
</Content>
182+
<Content Include="Data\Textures\UI\Button_Selected.png">
183+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
184+
</Content>
185+
<Content Include="Data\Textures\UI\Crosshair.png">
186+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
187+
</Content>
188+
<Content Include="Data\Textures\UI\InputField.png">
189+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
190+
</Content>
191+
<Content Include="Data\Textures\UI\options_background.png">
192+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
193+
</Content>
194+
<Content Include="Data\Textures\UI\TextBox.png">
195+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
196+
</Content>
160197
</ItemGroup>
198+
<ItemGroup />
161199
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
162200
</Project>

Data/Fonts/Minecraft.ifd

7.12 KB
Binary file not shown.

Data/Fonts/Minecraft.ifh

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
info,name=Minecraft
2+
data_name,data=Minecraft.ifd
3+
char_info,char= ,x=0,y=0,width=21,height=5
4+
char_info,char=!,x=21,y=0,width=7,height=25
5+
char_info,char=",x=28,y=0,width=19,height=13
6+
char_info,char=#,x=47,y=0,width=23,height=25
7+
char_info,char=$,x=70,y=0,width=19,height=29
8+
char_info,char=%,x=89,y=0,width=27,height=25
9+
char_info,char=&,x=116,y=0,width=23,height=25
10+
char_info,char=',x=139,y=0,width=7,height=9
11+
char_info,char=(,x=146,y=0,width=15,height=25
12+
char_info,char=),x=161,y=0,width=15,height=25
13+
char_info,char=*,x=0,y=29,width=15,height=13
14+
char_info,char=+,x=15,y=29,width=19,height=17
15+
char_info,char=,,x=34,y=29,width=7,height=9
16+
char_info,char=-,x=41,y=29,width=13,height=5
17+
char_info,char=.,x=54,y=29,width=7,height=5
18+
char_info,char=/,x=61,y=29,width=19,height=25
19+
char_info,char=0,x=80,y=29,width=19,height=25
20+
char_info,char=1,x=99,y=29,width=15,height=25
21+
char_info,char=2,x=114,y=29,width=19,height=25
22+
char_info,char=3,x=133,y=29,width=19,height=25
23+
char_info,char=4,x=152,y=29,width=21,height=25
24+
char_info,char=5,x=0,y=54,width=23,height=25
25+
char_info,char=6,x=23,y=54,width=21,height=25
26+
char_info,char=7,x=44,y=54,width=19,height=25
27+
char_info,char=8,x=63,y=54,width=19,height=25
28+
char_info,char=9,x=82,y=54,width=19,height=25
29+
char_info,char=:,x=101,y=54,width=7,height=19
30+
char_info,char=;,x=108,y=54,width=7,height=23
31+
char_info,char=<,x=115,y=54,width=15,height=17
32+
char_info,char==,x=130,y=54,width=19,height=13
33+
char_info,char=>,x=149,y=54,width=15,height=17
34+
char_info,char=?,x=164,y=54,width=19,height=25
35+
char_info,char=@,x=0,y=79,width=31,height=31
36+
char_info,char=A,x=31,y=79,width=21,height=25
37+
char_info,char=B,x=52,y=79,width=23,height=25
38+
char_info,char=C,x=75,y=79,width=25,height=25
39+
char_info,char=D,x=100,y=79,width=23,height=25
40+
char_info,char=E,x=123,y=79,width=23,height=25
41+
char_info,char=F,x=146,y=79,width=21,height=25
42+
char_info,char=G,x=167,y=79,width=25,height=25
43+
char_info,char=H,x=192,y=79,width=23,height=25
44+
char_info,char=I,x=215,y=79,width=11,height=25
45+
char_info,char=J,x=226,y=79,width=17,height=25
46+
char_info,char=K,x=0,y=110,width=21,height=25
47+
char_info,char=L,x=21,y=110,width=21,height=25
48+
char_info,char=M,x=42,y=110,width=23,height=25
49+
char_info,char=N,x=65,y=110,width=23,height=25
50+
char_info,char=O,x=88,y=110,width=27,height=25
51+
char_info,char=P,x=115,y=110,width=23,height=25
52+
char_info,char=Q,x=138,y=110,width=27,height=25
53+
char_info,char=R,x=165,y=110,width=27,height=25
54+
char_info,char=S,x=192,y=110,width=21,height=25
55+
char_info,char=T,x=213,y=110,width=23,height=25
56+
char_info,char=U,x=236,y=110,width=21,height=25
57+
char_info,char=V,x=0,y=135,width=23,height=25
58+
char_info,char=W,x=23,y=135,width=23,height=25
59+
char_info,char=X,x=46,y=135,width=23,height=25
60+
char_info,char=Y,x=69,y=135,width=23,height=25
61+
char_info,char=Z,x=92,y=135,width=23,height=25
62+
char_info,char=[,x=115,y=135,width=11,height=31
63+
char_info,char=\,x=126,y=135,width=19,height=25
64+
char_info,char=],x=145,y=135,width=11,height=31
65+
char_info,char=^,x=156,y=135,width=19,height=13
66+
char_info,char=_,x=175,y=135,width=21,height=3
67+
char_info,char=`,x=196,y=135,width=9,height=7
68+
char_info,char=a,x=0,y=166,width=21,height=19
69+
char_info,char=b,x=21,y=166,width=23,height=25
70+
char_info,char=c,x=44,y=166,width=21,height=19
71+
char_info,char=d,x=65,y=166,width=19,height=25
72+
char_info,char=e,x=84,y=166,width=19,height=19
73+
char_info,char=f,x=103,y=166,width=19,height=25
74+
char_info,char=g,x=122,y=166,width=19,height=27
75+
char_info,char=h,x=141,y=166,width=19,height=25
76+
char_info,char=i,x=160,y=166,width=7,height=25
77+
char_info,char=j,x=167,y=166,width=17,height=25
78+
char_info,char=k,x=184,y=166,width=19,height=25
79+
char_info,char=l,x=0,y=193,width=7,height=25
80+
char_info,char=m,x=7,y=193,width=31,height=19
81+
char_info,char=n,x=38,y=193,width=21,height=19
82+
char_info,char=o,x=59,y=193,width=19,height=19
83+
char_info,char=p,x=78,y=193,width=21,height=25
84+
char_info,char=q,x=99,y=193,width=19,height=25
85+
char_info,char=r,x=118,y=193,width=17,height=19
86+
char_info,char=s,x=135,y=193,width=17,height=21
87+
char_info,char=t,x=152,y=193,width=13,height=23
88+
char_info,char=u,x=165,y=193,width=19,height=19
89+
char_info,char=v,x=184,y=193,width=23,height=15
90+
char_info,char=w,x=0,y=218,width=25,height=17
91+
char_info,char=x,x=25,y=218,width=23,height=21
92+
char_info,char=y,x=48,y=218,width=19,height=23
93+
char_info,char=z,x=67,y=218,width=19,height=21
94+
char_info,char={,x=86,y=218,width=13,height=33
95+
char_info,char=|,x=99,y=218,width=7,height=33
96+
char_info,char=},x=106,y=218,width=13,height=33
97+
char_info,char=~,x=119,y=218,width=23,height=5

Data/Shaders/ui.frag

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
out vec4 FragColor;
44

5-
void main() {
6-
FragColor = vec4(0.0, 0.0, 0.0, 0.0);
5+
layout (location = 0) in vec2 fUv;
6+
7+
layout (binding = 0) uniform sampler2D uTexture;
8+
9+
void main()
10+
{
11+
FragColor = texture(uTexture, fUv);
712
}

Data/Shaders/ui.vert

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#version 450 core
2-
32
layout (location = 0) in vec3 aPosition;
3+
layout (location = 1) in vec2 aUv;
4+
5+
layout (location = 0) out vec2 fUv;
6+
7+
uniform mat4 uTransform;
48

59
void main()
610
{
7-
gl_Position = vec4(aPosition, 1.0);
11+
fUv = aUv;
12+
gl_Position = uTransform * vec4(aPosition, 1.0);
813
}

Data/Textures/UI/Button.png

542 Bytes
Loading
3.24 KB
Loading

Data/Textures/UI/Crosshair.png

153 Bytes
Loading

Data/Textures/UI/InputField.png

389 Bytes
Loading

0 commit comments

Comments
 (0)