private void onKeyBindsRender(MatrixStack stack) {
float posX = keyBinds.getX();
float posY = keyBinds.getY();
int roundDegree = 5;
int headerHeight = 14;
int width = 65;
int padding = 5;
int offset = 10;
int headerColor = new Color(22, 22, 22, 255).getRGB();
int backgroundColor = new Color(33, 33, 33, 255).getRGB();
int oneColor;
int twoColor;
int threeColor;
int fourColor;
oneColor = ColorUtil.getColorStyle(0);
twoColor = ColorUtil.getColorStyle(90);
threeColor = ColorUtil.getColorStyle(180);
fourColor = ColorUtil.getColorStyle(270);
float height = activeModules * offset; //41, 41, 41
this.heightDynamic = AnimationMath.fast(this.heightDynamic, height, 10);
GaussianBlur.startBlur();
RenderUtil.Render2D.drawRoundedCorner(keyBinds.getX(), posY, width, headerHeight + 4, new Vector4f(roundDegree, 0, roundDegree, 0), headerColor);
GaussianBlur.endBlur(7, 1);
RenderUtil.Render2D.drawRoundedCorner(keyBinds.getX(), posY, width, headerHeight + 4, new Vector4f(roundDegree, 0, roundDegree, 0), rgba(30, 30, 30, 200));
RenderUtil.Render2D.drawRoundedCorner(posX, posY + headerHeight + 2, width, heightDynamic + padding / 2f + 2, new Vector4f(0, roundDegree, 0, roundDegree), rgba(29, 32, 47, 255));
BloomHelper.registerRenderCall(() -> {
Fonts.gilroyBold[16].drawString(stack, ClientUtil.gradient("Хот-кей", oneColor, twoColor), keyBinds.getX() + 16, posY + 6f, -1);
});
Fonts.gilroyBold[16].drawString(stack, ClientUtil.gradient("Хот-кей", oneColor, twoColor), keyBinds.getX() + 16, posY + 6f, -1);
SmartScissor.push();
SmartScissor.setFromComponentCoordinates(posX, posY - 3, width, headerHeight + heightDynamic + padding / 2f + 12);
int index = 0;
for (Function f : Managment.FUNCTION_MANAGER.getFunctions()) {
if (f.bind != 0 && f.state) {
String text = ClientUtil.getKey(f.bind);
if (text == null) {
continue;
}
String bindText = text.toUpperCase();
float bindWidth = Fonts.msRegular[12].getWidth(bindText);
Fonts.msRegular[12].drawString(stack, f.name, posX + padding - 1, posY + headerHeight + padding + (index * offset) + 3.5, -1);
Fonts.msRegular[12].drawString(stack, "[вкл]", posX + width - bindWidth - padding - 9, posY + headerHeight + padding + (index * offset) + 3.5, -1);
index++;
}
}
SmartScissor.unset();
SmartScissor.pop();
activeModules = index;
keyBinds.setWidth(width);
keyBinds.setHeight(activeModules * offset + headerHeight);
}