Начинающий
			
			
				
					
				
			
		- Статус
 - Оффлайн
 
- Регистрация
 - 7 Мар 2024
 
- Сообщения
 - 293
 
- Реакции
 - 6
 
Это сообственно обычный рендер всех кнопок в игре
		
		
	
	
		
	
Рендер всех кнопок написан на одном классе который применяется к остальным классам.
Находим класс Widget
И ищем метод renderButton и изменяем
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
				
			Рендер всех кнопок написан на одном классе который применяется к остальным классам.
Находим класс Widget
И ищем метод renderButton и изменяем
			
				Java:
			
		
		
		public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
        Minecraft minecraft = Minecraft.getInstance();
        FontRenderer fontrenderer = minecraft.fontRenderer;
        int j = this.active ? 16777215 : 10526880;
        this.ButtonAnimation.setDuration(300);
        this.scale = this.ButtonAnimation.getOutput();
        int backgroundColor1 = new Color(16, 16, 16, 255).getRGB();
        this.animation = AnimationMath.lerp(this.animation, isHovered() ? 1.0F : 0.0F, 10.0F);
        if (Managment.FUNCTION_MANAGER.widget.state) {
            RenderUtil.Render2D.drawShadow(
                    this.x,
                    this.y,
                    this.width,
                    this.height,
                    6,
                    secondColor,
                    firstColor,
                    firstColor,
                    secondColor
            );
             RenderUtil.Render2D.drawRoundOutline(
                    this.x,
                    this.y,
                    this.width,
                    this.height,
                    2,
                    0,
                    backgroundColor1,
                    new Vector4i(
                            secondColor,
                            firstColor,
                            firstColor,
                            secondColor
                    )
            );
        }
        BloomHelper.registerRenderCall(() -> Fonts.sfbold[20].centerString(matrixStack, getMessage().getString(), (this.x + this.width / 2.0F), (this.y + this.height / 2.0F - Fonts.msRegular[23].getFontHeight() / 2.0F + 2.0F), RenderUtil.reAlphaInt(ColorUtil.interpolateColor(ColorUtil.rgba(215, 215, 215, 255), -1, this.animation), (int) (255.0F * this.animation))));
        drawCenteredString(matrixStack, fontrenderer, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.ceil(this.alpha * 255.0F) << 24);
        this.firstColor = ColorUtil.getColorStyle(0.0F);
        this.secondColor = ColorUtil.getColorStyle(90.0F);
        if (Application.legitMode) { //если анхук включен рендерим обычные кнопки
            minecraft.getTextureManager().bindTexture(WIDGETS_LOCATION);
            RenderSystem.color4f(1.0F, 1.0F, 1.0F, this.alpha);
            int i = this.getYImage(this.isHovered());
            RenderSystem.enableBlend();
            RenderSystem.defaultBlendFunc();
            RenderSystem.enableDepthTest();
            this.blit(matrixStack, this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height);
            this.blit(matrixStack, this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height);
            this.renderBg(matrixStack, minecraft, mouseX, mouseY);
            drawCenteredString(matrixStack, fontrenderer, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, j | MathHelper.ceil(this.alpha * 255.0F) << 24);
        }
    }
	
			
				Последнее редактирование: 
			
		
	
								
								
									
	
								
							
							
				