Skip to content

Commit

Permalink
优化默认配置界面
Browse files Browse the repository at this point in the history
  • Loading branch information
TartaricAcid committed Oct 28, 2024
1 parent 66e330c commit cf01b86
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package com.github.tartaricacid.touhoulittlemaid.client.gui.entity.maid.task;

import com.github.tartaricacid.touhoulittlemaid.TouhouLittleMaid;
import com.github.tartaricacid.touhoulittlemaid.inventory.container.task.TaskConfigContainer;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import org.anti_ad.mc.ipn.api.IPNButton;
import org.anti_ad.mc.ipn.api.IPNGuiHint;
Expand All @@ -14,7 +18,20 @@
@IPNGuiHint(button = IPNButton.SHOW_EDITOR, horizontalOffset = -5)
@IPNGuiHint(button = IPNButton.SETTINGS, horizontalOffset = -5)
public class DefaultMaidTaskConfigGui extends MaidTaskConfigGui<TaskConfigContainer> {
private static final ResourceLocation BG = new ResourceLocation(TouhouLittleMaid.MOD_ID, "textures/gui/default_task_config.png");

public DefaultMaidTaskConfigGui(TaskConfigContainer screenContainer, Inventory inv, Component titleIn) {
super(screenContainer, inv, titleIn);
}

@Override
protected void renderBg(GuiGraphics graphics, float partialTicks, int x, int y) {
super.renderBg(graphics, partialTicks, x, y);
graphics.blit(BG, leftPos + 80, topPos + 28, 0, 0, imageWidth, 137);
}

@Override
protected void renderAddition(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) {
graphics.drawWordWrap(font, Component.translatable("gui.touhou_little_maid.default_task_config.title"), leftPos + 88, topPos + 38, 160, ChatFormatting.DARK_GRAY.getColor());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
"gui.touhou_little_maid.monster_type.hostile": "§cHostile",
"gui.touhou_little_maid.monster_type.title": "Maid Attack List",
"gui.touhou_little_maid.monster_type.add": "Add",
"gui.touhou_little_maid.default_task_config.title": "Current task does not have any config...",
"chat_bubble.touhou_little_maid.inner.feed_animal.max_number": "So many animals... I don't feed them anymore!",
"chat_bubble.touhou_little_maid.inner.home_meal.two_hand_is_full": "My hands were full of items... I couldn't eat!",
"chat_bubble.touhou_little_maid.inner.home_meal.meal_is_empty": "Hurry up, Hurry up, I don't have anything to eat!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@
"gui.touhou_little_maid.monster_type.hostile": "§c敌对",
"gui.touhou_little_maid.monster_type.title": "女仆攻击列表",
"gui.touhou_little_maid.monster_type.add": "添加",
"gui.touhou_little_maid.default_task_config.title": "当前工作任务没有任何配置项……",
"chat_bubble.touhou_little_maid.inner.feed_animal.max_number": "动物太多了……我不再喂养它们了!",
"chat_bubble.touhou_little_maid.inner.home_meal.two_hand_is_full": "我的双手根本空不出来……我没法吃饭了!",
"chat_bubble.touhou_little_maid.inner.home_meal.meal_is_empty": "快上菜、快上菜,我都没东西吃了!",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cf01b86

Please sign in to comment.