many major changes, see store for details
- bump version to v0.4.0 - add theme support - add high contrast and light themes - remove settingcommand (broken) - add icon variants for certain themes - remove text shadows from interfaces other than the hud
This commit is contained in:
parent
854ce7201c
commit
bd5573c48f
38 changed files with 223 additions and 184 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;
|
||||
|
|
@ -22,8 +23,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(Identifier.of("moonlight", "settings"), x+width-12, y, 12, 12);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@ 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.util.Identifier;
|
||||
|
||||
public class HUDModuleList
|
||||
{
|
||||
|
|
@ -37,10 +38,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(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(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