Everything is done almost
This commit is contained in:
parent
1473044456
commit
d15ceecfca
|
|
@ -235,35 +235,35 @@ public class GuiServer extends WDScreen {
|
||||||
public boolean handleKeyboardInput(int keyCode, boolean keyState, Supplier<Boolean> booleanSupplier) throws IOException {
|
public boolean handleKeyboardInput(int keyCode, boolean keyState, Supplier<Boolean> booleanSupplier) throws IOException {
|
||||||
if(uploadWizard) {
|
if(uploadWizard) {
|
||||||
if(keyState) {
|
if(keyState) {
|
||||||
if(keyCode == Keyboard.KEY_UP) {
|
if(keyCode == GLFW.GLFW_KEY_UP) {
|
||||||
if(selectedLine > 3)
|
if(selectedLine > 3)
|
||||||
selectedLine--;
|
selectedLine--;
|
||||||
else if(uploadOffset > 0) {
|
else if(uploadOffset > 0) {
|
||||||
uploadOffset--;
|
uploadOffset--;
|
||||||
updateUploadScreen();
|
updateUploadScreen();
|
||||||
}
|
}
|
||||||
} else if(keyCode == Keyboard.KEY_DOWN) {
|
} else if(keyCode == GLFW.GLFW_KEY_DOWN) {
|
||||||
if(selectedLine < MAX_LINES - 1)
|
if(selectedLine < MAX_LINES - 1)
|
||||||
selectedLine++;
|
selectedLine++;
|
||||||
else if(uploadOffset + selectedLine - 2 < uploadFiles.size()) {
|
else if(uploadOffset + selectedLine - 2 < uploadFiles.size()) {
|
||||||
uploadOffset++;
|
uploadOffset++;
|
||||||
updateUploadScreen();
|
updateUploadScreen();
|
||||||
}
|
}
|
||||||
} else if(keyCode == Keyboard.KEY_PRIOR) {
|
} else if(keyCode == GLFW.GLFW_KEY_PAGE_DOWN) {
|
||||||
selectedLine = 3;
|
selectedLine = 3;
|
||||||
int dst = uploadOffset - (MAX_LINES - 3);
|
int dst = uploadOffset - (MAX_LINES - 3);
|
||||||
if(dst < 0)
|
if(dst < 0)
|
||||||
dst = 0;
|
dst = 0;
|
||||||
|
|
||||||
selectFile(dst);
|
selectFile(dst);
|
||||||
} else if(keyCode == Keyboard.KEY_NEXT) {
|
} else if(keyCode == GLFW.GLFW_KEY_PAGE_UP) {
|
||||||
selectedLine = 3;
|
selectedLine = 3;
|
||||||
int dst = uploadOffset + (MAX_LINES - 3);
|
int dst = uploadOffset + (MAX_LINES - 3);
|
||||||
if(dst >= uploadFiles.size())
|
if(dst >= uploadFiles.size())
|
||||||
dst = uploadFiles.size() - 1;
|
dst = uploadFiles.size() - 1;
|
||||||
|
|
||||||
selectFile(dst);
|
selectFile(dst);
|
||||||
} else if(keyCode == Keyboard.KEY_RETURN || keyCode == Keyboard.KEY_NUMPADENTER) {
|
} else if(keyCode == GLFW.GLFW_KEY_ENTER || keyCode == GLFW.GLFW_KEY_KP_ENTER) {
|
||||||
File file = uploadFiles.get(uploadOffset + selectedLine - 3);
|
File file = uploadFiles.get(uploadOffset + selectedLine - 3);
|
||||||
|
|
||||||
if(file.isDirectory()) {
|
if(file.isDirectory()) {
|
||||||
|
|
@ -271,13 +271,13 @@ public class GuiServer extends WDScreen {
|
||||||
updateUploadScreen();
|
updateUploadScreen();
|
||||||
} else
|
} else
|
||||||
startFileUpload(file, true);
|
startFileUpload(file, true);
|
||||||
} else if(keyCode == Keyboard.KEY_F5) {
|
} else if(keyCode == GLFW.GLFW_KEY_F5) {
|
||||||
uploadCD(uploadDir);
|
uploadCD(uploadDir);
|
||||||
updateUploadScreen();
|
updateUploadScreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(keyCode == Keyboard.KEY_ESCAPE) {
|
if(keyCode == GLFW.GLFW_KEY_ESCAPE) {
|
||||||
quitUploadWizard();
|
quitUploadWizard();
|
||||||
return true; //Don't let the screen handle this
|
return true; //Don't let the screen handle this
|
||||||
}
|
}
|
||||||
|
|
@ -291,12 +291,12 @@ public class GuiServer extends WDScreen {
|
||||||
|
|
||||||
if(keyCode == GLFW.GLFW_KEY_L && ctrl)
|
if(keyCode == GLFW.GLFW_KEY_L && ctrl)
|
||||||
lines.clear();
|
lines.clear();
|
||||||
else if(keyCode == Keyboard.KEY_V && ctrl) {
|
else if(keyCode == GLFW.GLFW_KEY_V && ctrl) {
|
||||||
prompt += minecraft.keyboardHandler.getClipboard();
|
prompt += minecraft.keyboardHandler.getClipboard();
|
||||||
|
|
||||||
if(prompt.length() > MAX_LINE_LEN)
|
if(prompt.length() > MAX_LINE_LEN)
|
||||||
prompt = prompt.substring(0, MAX_LINE_LEN);
|
prompt = prompt.substring(0, MAX_LINE_LEN);
|
||||||
} else if(keyCode == Keyboard.KEY_UP) {
|
} else if(keyCode == GLFW.GLFW_KEY_UP) {
|
||||||
if(lastCmd != null) {
|
if(lastCmd != null) {
|
||||||
String tmp = prompt;
|
String tmp = prompt;
|
||||||
prompt = lastCmd;
|
prompt = lastCmd;
|
||||||
|
|
@ -337,10 +337,10 @@ public class GuiServer extends WDScreen {
|
||||||
} else if(promptLocked)
|
} else if(promptLocked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(keyCode == Keyboard.KEY_BACK) {
|
if(keyCode == GLFW.GLFW_KEY_BACKSPACE) {
|
||||||
if(prompt.length() > 0)
|
if(prompt.length() > 0)
|
||||||
prompt = prompt.substring(0, prompt.length() - 1);
|
prompt = prompt.substring(0, prompt.length() - 1);
|
||||||
} else if(keyCode == Keyboard.KEY_RETURN || keyCode == Keyboard.KEY_NUMPADENTER) {
|
} else if(keyCode == GLFW.GLFW_KEY_ENTER || keyCode == GLFW.GLFW_KEY_KP_ENTER) {
|
||||||
if(prompt.length() > 0) {
|
if(prompt.length() > 0) {
|
||||||
writeLine(userPrompt + prompt);
|
writeLine(userPrompt + prompt);
|
||||||
evaluateCommand(prompt);
|
evaluateCommand(prompt);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public final class MinePadRenderer implements IItemRenderer {
|
||||||
private static final float PI = (float) Math.PI;
|
private static final float PI = (float) Math.PI;
|
||||||
private final Minecraft mc = Minecraft.getInstance();
|
private final Minecraft mc = Minecraft.getInstance();
|
||||||
private final ResourceLocation tex = new ResourceLocation("webdisplays", "textures/models/minepad.png");
|
private final ResourceLocation tex = new ResourceLocation("webdisplays", "textures/models/minepad.png");
|
||||||
private final ModelMinePad model = new ModelMinePad();
|
// private final ModelMinePad model = new ModelMinePad();
|
||||||
private final ClientProxy clientProxy = (ClientProxy) WebDisplays.PROXY;
|
private final ClientProxy clientProxy = (ClientProxy) WebDisplays.PROXY;
|
||||||
|
|
||||||
private float sinSqrtSwingProg1;
|
private float sinSqrtSwingProg1;
|
||||||
|
|
@ -87,7 +87,7 @@ public final class MinePadRenderer implements IItemRenderer {
|
||||||
glRotatef(-90.0f, 1.0f, 0.0f, 0.0f);
|
glRotatef(-90.0f, 1.0f, 0.0f, 0.0f);
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
RenderSystem.setShaderTexture(0, tex);
|
RenderSystem.setShaderTexture(0, tex);
|
||||||
model.render(1.f / 16.f);
|
// model.render(1.f / 16.f);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
//Render web view
|
//Render web view
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
package net.montoyo.wd.client.renderers;
|
package net.montoyo.wd.client.renderers;
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
/*import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
import net.minecraft.client.model.Model;
|
import net.minecraft.client.model.Model;
|
||||||
import net.minecraft.client.model.geom.ModelPart;
|
import net.minecraft.client.model.geom.ModelPart;
|
||||||
|
|
@ -60,4 +60,4 @@ public final class ModelMinePad extends Model {
|
||||||
public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
|
public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,56 @@
|
||||||
{
|
{
|
||||||
"parent": "item/generated",
|
"credit": "Made with Blockbench",
|
||||||
"textures": {
|
"texture_size": [64, 32],
|
||||||
"layer0": "webdisplays:items/minepad"
|
"textures": {
|
||||||
}
|
"0": "webdisplays:models/minepad"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [1, 0, 0],
|
||||||
|
"to": [15, 1, 9],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [1, 0, 3.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [2.25, 4.5, 5.75, 5], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 4.5, 2.25, 5], "texture": "#0"},
|
||||||
|
"south": {"uv": [8, 4.5, 11.5, 5], "texture": "#0"},
|
||||||
|
"west": {"uv": [5.75, 4.5, 8, 5], "texture": "#0"},
|
||||||
|
"up": {"uv": [5.75, 4.5, 2.25, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [9.25, 0, 5.75, 4.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 0, 1],
|
||||||
|
"to": [1, 1, 8],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [1.75, 8.5, 2, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 8.5, 1.75, 9], "texture": "#0"},
|
||||||
|
"south": {"uv": [3.75, 8.5, 4, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 8.5, 3.75, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [2, 8.5, 1.75, 5], "texture": "#0"},
|
||||||
|
"down": {"uv": [2.25, 5, 2, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 0, 1],
|
||||||
|
"to": [16, 1, 8],
|
||||||
|
"rotation": {"angle": 0, "axis": "y", "origin": [15, 0, 4.5]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [9.25, 8.5, 9.5, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [7.5, 8.5, 9.25, 9], "texture": "#0"},
|
||||||
|
"south": {"uv": [11.25, 8.5, 11.5, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [9.5, 8.5, 11.25, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [9.5, 8.5, 9.25, 5], "texture": "#0"},
|
||||||
|
"down": {"uv": [9.75, 5, 9.5, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "bone",
|
||||||
|
"origin": [0, 0, 0],
|
||||||
|
"color": 0,
|
||||||
|
"children": [0, 1, 2]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user