Skip to content

Commit

Permalink
🐛 GifSlider
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed Jul 23, 2024
1 parent 13dd68d commit 24f2041
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
//import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

// IF > fabric-1.19.3
// public GifSlider() {
// super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
// this.updateMessage();
// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
// this.setTooltip(this.tip);
// }
// ELSE
public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
this.updateMessage();
}

// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
//import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

// IF > fabric-1.19.3
// public GifSlider() {
// super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
// this.updateMessage();
// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
// this.setTooltip(this.tip);
// }
// ELSE
public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
this.updateMessage();
}

// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
//import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

// IF > fabric-1.19.3
// public GifSlider() {
// super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
// this.updateMessage();
// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
// this.setTooltip(this.tip);
// }
// ELSE
public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
this.updateMessage();
}

// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
//import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

// IF > fabric-1.19.3
// public GifSlider() {
// super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
// this.updateMessage();
// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
// this.setTooltip(this.tip);
// }
// ELSE
public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
this.updateMessage();
}

// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
//import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

// IF > fabric-1.19.3
// public GifSlider() {
// super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
// this.updateMessage();
// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
// this.setTooltip(this.tip);
// }
// ELSE
public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
this.updateMessage();
}

// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// IF > fabric-1.19.3
public GifSlider() {
super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
this.updateMessage();
this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
this.setTooltip(this.tip);
}

// ELSE
// public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
// super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// this.updateMessage();
// }
// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// IF > fabric-1.19.3
public GifSlider() {
super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
this.updateMessage();
this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
this.setTooltip(this.tip);
}

// ELSE
// public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
// super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// this.updateMessage();
// }
// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// IF > fabric-1.19.3
public GifSlider() {
super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
this.updateMessage();
this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
this.setTooltip(this.tip);
}

// ELSE
// public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
// super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// this.updateMessage();
// }
// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// IF > fabric-1.19.3
public GifSlider() {
super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
this.updateMessage();
this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
this.setTooltip(this.tip);
}

// ELSE
// public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
// super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// this.updateMessage();
// }
// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// IF > fabric-1.19.3
public GifSlider() {
super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
this.updateMessage();
this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
this.setTooltip(this.tip);
}

// ELSE
// public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
// super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// this.updateMessage();
// }
// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@

import io.github.kituin.ChatImageCode.ChatImageConfig;
import io.github.kituin.chatimage.client.ChatImageClient;

// IF > fabric-1.19.3
//import net.minecraft.client.gui.tooltip.Tooltip;
// END IF
import static io.github.kituin.chatimage.client.ChatImageClient.CONFIG;
import static io.github.kituin.chatimage.tool.SimpleUtil.*;

/**
* @author kitUIN
*/
public class GifSlider extends SettingSliderWidget {

public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
this.updateMessage();
}

// IF > fabric-1.19.3
// public GifSlider() {
// super(100, 100, 150, 20, CONFIG.gifSpeed, 1, 20);
// this.updateMessage();
// this.tip = Tooltip.of(createTranslatableText("gif.chatimage.tooltip"));
// this.setTooltip(this.tip);
// }
// ELSE
// public GifSlider(int x, int y, int width, int height, TooltipSupplier tooltipSupplier) {
// super(x, y, width, height, ChatImageClient.CONFIG.gifSpeed, 1, 20, tooltipSupplier);
// this.updateMessage();
// }
// END IF
@Override
protected void updateMessage() {
this.setMessage(composeGenericOptionText(createTranslatableText("gif.chatimage.gui"), createLiteralText(String.valueOf(this.position))));
Expand Down

0 comments on commit 24f2041

Please sign in to comment.