refactor: remove rename profile button
This commit is contained in:
parent
fbd7e633d0
commit
e5859062c6
1 changed files with 2 additions and 12 deletions
|
|
@ -62,18 +62,6 @@ public class EditProfileScreen extends Screen {
|
|||
.build(),
|
||||
LayoutSettings::alignHorizontallyCenter
|
||||
);
|
||||
linearLayoutButtons.addChild(
|
||||
Button.builder(
|
||||
Component.translatable("gui.optionsprofiles.rename-profile"),
|
||||
(button) -> {
|
||||
Profiles.renameProfile(profileName.getString(), this.profileNameEdit.getValue());
|
||||
this.minecraft.setScreen(new EditProfileScreen(profilesScreen, Component.literal(this.profileNameEdit.getValue())));
|
||||
})
|
||||
.size(150, 20)
|
||||
.pos(this.width / 2 - 75, 166)
|
||||
.build(),
|
||||
LayoutSettings::alignHorizontallyCenter
|
||||
);
|
||||
linearLayoutButtons.addChild(
|
||||
Button.builder(
|
||||
Component.translatable("gui.optionsprofiles.options-toggle").append("..."),
|
||||
|
|
@ -140,6 +128,8 @@ public class EditProfileScreen extends Screen {
|
|||
if (!deleted) {
|
||||
this.profileConfiguration.setServers(this.serversEdit.getValue());
|
||||
this.profileConfiguration.save();
|
||||
|
||||
Profiles.renameProfile(profileName.getString(), this.profileNameEdit.getValue());
|
||||
}
|
||||
this.minecraft.setScreen(this.profilesScreen);
|
||||
this.profilesScreen.profilesList.refreshEntries();
|
||||
|
|
|
|||
Loading…
Reference in a new issue