diff --git a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/GifSlider.java b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/GifSlider.java index fbe7212..11053f9 100644 --- a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/GifSlider.java +++ b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/GifSlider.java @@ -15,7 +15,7 @@ public class GifSlider extends SettingSliderWidget { // public GifSlider() { // super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20); // this.updateMessage(); -// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip")); +// this.tip = Tooltip.of(createTranslatableComponent("gif.chatimage.tooltip")); // this.setTooltip(this.tip); // } // ELSE @@ -26,7 +26,7 @@ public class GifSlider extends SettingSliderWidget { // END IF @Override protected void updateMessage() { - this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position)))); + this.setMessage(composeGenericOptionText(createTranslatableComponent("gif.chatimage.gui"), createLiteralComponent(String.valueOf(this.position)))); ChatImageClient.CONFIG.gifSpeed = this.position; ChatImageConfig.saveConfig(ChatImageClient.CONFIG); } diff --git a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/LimitSlider.java b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/LimitSlider.java index bf40c2a..9100530 100644 --- a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/LimitSlider.java +++ b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/LimitSlider.java @@ -32,11 +32,11 @@ public class LimitSlider extends SettingSliderWidget { protected void updateMessage() { switch (limitType) { case WIDTH: - this.setMessage(composeGenericOptionText(title, CONFIG.limitWidth == 0 ? createTranslatableText("default.chatimage.gui") : createLiteralText(String.valueOf(this.position)))); + this.setMessage(composeGenericOptionText(title, CONFIG.limitWidth == 0 ? createTranslatableComponent("default.chatimage.gui") : createLiteralComponent(String.valueOf(this.position)))); CONFIG.limitWidth = this.position; break; case HEIGHT: - this.setMessage(composeGenericOptionText(title, CONFIG.limitHeight == 0 ? createTranslatableText("default.chatimage.gui") : createLiteralText(String.valueOf(this.position)))); + this.setMessage(composeGenericOptionText(title, CONFIG.limitHeight == 0 ? createTranslatableComponent("default.chatimage.gui") : createLiteralComponent(String.valueOf(this.position)))); CONFIG.limitHeight = this.position; break; default: diff --git a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/PaddingSlider.java b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/PaddingSlider.java index ac19d00..3cc20b0 100644 --- a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/PaddingSlider.java +++ b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/PaddingSlider.java @@ -9,7 +9,7 @@ import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG; import static io.github.kituin.chatimage.tool.SimpleUtil.composeGenericOptionText; -import static io.github.kituin.chatimage.tool.SimpleUtil.createLiteralText; +import static io.github.kituin.chatimage.tool.SimpleUtil.createLiteralComponent; public class PaddingSlider extends SettingSliderWidget { @@ -36,7 +36,7 @@ public class PaddingSlider extends SettingSliderWidget { // END IF @Override protected void updateMessage() { - this.setMessage(composeGenericOptionText(title, createLiteralText(String.valueOf(this.position)))); + this.setMessage(composeGenericOptionText(title, createLiteralComponent(String.valueOf(this.position)))); switch (paddingType) { case TOP: CONFIG.paddingTop = this.position; diff --git a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/SettingSliderWidget.java b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/SettingSliderWidget.java index 114fe16..5492ca7 100644 --- a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/SettingSliderWidget.java +++ b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/SettingSliderWidget.java @@ -13,7 +13,7 @@ // ELSE //import net.minecraft.client.gui.tooltip.Tooltip; // END IF -import static io.github.kituin.chatimage.tool.SimpleUtil.createLiteralText; +import static io.github.kituin.chatimage.tool.SimpleUtil.createLiteralComponent; @Environment(EnvType.CLIENT) @@ -28,7 +28,7 @@ public abstract class SettingSliderWidget extends SliderWidget { // protected final TooltipSupplier tooltipSupplier; // protected boolean isClick = false; // public SettingSliderWidget(int x, int y, int width, int height, int value, float min, float max, TooltipSupplier tooltipSupplier) { -// super(x, y, width, height, createLiteralText(""), 0.0); +// super(x, y, width, height, createLiteralComponent(""), 0.0); // this.min = min; // this.max = max; // this.value = ((MathHelper.clamp((float) value, min, max) - min) / (max - min)); @@ -45,7 +45,7 @@ public abstract class SettingSliderWidget extends SliderWidget { // ELSE // protected Tooltip tip; // public SettingSliderWidget(int x, int y, int width, int height, int value, float min, float max) { -// super(x, y, width, height, createLiteralText(""), 0.0); +// super(x, y, width, height, createLiteralComponent(""), 0.0); // this.min = min; // this.max = max; // this.value = ((MathHelper.clamp((float) value, min, max) - min) / (max - min)); diff --git a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/TimeOutSlider.java b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/TimeOutSlider.java index 99e1fb3..709341e 100644 --- a/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/TimeOutSlider.java +++ b/fabric/origin/src/main/java/io/github/kituin/chatimage/widget/TimeOutSlider.java @@ -18,17 +18,17 @@ public class TimeOutSlider extends SettingSliderWidget { //public TimeOutSlider() { // super(100, 100, 150, 20, CONFIG.timeout, 3, 60); // this.updateMessage(); -// this.tip = Tooltip.of(createTranslatableText("timeout.chatimage.tooltip")); +// this.tip = Tooltip.of(createTranslatableComponent("timeout.chatimage.tooltip")); // this.setTooltip(this.tip); //} // END IF @Override protected void updateMessage() { this.setMessage(composeGenericOptionText( - createTranslatableText("timeout.chatimage.gui"), - createLiteralText(String.valueOf(this.position))) + createTranslatableComponent("timeout.chatimage.gui"), + createLiteralComponent(String.valueOf(this.position))) .append(" ") - .append(createTranslatableText("seconds.chatimage.gui"))); + .append(createTranslatableComponent("seconds.chatimage.gui"))); CONFIG.timeout = this.position; ChatImageConfig.saveConfig(CONFIG); }