本文整理汇总了Java中net.minecraft.client.resources.Language.getLanguageCode方法的典型用法代码示例。如果您正苦于以下问题:Java Language.getLanguageCode方法的具体用法?Java Language.getLanguageCode怎么用?Java Language.getLanguageCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.resources.Language
的用法示例。
在下文中一共展示了Language.getLanguageCode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: elementClicked
import net.minecraft.client.resources.Language; //导入方法依赖的package包/类
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
GuiLanguage.this.languageManager.setCurrentLanguage(language);
GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
this.mc.refreshResources();
GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
GuiLanguage.this.game_settings_3.saveOptions();
}
示例2: elementClicked
import net.minecraft.client.resources.Language; //导入方法依赖的package包/类
/**
* The element in the slot that was clicked, boolean for whether it was double clicked or not
*/
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY)
{
Language language = (Language)this.languageMap.get(this.langCodeList.get(slotIndex));
GuiLanguage.this.languageManager.setCurrentLanguage(language);
GuiLanguage.this.game_settings_3.language = language.getLanguageCode();
this.mc.refreshResources();
GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.languageManager.isCurrentLocaleUnicode() || GuiLanguage.this.game_settings_3.forceUnicodeFont);
GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.languageManager.isCurrentLanguageBidirectional());
GuiLanguage.this.confirmSettingsBtn.displayString = I18n.format("gui.done", new Object[0]);
GuiLanguage.this.forceUnicodeFontBtn.displayString = GuiLanguage.this.game_settings_3.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
GuiLanguage.this.game_settings_3.saveOptions();
}
示例3: elementClicked
import net.minecraft.client.resources.Language; //导入方法依赖的package包/类
protected void elementClicked(int p_148144_1_, boolean p_148144_2_, int p_148144_3_, int p_148144_4_)
{
Language var5 = (Language)this.field_148177_m.get(this.field_148176_l.get(p_148144_1_));
GuiLanguage.this.field_146454_h.setCurrentLanguage(var5);
GuiLanguage.this.field_146451_g.language = var5.getLanguageCode();
GuiLanguage.this.mc.refreshResources();
GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.field_146454_h.isCurrentLocaleUnicode() || GuiLanguage.this.field_146451_g.forceUnicodeFont);
GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.field_146454_h.isCurrentLanguageBidirectional());
GuiLanguage.this.field_146452_r.displayString = I18n.format("gui.done", new Object[0]);
GuiLanguage.this.field_146455_i.displayString = GuiLanguage.this.field_146451_g.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
GuiLanguage.this.field_146451_g.saveOptions();
}
示例4: elementClicked
import net.minecraft.client.resources.Language; //导入方法依赖的package包/类
protected void elementClicked(int p_148144_1_, boolean p_148144_2_, int p_148144_3_, int p_148144_4_)
{
Language language = (Language)this.field_148177_m.get(this.field_148176_l.get(p_148144_1_));
GuiLanguage.this.field_146454_h.setCurrentLanguage(language);
GuiLanguage.this.field_146451_g.language = language.getLanguageCode();
GuiLanguage.this.mc.refreshResources();
GuiLanguage.this.fontRendererObj.setUnicodeFlag(GuiLanguage.this.field_146454_h.isCurrentLocaleUnicode() || GuiLanguage.this.field_146451_g.forceUnicodeFont);
GuiLanguage.this.fontRendererObj.setBidiFlag(GuiLanguage.this.field_146454_h.isCurrentLanguageBidirectional());
GuiLanguage.this.field_146452_r.displayString = I18n.format("gui.done", new Object[0]);
GuiLanguage.this.field_146455_i.displayString = GuiLanguage.this.field_146451_g.getKeyBinding(GameSettings.Options.FORCE_UNICODE_FONT);
GuiLanguage.this.field_146451_g.saveOptions();
}
示例5: elementClicked
import net.minecraft.client.resources.Language; //导入方法依赖的package包/类
/**
* the element in the slot that was clicked, boolean for wether it was double clicked or not
*/
protected void elementClicked(int par1, boolean par2)
{
Language language = (Language)this.field_77253_h.get(this.field_77251_g.get(par1));
GuiLanguage.func_135011_a(this.languageGui).setCurrentLanguage(language);
GuiLanguage.getGameSettings(this.languageGui).language = language.getLanguageCode();
this.languageGui.mc.refreshResources();
this.languageGui.fontRenderer.setUnicodeFlag(GuiLanguage.func_135011_a(this.languageGui).isCurrentLocaleUnicode());
this.languageGui.fontRenderer.setBidiFlag(GuiLanguage.func_135011_a(this.languageGui).isCurrentLanguageBidirectional());
GuiLanguage.getDoneButton(this.languageGui).displayString = I18n.getString("gui.done");
GuiLanguage.getGameSettings(this.languageGui).saveOptions();
}
示例6: fromLanguage
import net.minecraft.client.resources.Language; //导入方法依赖的package包/类
public static LangDict fromLanguage(Language lang) {
String code = "en_US";
if (lang != null)
code = lang.getLanguageCode();
return new LangDict(code);
}