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(),
|
.build(),
|
||||||
LayoutSettings::alignHorizontallyCenter
|
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(
|
linearLayoutButtons.addChild(
|
||||||
Button.builder(
|
Button.builder(
|
||||||
Component.translatable("gui.optionsprofiles.options-toggle").append("..."),
|
Component.translatable("gui.optionsprofiles.options-toggle").append("..."),
|
||||||
|
|
@ -140,6 +128,8 @@ public class EditProfileScreen extends Screen {
|
||||||
if (!deleted) {
|
if (!deleted) {
|
||||||
this.profileConfiguration.setServers(this.serversEdit.getValue());
|
this.profileConfiguration.setServers(this.serversEdit.getValue());
|
||||||
this.profileConfiguration.save();
|
this.profileConfiguration.save();
|
||||||
|
|
||||||
|
Profiles.renameProfile(profileName.getString(), this.profileNameEdit.getValue());
|
||||||
}
|
}
|
||||||
this.minecraft.setScreen(this.profilesScreen);
|
this.minecraft.setScreen(this.profilesScreen);
|
||||||
this.profilesScreen.profilesList.refreshEntries();
|
this.profilesScreen.profilesList.refreshEntries();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue