GuiCustomizeSkin.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:CustomWorldGen 作者:
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;
    this.title = I18n.format("options.skinCustomisation.title", new Object[0]);

    for (EnumPlayerModelParts enumplayermodelparts : EnumPlayerModelParts.values())
    {
        this.buttonList.add(new GuiCustomizeSkin.ButtonPart(enumplayermodelparts.getPartId(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), 150, 20, enumplayermodelparts));
        ++i;
    }

    this.buttonList.add(new GuiOptionButton(199, this.width / 2 - 155 + i % 2 * 160, this.height / 6 + 24 * (i >> 1), GameSettings.Options.MAIN_HAND, this.mc.gameSettings.getKeyBinding(GameSettings.Options.MAIN_HAND)));
    ++i;

    if (i % 2 == 1)
    {
        ++i;
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 24 * (i >> 1), I18n.format("gui.done", new Object[0])));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号