Search in sources :

Example 1 with MeteorGuiTheme

use of meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme in project meteor-client by MeteorDevelopment.

the class WMeteorSlider method renderBar.

private void renderBar(GuiRenderer renderer, double valueWidth) {
    MeteorGuiTheme theme = theme();
    double s = theme.scale(3);
    double handleSize = handleSize();
    double x = this.x + handleSize / 2;
    double y = this.y + height / 2 - s / 2;
    renderer.quad(x, y, valueWidth, s, theme.sliderLeft.get());
    renderer.quad(x + valueWidth, y, width - valueWidth - handleSize, s, theme.sliderRight.get());
}
Also used : MeteorGuiTheme(meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme)

Example 2 with MeteorGuiTheme

use of meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme in project meteor-client by MeteorDevelopment.

the class WMeteorSlider method renderHandle.

private void renderHandle(GuiRenderer renderer, double valueWidth) {
    MeteorGuiTheme theme = theme();
    double s = handleSize();
    renderer.quad(x + valueWidth, y, s, s, GuiRenderer.CIRCLE, theme.sliderHandle.get(dragging, handleMouseOver));
}
Also used : MeteorGuiTheme(meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme)

Example 3 with MeteorGuiTheme

use of meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme in project meteor-client by MeteorDevelopment.

the class WMeteorTextBox method onRender.

@Override
protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
    if (cursorTimer >= 1) {
        cursorVisible = !cursorVisible;
        cursorTimer = 0;
    } else {
        cursorTimer += delta * 1.75;
    }
    renderBackground(renderer, this, false, false);
    MeteorGuiTheme theme = theme();
    double pad = pad();
    double overflowWidth = getOverflowWidthForRender();
    renderer.scissorStart(x + pad, y + pad, width - pad * 2, height - pad * 2);
    // Text content
    if (!text.isEmpty()) {
        renderer.text(text, x + pad - overflowWidth, y + pad, theme.textColor.get(), false);
    }
    // Text highlighting
    if (focused && (cursor != selectionStart || cursor != selectionEnd)) {
        double selStart = x + pad + getTextWidth(selectionStart) - overflowWidth;
        double selEnd = x + pad + getTextWidth(selectionEnd) - overflowWidth;
        renderer.quad(selStart, y + pad, selEnd - selStart, theme.textHeight(), theme.textHighlightColor.get());
    }
    // Cursor
    animProgress += delta * 10 * (focused && cursorVisible ? 1 : -1);
    animProgress = Utils.clamp(animProgress, 0, 1);
    if ((focused && cursorVisible) || animProgress > 0) {
        renderer.setAlpha(animProgress);
        renderer.quad(x + pad + getTextWidth(cursor) - overflowWidth, y + pad, theme.scale(1), theme.textHeight(), theme.textColor.get());
        renderer.setAlpha(1);
    }
    renderer.scissorEnd();
}
Also used : MeteorGuiTheme(meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme)

Example 4 with MeteorGuiTheme

use of meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme in project meteor-client by MeteorDevelopment.

the class WMeteorPlus method onRender.

@Override
protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
    MeteorGuiTheme theme = theme();
    double pad = pad();
    double s = theme.scale(3);
    renderBackground(renderer, this, pressed, mouseOver);
    renderer.quad(x + pad, y + height / 2 - s / 2, width - pad * 2, s, theme.plusColor.get());
    renderer.quad(x + width / 2 - s / 2, y + pad, s, height - pad * 2, theme.plusColor.get());
}
Also used : MeteorGuiTheme(meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme)

Example 5 with MeteorGuiTheme

use of meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme in project meteor-client by MeteorDevelopment.

the class WMeteorVerticalSeparator method onRender.

@Override
protected void onRender(GuiRenderer renderer, double mouseX, double mouseY, double delta) {
    MeteorGuiTheme theme = theme();
    Color colorEdges = theme.separatorEdges.get();
    Color colorCenter = theme.separatorCenter.get();
    double s = theme.scale(1);
    double offsetX = Math.round(width / 2.0);
    renderer.quad(x + offsetX, y, s, height / 2, colorEdges, colorEdges, colorCenter, colorCenter);
    renderer.quad(x + offsetX, y + height / 2, s, height / 2, colorCenter, colorCenter, colorEdges, colorEdges);
}
Also used : MeteorGuiTheme(meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme) Color(meteordevelopment.meteorclient.utils.render.color.Color)

Aggregations

MeteorGuiTheme (meteordevelopment.meteorclient.gui.themes.meteor.MeteorGuiTheme)11 Color (meteordevelopment.meteorclient.utils.render.color.Color)1