Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mInternauta

Members
  • Joined

  • Last visited

Everything posted by mInternauta

  1. Sooo i make it! Solved : GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); this.mc.renderEngine.bindTexture(new ResourceLocation("blazemachines", "/textures/gui/display.png")); ScaledResolution sr = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); GL11.glColor3d(190, 190, 190); this.drawTexturedModalRect(x, y, 0, 0, sr.getScaledWidth() - 10, sr.getScaledHeight() - 10); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix();
  2. The code is: @Override public void drawScreen(int x, int y, float f) { //super.drawScreen(x, y, f); int xCenter = this.resolution.Width / 2; // Current Minecraft Width int yCenter = this.resolution.Height / 2; // Current Minecraft Height int midRectHeight = this.resolution.UsableHeight / 2; // This is the Current Minecraft Window Size minus the BorderSize int midRectWidth = this.resolution.UsableWidth / 2; // This is the Current Minecraft Window Size minus the BorderSize int topCenter = yCenter - midRectHeight; // Top X to Center the Rectangle int leftCenter = xCenter - midRectWidth; // Left Y to Center the Rectangle drawsScreen(topCenter, leftCenter); } private void drawsScreen(int x, int y) { // drawDefaultBackground(); this.mc.renderEngine.bindTexture(new ResourceLocation("blazemachines", "/textures/gui/display.png")); double yFinal = y + this.resolution.UsableHeight; // This is the Current Minecraft Window Size minus the BorderSize double xFinal = x + this.resolution.UsableWidth; // This is the Current Minecraft Window Size minus the BorderSize yFinal = yFinal - ScreenResolution.BorderSize; // < BorderSize is 10 xFinal = xFinal - ScreenResolution.BorderSize; // < BorderSize is 10 Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(GL11.GL_QUADS); tessellator.addVertexWithUV(x, yFinal, 0, 0.0, 1.0); tessellator.addVertexWithUV(xFinal, yFinal, 0, 1.0, 1.0); tessellator.addVertexWithUV(xFinal, y, 0, 1.0, 0.0); tessellator.addVertexWithUV(x, y, 0, 0.0, 0.0); tessellator.draw(); }
  3. I have a texture with 2048x2048 it simulates a computer monitor, its is to big because the size change with the monitor resolution.. So.. however when I render it with tessellator doesnt assumes the correct scale: Renderized:
  4. Hey people, How can i draw a sub window like ComputerCraft Screen?
  5. How can i render a sub window or glViewport? public void Draw(int x, int y) { drawsScreen(x,y); } private void drawsScreen(int x, int y) { GL11.glViewport(x, y, 400, 400); GL11.glLoadIdentity(); GL11.glBegin(GL11.GL_QUADS); GL11.glColor3d(196, 196, 196); GL11.glVertex2d(x, y); GL11.glVertex2d(x + 100, y); GL11.glVertex2d(x + 100, y + 100); GL11.glVertex2d(x, y + 100); GL11.glEnd(); }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.