Search in sources :

Example 1 with SettingsScreenButton

use of com.irtimaled.bbor.client.gui.SettingsScreenButton in project BoundingBoxOutlineReloaded by irtimaled.

the class MixinOptionsScreen method initGui.

@Inject(method = "init", at = @At("RETURN"))
private void initGui(CallbackInfo ci) {
    // shuffle middle buttons up by 12 px to make space
    int top = this.height / 6 + 42;
    int bottom = this.height / 6 + 168;
    for (Widget button : buttons) {
        if (button.y >= top && button.y < bottom)
            button.y -= 12;
    }
    SettingsScreenButton button = new SettingsScreenButton(this.width / 2 - 155, top + 84, 150, "BBOR", this);
    this.buttons.add(this.buttons.size() - 1, button);
    this.children.add(this.children.size() - 1, button);
}
Also used : SettingsScreenButton(com.irtimaled.bbor.client.gui.SettingsScreenButton) Widget(net.minecraft.client.gui.widget.Widget) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

SettingsScreenButton (com.irtimaled.bbor.client.gui.SettingsScreenButton)1 Widget (net.minecraft.client.gui.widget.Widget)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1