Examples of ScaledResolution


Examples of net.minecraft.client.gui.ScaledResolution

 
  public void renderPlayerDisplay(long renderTicks) {
    if(!displayRenderer()) return;
    Minecraft mc = FMLClientHandler.instance().getClient();
    if(displayCross) {
      ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
          int width = res.getScaledWidth();
          int height = res.getScaledHeight();
          if (GuiIngameForge.renderCrosshairs && mc.ingameGUI != null) {
            mc.renderEngine.bindTexture(TEXTURE);
            GL11.glColor4d(0.0D, 0.0D, 0.0D, 1.0D);
            GL11.glDisable(GL11.GL_BLEND);
            mc.ingameGUI.drawTexturedModalRect(width / 2 - 7, height / 2 - 7, 0, 0, 16, 16);
View Full Code Here

Examples of net.minecraft.client.gui.ScaledResolution

    int ppi = 0;
    int panelxSize = 20;
    int panelySize = 20;
    int x = 2;
    int y = 2;
    ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
        int scaleX = scaledresolution.getScaledWidth();
        int scaleY = scaledresolution.getScaledHeight();
        int mouseX = Mouse.getX() * scaleX / this.mc.displayWidth - left;
    int mouseY = scaleY - Mouse.getY() * scaleY / this.mc.displayHeight - top;

    GL11.glTranslatef(left, top, 0.0F);
   
View Full Code Here

Examples of net.minecraft.client.gui.ScaledResolution

    private static void renderHUDOverlayItem(Minecraft minecraft, EntityPlayer entityPlayer, ItemStack itemStack)
    {
        float overlayScale = 2f;
        float overlayOpacity = 1f;
        GL11.glPushMatrix();
        ScaledResolution sr = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
        GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
        GL11.glMatrixMode(GL11.GL_PROJECTION);
        GL11.glLoadIdentity();
        GL11.glOrtho(0.0D, sr.getScaledWidth_double(), sr.getScaledHeight_double(), 0.0D, 1000.0D, 3000.0D);
        GL11.glMatrixMode(GL11.GL_MODELVIEW);
        GL11.glLoadIdentity();
        GL11.glTranslatef(0.0F, 0.0F, -2000.0F);
        GL11.glPushMatrix();
        RenderHelper.enableGUIStandardItemLighting();
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glEnable(GL12.GL_RESCALE_NORMAL);
        GL11.glEnable(GL11.GL_COLOR_MATERIAL);
        GL11.glEnable(GL11.GL_LIGHTING);
        int hudOverlayX = 0;
        int hudOverlayY = 0;

        hudOverlayX = (int) (sr.getScaledWidth() - 16 * overlayScale);
        hudOverlayY = (int) (sr.getScaledHeight() - 16 * overlayScale);

        RenderUtils.renderItemIntoGUI(minecraft.fontRenderer, itemStack, hudOverlayX, hudOverlayY, overlayOpacity, overlayScale, -90);

        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glPopMatrix();
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

    Minecraft.getMinecraft().gameSettings.guiScale = guiScale;
    Configuration.setGuiScale(guiScale);
    Configuration.write();

    // Redisplay the video screen.
    ScaledResolution var3 = new ScaledResolution(Minecraft.getMinecraft().gameSettings, Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
    int width = var3.getScaledWidth();
    int height = var3.getScaledHeight();
    SpoutClient.getHandle().currentScreen.setWorldAndResolution(Minecraft.getMinecraft(), width, height);
  }
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

  public void downloadTexture(String plugin, String url) {
    CustomTextureManager.downloadTexture(plugin, url);
  }

  public int getScreenHeight() {
    ScaledResolution resolution = new ScaledResolution(SpoutClient.getHandle().gameSettings, SpoutClient.getHandle().displayWidth, SpoutClient.getHandle().displayHeight);
    return resolution.getScaledHeight();
  }
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

    ScaledResolution resolution = new ScaledResolution(SpoutClient.getHandle().gameSettings, SpoutClient.getHandle().displayWidth, SpoutClient.getHandle().displayHeight);
    return resolution.getScaledHeight();
  }

  public int getScreenWidth() {
    ScaledResolution resolution = new ScaledResolution(SpoutClient.getHandle().gameSettings, SpoutClient.getHandle().displayWidth, SpoutClient.getHandle().displayHeight);
    return resolution.getScaledWidth();
  }
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

  private void scissorWidget(Widget widget) {
    double x = widget.getActualX() + widget.getWidth(), y = widget.getActualY() + widget.getHeight(), width = widget.getWidth(), height = widget.getHeight();
    double screenHeight;
    screenHeight = getScreenHeight();
    int windowWidth = SpoutClient.getHandle().displayWidth, windowHeight = SpoutClient.getHandle().displayHeight;
    ScaledResolution scale = new ScaledResolution(SpoutClient.getHandle().gameSettings, windowWidth, windowHeight);
    double scaleFactor = scale.getScaleFactor();
    height = height * scaleFactor;
    width = width * scaleFactor;
    x *= scaleFactor;
    y *= scaleFactor;
    screenHeight *= scaleFactor;
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

    GL11.glLoadIdentity();
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
    GL11.glLoadIdentity();
    achievementWindowWidth = theGame.displayWidth;
    achievementWindowHeight = theGame.displayHeight;
    ScaledResolution scaledresolution = new ScaledResolution(theGame.gameSettings,
        theGame.displayWidth, theGame.displayHeight);
    achievementWindowWidth = scaledresolution.getScaledWidth();
    achievementWindowHeight = scaledresolution.getScaledHeight();
    GL11.glClear(256);
    GL11.glMatrixMode(GL11.GL_PROJECTION);
    GL11.glLoadIdentity();
    GL11.glOrtho(0.0D, achievementWindowWidth, achievementWindowHeight, 0.0D, 1000D, 3000D);
    GL11.glMatrixMode(GL11.GL_MODELVIEW);
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

    /**
     * Displays a new screen.
     */
    private void loadScreen() throws LWJGLException
    {
        ScaledResolution scaledresolution = new ScaledResolution(gameSettings, displayWidth, displayHeight);
        GL11.glClear(16640);
        GL11.glMatrixMode(GL11.GL_PROJECTION);
        GL11.glLoadIdentity();
        GL11.glOrtho(0.0D, scaledresolution.scaledWidthD, scaledresolution.scaledHeightD, 0.0D, 1000D, 3000D);
        GL11.glMatrixMode(GL11.GL_MODELVIEW);
        GL11.glLoadIdentity();
        GL11.glTranslatef(0.0F, 0.0F, -2000F);
        GL11.glViewport(0, 0, displayWidth, displayHeight);
        GL11.glClearColor(0.0F, 0.0F, 0.0F, 0.0F);
        Tessellator tessellator = Tessellator.instance;
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL11.GL_FOG);
        GL11.glBindTexture(GL11.GL_TEXTURE_2D, renderEngine.getTexture("/title/mojang.png"));
        tessellator.startDrawingQuads();
        tessellator.setColorOpaque_I(0xffffff);
        tessellator.addVertexWithUV(0.0D, displayHeight, 0.0D, 0.0D, 0.0D);
        tessellator.addVertexWithUV(displayWidth, displayHeight, 0.0D, 0.0D, 0.0D);
        tessellator.addVertexWithUV(displayWidth, 0.0D, 0.0D, 0.0D, 0.0D);
        tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
        tessellator.draw();
        char c = 256;
        char c1 = 256;
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        tessellator.setColorOpaque_I(0xffffff);
        scaledTessellator((scaledresolution.getScaledWidth() - c) / 2, (scaledresolution.getScaledHeight() - c1) / 2, 0, 0, c, c1);
        GL11.glDisable(GL11.GL_LIGHTING);
        GL11.glDisable(GL11.GL_FOG);
        GL11.glEnable(GL11.GL_ALPHA_TEST);
        GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
        Display.swapBuffers();
View Full Code Here

Examples of net.minecraft.src.ScaledResolution

        currentScreen = par1GuiScreen;

        if (par1GuiScreen != null)
        {
            setIngameNotInFocus();
            ScaledResolution scaledresolution = new ScaledResolution(gameSettings, displayWidth, displayHeight);
            int i = scaledresolution.getScaledWidth();
            int j = scaledresolution.getScaledHeight();
            par1GuiScreen.setWorldAndResolution(this, i, j);
            skipRenderWorld = false;
        }
        else
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.