当前位置: 首页>>代码示例>>Java>>正文


Java Language.getLanguageCode方法代码示例

本文整理汇总了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();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:13,代码来源:GuiLanguage.java

示例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();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:16,代码来源:GuiLanguage.java

示例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();
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:13,代码来源:GuiLanguage.java

示例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();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:13,代码来源:GuiLanguage.java

示例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();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:15,代码来源:GuiSlotLanguage.java

示例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);
}
 
开发者ID:killjoy1221,项目名称:TabbyChat-2,代码行数:7,代码来源:LangDict.java


注:本文中的net.minecraft.client.resources.Language.getLanguageCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。