Merge branch 'v0.4.0' into v0.4.0-1.21.3
This commit is contained in:
commit
8abcd7341e
40 changed files with 233 additions and 183 deletions
|
@ -1,5 +1,6 @@
|
|||
package me.kawaiizenbo.moonlight.ui.hud.editor;
|
||||
|
||||
import me.kawaiizenbo.moonlight.Moonlight;
|
||||
import me.kawaiizenbo.moonlight.ui.hud.HUDModule;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
|
@ -23,8 +24,8 @@ public class HUDModuleButton
|
|||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
drawContext.fill(x, y, x + width, y + height, hovered(mouseX, mouseY) ? 0xFF333333 : 0xFF222222);
|
||||
drawContext.drawText(textRenderer, module.name, x+2, y+2, module.enabled ? 0x55FFFF : 0xFFFFFF, false);
|
||||
drawContext.fill(x, y, x + width, y + height, hovered(mouseX, mouseY) ? Moonlight.THEME.hover.getRGB() : Moonlight.THEME.background.getRGB());
|
||||
drawContext.drawText(textRenderer, module.name, x+2, y+2, module.enabled ? Moonlight.THEME.accent.getRGB() : Moonlight.THEME.text.getRGB(), false);
|
||||
if (!module.settings.isEmpty()) drawContext.drawGuiTexture(RenderLayer::getGuiTextured, Identifier.of("moonlight", "settings"), x+width-12, y, 12, 12);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,10 @@ package me.kawaiizenbo.moonlight.ui.hud.editor;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import me.kawaiizenbo.moonlight.Moonlight;
|
||||
import me.kawaiizenbo.moonlight.ui.hud.HUDModule;
|
||||
import me.kawaiizenbo.moonlight.ui.hud.HUDModuleManager;
|
||||
import me.kawaiizenbo.moonlight.util.DrawUtils;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
|
@ -38,10 +40,10 @@ public class HUDModuleList
|
|||
x = mouseX - startX;
|
||||
y = mouseY - startY;
|
||||
}
|
||||
drawContext.fill(x, y, x+width, collapsed ? y+16 : y+height, 0xFF55FFFF);
|
||||
drawContext.fill(x+2, y+2, x+(width-2), y+14, hovered(mouseX, mouseY) ? 0xFF333333 : 0xFF222222);
|
||||
drawContext.drawGuiTexture(RenderLayer::getGuiTextured, Identifier.of("moonlight", "hud"), x+2, y+2, 12, 12);
|
||||
drawContext.drawText(textRenderer, "HUD Modules", x+16, y+4, 0xFFFFFFFF, false);
|
||||
drawContext.fill(x, y, x+width, collapsed ? y+16 : y+height, Moonlight.THEME.themedWindowBorders ? Moonlight.THEME.border.getRGB() : Moonlight.THEME.accent.getRGB());
|
||||
//drawContext.fill(x+2, y+2, x+(width-2), y+14, hovered(mouseX, mouseY) ? Moonlight.THEME.hover.getRGB() : Moonlight.THEME.background.getRGB());
|
||||
drawContext.drawGuiTexture(RenderLayer::getGuiTextured, DrawUtils.getThemedGUIIcon("hud"), x+2, y+2, 12, 12);
|
||||
drawContext.drawText(textRenderer, "HUD Modules", x+16, y+4, Moonlight.THEME.headerText.getRGB(), false);
|
||||
if (!collapsed)
|
||||
{
|
||||
int buttonYOffset = y+16;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package me.kawaiizenbo.moonlight.ui.hud.editor;
|
||||
|
||||
import me.kawaiizenbo.moonlight.Moonlight;
|
||||
import me.kawaiizenbo.moonlight.module.settings.Setting;
|
||||
import me.kawaiizenbo.moonlight.ui.SetScreenButton;
|
||||
import me.kawaiizenbo.moonlight.ui.hud.HUDModule;
|
||||
|
@ -20,7 +21,7 @@ public class HUDModuleSettingsScreen extends Screen
|
|||
public HUDModuleSettingsScreen(HUDModule module)
|
||||
{
|
||||
super(Text.literal("Settings"));
|
||||
backButton = new SetScreenButton(ColorUtils.underline + "< Back", x+4, y+4, 0xFFFFFF, HUDEditorScreen.INSTANCE);
|
||||
backButton = new SetScreenButton(ColorUtils.underline + "< Back", x+4, y+4, HUDEditorScreen.INSTANCE);
|
||||
this.module = module;
|
||||
}
|
||||
|
||||
|
@ -35,10 +36,11 @@ public class HUDModuleSettingsScreen extends Screen
|
|||
x = mouseX - startX;
|
||||
y = mouseY - startY;
|
||||
}
|
||||
drawContext.fill(x, y, x+windowWidth, y+windowHeight, 0xFF222222);
|
||||
drawContext.fill(x, y, x+windowWidth, y+16, 0xFF55FFFF);
|
||||
drawContext.fill(x+2, y+2, x+(windowWidth-2), y+14, 0xFF222222);
|
||||
drawContext.drawCenteredTextWithShadow(textRenderer, module.name, x+(windowWidth/2), y+4, 0xFFFFFF);
|
||||
drawContext.fill(x, y, x+windowWidth, y+windowHeight, Moonlight.THEME.themedWindowBorders ? Moonlight.THEME.border.getRGB() : Moonlight.THEME.accent.getRGB());
|
||||
drawContext.fill(x+2, y+2, x+windowWidth-2, y+windowHeight-2, Moonlight.THEME.background.getRGB());
|
||||
drawContext.fill(x, y, x+windowWidth, y+16, Moonlight.THEME.themedWindowBorders ? Moonlight.THEME.border.getRGB() : Moonlight.THEME.accent.getRGB());
|
||||
//drawContext.fill(x+2, y+2, x+(windowWidth-2), y+14, Moonlight.THEME.background.getRGB());
|
||||
drawContext.drawText(textRenderer, module.name, x+((windowWidth/2)-(textRenderer.getWidth(module.name)/2)), y+4, Moonlight.THEME.headerText.getRGB(), false);
|
||||
backButton.render(drawContext, textRenderer, mouseX, mouseY, x+4, y+4);
|
||||
int yOffset = y+24;
|
||||
for (Setting setting : module.settings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue