本文整理汇总了Java中net.minecraft.client.gui.GuiYesNo类的典型用法代码示例。如果您正苦于以下问题:Java GuiYesNo类的具体用法?Java GuiYesNo怎么用?Java GuiYesNo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GuiYesNo类属于net.minecraft.client.gui包,在下文中一共展示了GuiYesNo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
protected void actionPerformed(GuiButton button) throws IOException
{
if(button.id == buttons.entrySet().size())
{
if(cancel.equals("allowed"))
mc.displayGuiScreen(new GuiWurstMainMenu());
else if(cancel.equals("prompt"))
mc.displayGuiScreen(new GuiYesNo(this,
"Are you sure you want to cancel?", "", 0));
}else
{
MiscUtils.openLink(buttons.get(button.displayString).getAsString());
WurstClient.INSTANCE.analytics.trackEvent("message", "click",
"v" + WurstClient.VERSION, button.id);
}
}
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:18,代码来源:GuiMessage.java
示例2: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
/**
* Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
*/
protected void actionPerformed(GuiButton button)
{
if (button.enabled)
{
if (button.id < 200 && button instanceof GuiOptionButton)
{
this.settings.setOptionValue(((GuiOptionButton)button).returnEnumOptions(), 1);
button.displayString = this.settings.getKeyBinding(GameSettings.Options.getEnumOptions(button.id));
}
if (button.id == 200)
{
this.mc.gameSettings.saveOptions();
this.mc.displayGuiScreen(this.prevScreen);
}
if (button.id == 210)
{
this.mc.gameSettings.saveOptions();
GuiYesNo guiyesno = new GuiYesNo(this, I18n.format("of.message.other.reset", new Object[0]), "", 9999);
this.mc.displayGuiScreen(guiyesno);
}
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:28,代码来源:GuiOtherSettingsOF.java
示例3: enablePermissions
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
private void enablePermissions(JavaPlugin pl) {
Iterator<Permission> permissions = pl.getPermissions().iterator();
AtomicBoolean done = new AtomicBoolean(false);
for (; permissions.hasNext(); ) {
done.set(false);
Permission permission = permissions.next();
currentPerm = permission;
mc.displayGuiScreen(new GuiYesNo((b, i) -> {
((WurstSDK) SDK.getClient()).getConfig().change(currentPl, currentPerm, b, token);
permissions.remove();
mc.displayGuiScreen(this);
done.set(true);
},
"'" + pl.getName() + "' Would Like to " + permission.getDescription(), "",
"OK", "Don't Allow", 99));
while (!done.get()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
开发者ID:WurstSDK-Team,项目名称:WurstSDK,代码行数:25,代码来源:GuiWurstMainMenu.java
示例4: initGui
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void initGui() {
altList = new GuiAltList(mc, this);
altList.registerScrollButtons(7, 8);
altList.elementClicked(-1, false, 0, 0);
if (GuiAltList.alts.isEmpty() && shouldAsk) {
mc.displayGuiScreen(
new GuiYesNo(this, "Your alt list is empty.", "Would you like some random alts to get started?",
0));
}
buttonList.clear();
buttonList.add(new GuiButton(0, width / 2 - 154, height - 52, 100, 20, "Use"));
buttonList.add(new GuiButton(1, width / 2 - 50, height - 52, 100, 20, "Direct Login"));
buttonList.add(new GuiButton(2, width / 2 + 54, height - 52, 100, 20, "Add"));
buttonList.add(new GuiButton(3, width / 2 - 154, height - 28, 75, 20, "Star"));
buttonList.add(new GuiButton(4, width / 2 - 76, height - 28, 74, 20, "Edit"));
buttonList.add(new GuiButton(5, width / 2 + 2, height - 28, 74, 20, "Delete"));
buttonList.add(new GuiButton(6, width / 2 + 80, height - 28, 75, 20, "Cancel"));
buttonList.add(new GuiButton(8, width - 108, 8, 100, 20, "Session Stealer"));
buttonList.add(new GuiButton(7, 8, 8, 100, 20, "Import Alts"));
WurstClient.INSTANCE.analytics.trackPageView("/alt-manager/", "Alt Manager");
}
开发者ID:null-dev,项目名称:EvenWurse,代码行数:25,代码来源:GuiAlts.java
示例5: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
protected void actionPerformed(GuiButton button) {
IGuiListEntry entry = alarmList.getListEntry(alarmList.getSelected());
if (button.enabled) {
switch (button.id) {
case 0:
if (entry == null)
break;
case 1:
mc.displayGuiScreen(new GuiScreenEditAlarm(this, ((button.id == 0 && entry instanceof GuiAlarmEntry) ? (((GuiAlarmEntry) entry).getAlarm()) : null), button.id == 1));
break;
case 2:
if (entry instanceof GuiAlarmEntry)
mc.displayGuiScreen(new GuiYesNo(
this,
StatCollector.translateToLocal("gui.alarmConfig.delete.question"),
StatCollector.translateToLocalFormatted(((GuiAlarmEntry) entry).getAlarm().getTitle()),
alarmList.getSelected()));
break;
default:
mc.displayGuiScreen(parent);
}
}
}
开发者ID:iTitus,项目名称:GimmeTime,代码行数:25,代码来源:GuiScreenAlarmConfig.java
示例6: updateScreen
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
public void updateScreen()
{
super.updateScreen();
// updater
if(startupMessageDisabled)
return;
if(WurstClient.INSTANCE.updater.isOutdated())
{
WurstClient.INSTANCE.analytics.trackEvent("updater",
"update to v" + WurstClient.INSTANCE.updater.getLatestVersion(),
"from " + WurstClient.VERSION);
WurstClient.INSTANCE.updater.update();
startupMessageDisabled = true;
}
// emergency message
if(startupMessageDisabled)
return;
try
{
HttpsURLConnection connection = (HttpsURLConnection)new URL(
"https://www.wurstclient.net/api/v1/messages.json")
.openConnection();
connection.connect();
JsonObject json = JsonUtils.jsonParser
.parse(
new InputStreamReader(connection.getInputStream(), "UTF-8"))
.getAsJsonObject();
if(json.get(WurstClient.VERSION) != null)
{
System.out.println("Emergency message found!");
mc.displayGuiScreen(new GuiMessage(
json.get(WurstClient.VERSION).getAsJsonObject()));
startupMessageDisabled = true;
}
}catch(Exception e)
{
e.printStackTrace();
}
// changelog
if(startupMessageDisabled)
return;
if(!WurstClient.VERSION
.equals(WurstClient.INSTANCE.options.lastLaunchedVersion))
{
mc.displayGuiScreen(new GuiYesNo(this,
"Successfully updated to Wurst v" + WurstClient.VERSION, "",
"Go Play", "View Changelog", 64));
WurstClient.INSTANCE.options.lastLaunchedVersion =
WurstClient.VERSION;
ConfigFiles.OPTIONS.save();
}
startupMessageDisabled = true;
}
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:61,代码来源:GuiWurstMainMenu.java
示例7: initGui
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
public void initGui()
{
altList = new GuiAltList(mc, this);
altList.registerScrollButtons(7, 8);
altList.elementClicked(-1, false, 0, 0);
if(GuiAltList.alts.isEmpty() && shouldAsk)
mc.displayGuiScreen(new GuiYesNo(this, "Your alt list is empty.",
"Would you like some random alts to get started?", 0));
buttonList.clear();
buttonList.add(
new GuiButton(0, width / 2 - 154, height - 52, 100, 20, "Use"));
buttonList.add(new GuiButton(1, width / 2 - 50, height - 52, 100, 20,
"Direct Login"));
buttonList
.add(new GuiButton(2, width / 2 + 54, height - 52, 100, 20, "Add"));
buttonList.add(
new GuiButton(3, width / 2 - 154, height - 28, 75, 20, "Star"));
buttonList
.add(new GuiButton(4, width / 2 - 76, height - 28, 74, 20, "Edit"));
buttonList.add(
new GuiButton(5, width / 2 + 2, height - 28, 74, 20, "Delete"));
buttonList.add(
new GuiButton(6, width / 2 + 80, height - 28, 75, 20, "Cancel"));
buttonList.add(new GuiButton(7, 8, 8, 100, 20, "Import Alts"));
}
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:29,代码来源:AltManagerScreen.java
示例8: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
/**
* Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
*/
protected void actionPerformed(GuiButton button)
{
if (button.enabled)
{
if (button.id < 200 && button instanceof GuiOptionButton)
{
this.settings.setOptionValue(((GuiOptionButton)button).returnEnumOptions(), 1);
button.displayString = this.settings.getKeyBinding(GameSettings.Options.getEnumOptions(button.id));
}
if (button.id == 200)
{
this.mc.gameSettings.saveOptions();
this.mc.displayGuiScreen(this.prevScreen);
}
if (button.id == 210)
{
this.mc.gameSettings.saveOptions();
GuiYesNo guiyesno = new GuiYesNo(this, "Reset all video settings to their default values?", "", 9999);
this.mc.displayGuiScreen(guiyesno);
}
if (button.id != GameSettings.Options.CLOUD_HEIGHT.ordinal())
{
ScaledResolution scaledresolution = new ScaledResolution(this.mc);
int i = scaledresolution.getScaledWidth();
int j = scaledresolution.getScaledHeight();
this.setWorldAndResolution(this.mc, i, j);
}
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:36,代码来源:GuiOtherSettingsOF.java
示例9: displayScreenJoinTeam
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
public static void displayScreenJoinTeam() {
final GuiScreen prevScreen = Minecraft.getMinecraft().currentScreen;
Minecraft.getMinecraft().displayGuiScreen(new GuiYesNo(new GuiYesNoCallback() {
@Override
public void confirmClicked(boolean result, int id) {
if (result)
TF2weapons.network.sendToServer(new TF2Message.ActionMessage(16));
else
TF2weapons.network.sendToServer(new TF2Message.ActionMessage(17));
Minecraft.getMinecraft().displayGuiScreen(prevScreen);
}
}, "Choose your team", "Before using the store, you need to join a team", "RED", "BLU", 0));
}
开发者ID:rafradek,项目名称:Mods,代码行数:16,代码来源:ClientProxy.java
示例10: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
protected void actionPerformed(GuiButton button)
{
GuiListButton b = (GuiListButton) button;
// Muting server
if (b.id == 0)
{
if (!Preferences.i.mutedGuilds.contains(guild.getId()))
Preferences.i.mutedGuilds.add(guild.getId());
else
Preferences.i.mutedGuilds.remove(guild.getId());
b.displayString = Preferences.i.mutedGuilds.contains(guild.getId())
? TextFormatting.RED + "Unmute"
: "Mute";
}
// Leaving server
else if (b.id == 1)
{
GuiYesNo yn = new GuiYesNo((result, id) ->
{
// leaving guild
if (result)
guild.getManager().leave();
mc.displayGuiScreen(guiServers);
}
, "Are you sure you want to leave " + guild.getName() + "?"
, "You'll have to get an invite link to join again."
, 0);
mc.displayGuiScreen(yn);
}
// Showing channels for guild
if (b.id == 2)
{
mc.displayGuiScreen(new GuiChannels(guiServers, guild));
}
}
开发者ID:duke605,项目名称:DiscordCE,代码行数:40,代码来源:GuiServerList.java
示例11: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
protected void actionPerformed(GuiButton button) throws IOException {
if (button.id == buttons.entrySet().size()) {
if (cancel.equals("allowed")) {
mc.displayGuiScreen(new GuiWurstMainMenu());
} else if (cancel.equals("prompt")) {
mc.displayGuiScreen(new GuiYesNo(this, "Are you sure you want to cancel?", "", 0));
}
} else {
MiscUtils.openLink(buttons.get(button.displayString).getAsString());
WurstClient.INSTANCE.analytics.trackEvent("message", "click", "v" + WurstClient.VERSION, button.id);
}
}
开发者ID:null-dev,项目名称:EvenWurse,代码行数:14,代码来源:GuiMessage.java
示例12: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
protected void actionPerformed(GuiButton guibutton)
{
if (guibutton.enabled)
{
if (guibutton.id < 200 && guibutton instanceof GuiOptionButton)
{
this.settings.setOptionValue(((GuiOptionButton)guibutton).func_146136_c(), 1);
guibutton.displayString = this.settings.getKeyBinding(GameSettings.Options.getEnumOptions(guibutton.id));
}
if (guibutton.id == 200)
{
this.mc.gameSettings.saveOptions();
this.mc.displayGuiScreen(this.prevScreen);
}
if (guibutton.id == 210)
{
this.mc.gameSettings.saveOptions();
GuiYesNo scaledresolution = new GuiYesNo(this, "Reset all video settings to their default values?", "", 9999);
this.mc.displayGuiScreen(scaledresolution);
}
if (guibutton.id != GameSettings.Options.CLOUD_HEIGHT.ordinal())
{
ScaledResolution scaledresolution1 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
int i = scaledresolution1.getScaledWidth();
int j = scaledresolution1.getScaledHeight();
this.setWorldAndResolution(this.mc, i, j);
}
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:33,代码来源:GuiOtherSettingsOF.java
示例13: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
protected void actionPerformed(GuiButton button) {
if (button.enabled) {
switch (button.id) {
case 0:
case 1:
GuiAlarm guiAlarm = (GuiAlarm) alarmList.getListEntry(alarmList
.getSelected());
mc.displayGuiScreen(new GuiScreenEditAlarm(this, alarmList
.getSelected(), ((guiAlarm != null) ? (guiAlarm
.getAlarm()) : null), button.id == 1));
break;
case 2:
mc.displayGuiScreen(new GuiYesNo(
this,
StatCollector
.translateToLocal("gui.alarmConfig.delete.question"),
StatCollector.translateToLocalFormatted(
"gui.alarmConfig.delete.warning",
((GuiAlarm) alarmList.getListEntry(alarmList
.getSelected())).getAlarm().getTitle()),
alarmList.getSelected()));
break;
default:
mc.displayGuiScreen(parent);
}
}
}
开发者ID:iTitus,项目名称:MyMod,代码行数:31,代码来源:GuiScreenAlarmConfig.java
示例14: func_73875_a
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
protected void func_73875_a(GuiButton p_73875_1_) {
if(p_73875_1_.field_73742_g) {
if(p_73875_1_.field_73741_f == 2) {
String var2 = this.func_74063_d(this.field_74080_m);
if(var2 != null) {
this.field_74084_s = true;
GuiYesNo var3 = func_74061_a(this, var2, this.field_74080_m);
this.field_73882_e.func_71373_a(var3);
}
} else if(p_73875_1_.field_73741_f == 1) {
this.func_74064_e(this.field_74080_m);
} else if(p_73875_1_.field_73741_f == 3) {
this.field_73882_e.func_71373_a(new GuiCreateWorld(this));
} else if(p_73875_1_.field_73741_f == 6) {
this.field_73882_e.func_71373_a(new GuiRenameWorld(this, this.func_74069_a(this.field_74080_m)));
} else if(p_73875_1_.field_73741_f == 0) {
this.field_73882_e.func_71373_a(this.field_74077_a);
} else if(p_73875_1_.field_73741_f == 7) {
GuiCreateWorld var5 = new GuiCreateWorld(this);
ISaveHandler var6 = this.field_73882_e.func_71359_d().func_75804_a(this.func_74069_a(this.field_74080_m), false);
WorldInfo var4 = var6.func_75757_d();
var6.func_75759_a();
var5.func_82286_a(var4);
this.field_73882_e.func_71373_a(var5);
} else {
this.field_74079_o.func_77219_a(p_73875_1_);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:31,代码来源:GuiSelectWorld.java
示例15: func_74061_a
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
public static GuiYesNo func_74061_a(GuiScreen p_74061_0_, String p_74061_1_, int p_74061_2_) {
String var3 = I18n.func_135053_a("selectWorld.deleteQuestion");
String var4 = "\'" + p_74061_1_ + "\' " + I18n.func_135053_a("selectWorld.deleteWarning");
String var5 = I18n.func_135053_a("selectWorld.deleteButton");
String var6 = I18n.func_135053_a("gui.cancel");
GuiYesNo var7 = new GuiYesNo(p_74061_0_, var3, var4, var5, var6, p_74061_2_);
return var7;
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:GuiSelectWorld.java
示例16: func_73875_a
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
protected void func_73875_a(GuiButton p_73875_1_) {
if(p_73875_1_.field_73742_g) {
if(p_73875_1_.field_73741_f == 2) {
String var2 = this.field_74030_m.func_78850_a(this.field_74028_n).field_78847_a;
if(var2 != null) {
this.field_74036_r = true;
String var3 = I18n.func_135053_a("selectServer.deleteQuestion");
String var4 = "\'" + var2 + "\' " + I18n.func_135053_a("selectServer.deleteWarning");
String var5 = I18n.func_135053_a("selectServer.deleteButton");
String var6 = I18n.func_135053_a("gui.cancel");
GuiYesNo var7 = new GuiYesNo(this, var3, var4, var5, var6, this.field_74028_n);
this.field_73882_e.func_71373_a(var7);
}
} else if(p_73875_1_.field_73741_f == 1) {
this.func_74004_a(this.field_74028_n);
} else if(p_73875_1_.field_73741_f == 4) {
this.field_74033_u = true;
this.field_73882_e.func_71373_a(new GuiScreenServerList(this, this.field_74031_w = new ServerData(I18n.func_135053_a("selectServer.defaultName"), "")));
} else if(p_73875_1_.field_73741_f == 3) {
this.field_74035_s = true;
this.field_73882_e.func_71373_a(new GuiScreenAddServer(this, this.field_74031_w = new ServerData(I18n.func_135053_a("selectServer.defaultName"), "")));
} else if(p_73875_1_.field_73741_f == 7) {
this.field_74034_t = true;
ServerData var8 = this.field_74030_m.func_78850_a(this.field_74028_n);
this.field_74031_w = new ServerData(var8.field_78847_a, var8.field_78845_b);
this.field_74031_w.func_82819_b(var8.func_82820_d());
this.field_73882_e.func_71373_a(new GuiScreenAddServer(this, this.field_74031_w));
} else if(p_73875_1_.field_73741_f == 0) {
this.field_73882_e.func_71373_a(this.field_74025_c);
} else if(p_73875_1_.field_73741_f == 8) {
this.field_73882_e.func_71373_a(new GuiMultiplayer(this.field_74025_c));
} else {
this.field_74022_d.func_77219_a(p_73875_1_);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:38,代码来源:GuiMultiplayer.java
示例17: func_96272_i
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
private void func_96272_i() {
if(this.field_96284_p >= 0 && this.field_96284_p < this.field_96280_b.field_96402_f.size()) {
this.field_96283_q = (String)this.field_96280_b.field_96402_f.get(this.field_96284_p);
GuiYesNo var1 = new GuiYesNo(this, "Warning!", I18n.func_135053_a("mco.configure.world.uninvite.question") + " \'" + this.field_96283_q + "\'", 3);
this.field_73882_e.func_71373_a(var1);
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:GuiScreenConfigureWorld.java
示例18: func_73875_a
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
protected void func_73875_a(GuiButton p_73875_1_) {
if(p_73875_1_.field_73741_f == 0) {
this.field_73882_e.func_71373_a(new GuiOptions(this, this.field_73882_e.field_71474_y));
}
if(p_73875_1_.field_73741_f == 5) {
this.field_73882_e.func_71373_a(new GuiLanguage(this, this.field_73882_e.field_71474_y, this.field_73882_e.func_135016_M()));
}
if(p_73875_1_.field_73741_f == 1) {
this.field_73882_e.func_71373_a(new GuiSelectWorld(this));
}
if(p_73875_1_.field_73741_f == 2) {
this.field_73882_e.func_71373_a(new GuiMultiplayer(this));
}
if(p_73875_1_.field_73741_f == 14 && this.field_130023_H.field_73748_h) {
this.func_140005_i();
}
if(p_73875_1_.field_73741_f == 4) {
this.field_73882_e.func_71400_g();
}
if(p_73875_1_.field_73741_f == 11) {
this.field_73882_e.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a);
}
if(p_73875_1_.field_73741_f == 12) {
ISaveFormat var2 = this.field_73882_e.func_71359_d();
WorldInfo var3 = var2.func_75803_c("Demo_World");
if(var3 != null) {
GuiYesNo var4 = GuiSelectWorld.func_74061_a(this, var3.func_76065_j(), 12);
this.field_73882_e.func_71373_a(var4);
}
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:40,代码来源:GuiMainMenu.java
示例19: mousePressed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
/**
* Returns true if the mouse has been pressed on this control.
*/
public boolean mousePressed(int slotIndex, int p_148278_2_, int p_148278_3_, int p_148278_4_, int p_148278_5_, int p_148278_6_)
{
if (this.func_148310_d() && p_148278_5_ <= 32)
{
if (this.func_148309_e())
{
this.resourcePacksGUI.markChanged();
int j = this.func_183019_a();
if (j != 1)
{
String s1 = I18n.format("resourcePack.incompatible.confirm.title", new Object[0]);
String s = I18n.format("resourcePack.incompatible.confirm." + (j > 1 ? "new" : "old"), new Object[0]);
this.mc.displayGuiScreen(new GuiYesNo(new GuiYesNoCallback()
{
public void confirmClicked(boolean result, int id)
{
List<ResourcePackListEntry> list2 = ResourcePackListEntry.this.resourcePacksGUI.getListContaining(ResourcePackListEntry.this);
ResourcePackListEntry.this.mc.displayGuiScreen(ResourcePackListEntry.this.resourcePacksGUI);
if (result)
{
list2.remove(ResourcePackListEntry.this);
ResourcePackListEntry.this.resourcePacksGUI.getSelectedResourcePacks().add(0, ResourcePackListEntry.this);
}
}
}, s1, s, 0));
}
else
{
this.resourcePacksGUI.getListContaining(this).remove(this);
this.resourcePacksGUI.getSelectedResourcePacks().add(0, this);
}
return true;
}
if (p_148278_5_ < 16 && this.func_148308_f())
{
this.resourcePacksGUI.getListContaining(this).remove(this);
this.resourcePacksGUI.getAvailableResourcePacks().add(0, this);
this.resourcePacksGUI.markChanged();
return true;
}
if (p_148278_5_ > 16 && p_148278_6_ < 16 && this.func_148314_g())
{
List<ResourcePackListEntry> list1 = this.resourcePacksGUI.getListContaining(this);
int k = list1.indexOf(this);
list1.remove(this);
list1.add(k - 1, this);
this.resourcePacksGUI.markChanged();
return true;
}
if (p_148278_5_ > 16 && p_148278_6_ > 16 && this.func_148307_h())
{
List<ResourcePackListEntry> list = this.resourcePacksGUI.getListContaining(this);
int i = list.indexOf(this);
list.remove(this);
list.add(i + 1, this);
this.resourcePacksGUI.markChanged();
return true;
}
}
return false;
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:72,代码来源:ResourcePackListEntry.java
示例20: actionPerformed
import net.minecraft.client.gui.GuiYesNo; //导入依赖的package包/类
@Override
protected void actionPerformed(GuiButton button) throws IOException
{
if(!button.enabled)
return;
switch(button.id)
{
case 0:
// Add
mc.displayGuiScreen(new KeybindEditorScreen(this));
break;
case 1:
// Edit
Keybind keybind =
WurstClient.INSTANCE.getKeybinds().get(listGui.selectedSlot);
mc.displayGuiScreen(new KeybindEditorScreen(this, keybind.getKey(),
keybind.getCommands()));
break;
case 2:
// Remove
Keybind keybind1 =
WurstClient.INSTANCE.getKeybinds().get(listGui.selectedSlot);
WurstClient.INSTANCE.getKeybinds().remove(keybind1.getKey());
break;
case 3:
// Back
mc.displayGuiScreen(prevScreen);
break;
case 4:
// Reset Keybinds
mc.displayGuiScreen(new GuiYesNo(this,
"Are you sure you want to reset your keybinds?",
"This cannot be undone!", 0));
break;
}
}
开发者ID:Wurst-Imperium,项目名称:Wurst-MC-1.12,代码行数:42,代码来源:KeybindManagerScreen.java
注:本文中的net.minecraft.client.gui.GuiYesNo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论