Mail.ruПочтаМой МирОдноклассникиВКонтактеИгрыЗнакомстваНовостиКалендарьОблакоЗаметкиВсе проекты

Закругление кнопки в Java для Minecraft Forge 1.16.5

Лев Головацкий Профи (694), открыт 1 неделю назад
Ниже будет блок кода, но я не знаю как скруглить мне кнопку помогите сделать в кнопке закругленные края

         // Кнопка для Fly 
this.addButton(new Button(menuX + 20, menuY + 110, 160, 30,
new StringTextComponent(flyEnabled ? "Disable Fly" : "Enable Fly"),
button -> {
if (button.isHovered() && minecraft.mouseHandler.isRightPressed()) {
minecraft.setScreen(new FlySettingsScreen(this));
} else {
flyEnabled = !flyEnabled;
Fly.setFlyEnabled(flyEnabled);
button.setMessage(new StringTextComponent(flyEnabled ? "Disable Fly" : "Enable Fly"));
}
}){
@Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
fill(matrixStack, this.x, this.y, this.x + this.width, this.y + this.height, 0xFF6600BA);
drawCenteredString(matrixStack, minecraft.font, this.getMessage(), this.x + this.width / 2, this.y + (this.height - 8) / 2, 0xFFFFFFFF);
}
});
0 ответов
Похожие вопросы