Add layouts to screens

Also minor changes and fixes:
- Localization and colors for "All ON" and "All OFF" buttons
- Code cleanup
- Change Y position for entries in list widgets
This commit is contained in:
axolotlmaid 2024-07-02 01:45:08 +01:00
parent 0b0a93dca7
commit d960950df9
10 changed files with 349 additions and 98 deletions

View file

@ -1,95 +1,112 @@
package com.axolotlmaid.optionsprofiles.gui;
import com.axolotlmaid.optionsprofiles.profiles.ProfileConfiguration;
import com.axolotlmaid.optionsprofiles.profiles.Profiles;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.Checkbox;
import net.minecraft.client.gui.components.EditBox;
import net.minecraft.client.gui.components.StringWidget;
import net.minecraft.client.gui.components.Tooltip;
import net.minecraft.client.gui.layouts.HeaderAndFooterLayout;
import net.minecraft.client.gui.layouts.LayoutSettings;
import net.minecraft.client.gui.layouts.LinearLayout;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.Component;
public class EditProfileScreen extends Screen {
private final Screen lastScreen;
private final ProfilesScreen profilesScreen;
private final HeaderAndFooterLayout layout = new HeaderAndFooterLayout(this, 24, 33);
private final Component profileName;
private EditBox profileNameEdit;
private Checkbox keybindingsOnlyCheckbox;
public EditProfileScreen(Screen screen, Component profileName) {
public EditProfileScreen(ProfilesScreen profilesScreen, Component profileName) {
super(Component.literal(Component.translatable("gui.optionsprofiles.editing-profile-title").getString() + profileName.getString()));
this.lastScreen = screen;
this.profilesScreen = profilesScreen;
this.profileName = profileName;
}
protected void init() {
ProfileConfiguration profileConfiguration = ProfileConfiguration.get(profileName.getString());
LinearLayout linearLayoutHeader = this.layout.addToHeader(LinearLayout.vertical());
linearLayoutHeader.addChild(new StringWidget(this.title, this.font), LayoutSettings::alignHorizontallyCenter);
this.profileNameEdit = new EditBox(this.font, this.width / 2 - 102, 116, 204, 20, Component.empty());
this.profileNameEdit.setValue(profileName.getString());
this.addWidget(this.profileNameEdit);
this.keybindingsOnlyCheckbox = Checkbox.builder(
Component.translatable("gui.optionsprofiles.keybindings-only"),
this.font)
.pos(5, this.height - 45)
.selected(profileConfiguration.isKeybindingsOnly())
.build();
this.addRenderableWidget(this.keybindingsOnlyCheckbox);
LinearLayout linearLayoutContent = this.layout.addToContents(LinearLayout.vertical().spacing(12), LayoutSettings::alignHorizontallyCenter);
this.addRenderableWidget(
LinearLayout linearLayoutEditBox = linearLayoutContent.addChild(LinearLayout.vertical().spacing(6), LayoutSettings::alignHorizontallyCenter);
linearLayoutEditBox.addChild(new StringWidget(Component.translatable("gui.optionsprofiles.profile-name-text"), this.font), LayoutSettings::alignHorizontallyCenter);
linearLayoutEditBox.addChild(this.profileNameEdit);
LinearLayout linearLayoutButtons = linearLayoutContent.addChild(LinearLayout.vertical().spacing(1), LayoutSettings::alignHorizontallyCenter);
linearLayoutButtons.addChild(
Button.builder(
Component.translatable("gui.optionsprofiles.overwrite-options"),
(button) -> {
Profiles.writeProfile(profileName.getString(), true);
this.minecraft.setScreen(this.lastScreen);
this.onClose();
})
.size(100, 20)
.pos(this.width / 2 - 50, 145)
.build());
this.addRenderableWidget(
.size(150, 20)
.pos(this.width / 2 - 75, 145)
.tooltip(Tooltip.create(Component.translatable("gui.optionsprofiles.overwrite-options.tooltip")))
.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(lastScreen, Component.literal(this.profileNameEdit.getValue())));
this.minecraft.setScreen(new EditProfileScreen(profilesScreen, Component.literal(this.profileNameEdit.getValue())));
})
.size(100, 20)
.pos(this.width / 2 - 50, 166)
.build());
.size(150, 20)
.pos(this.width / 2 - 75, 166)
.build(),
LayoutSettings::alignHorizontallyCenter
);
linearLayoutButtons.addChild(
Button.builder(
Component.translatable("gui.optionsprofiles.options-toggle").append("..."),
(button) -> this.minecraft.setScreen(new OptionsToggleScreen(this, profileName)))
.size(150, 20)
.pos(this.width / 2 - 75, 187)
.tooltip(Tooltip.create(Component.translatable("gui.optionsprofiles.options-toggle.tooltip")))
.build(),
LayoutSettings::alignHorizontallyCenter
);
this.addRenderableWidget(
this.layout.addToFooter(
Button.builder(
CommonComponents.GUI_DONE,
(button) -> this.onClose())
.width(200)
.build()
);
this.layout.addToFooter(
Button.builder(
Component.translatable("gui.optionsprofiles.delete-profile")
.withStyle(ChatFormatting.RED),
(button) -> {
Profiles.deleteProfile(profileName.getString());
this.minecraft.setScreen(this.lastScreen);
this.onClose();
})
.size(100, 20)
.pos(5, this.height - 25)
.build());
.width(50)
.build(),
(layoutSettings) -> layoutSettings.alignHorizontallyLeft().paddingLeft(5)
);
this.addRenderableWidget(
Button.builder(
CommonComponents.GUI_DONE,
(button) -> {
profileConfiguration.setKeybindingsOnly(keybindingsOnlyCheckbox.selected());
profileConfiguration.save();
this.minecraft.setScreen(this.lastScreen);
})
.size(100, 20)
.pos(this.width / 2 - 50, this.height - 40)
.build());
this.layout.visitWidgets(this::addRenderableWidget);
this.repositionElements();
}
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
super.render(guiGraphics, mouseX, mouseY, delta);
this.profileNameEdit.render(guiGraphics, mouseX, mouseY, delta);
guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 8, 16777215);
guiGraphics.drawCenteredString(this.font, Component.translatable("gui.optionsprofiles.profile-name-text"), this.width / 2, 100, 16777215);
protected void repositionElements() {
this.layout.arrangeElements();
}
public void onClose() {
this.minecraft.setScreen(this.profilesScreen);
this.profilesScreen.profilesList.refreshEntries();
}
}

View file

@ -0,0 +1,139 @@
package com.axolotlmaid.optionsprofiles.gui;
import com.axolotlmaid.optionsprofiles.OptionsProfilesMod;
import com.axolotlmaid.optionsprofiles.profiles.ProfileConfiguration;
import com.axolotlmaid.optionsprofiles.profiles.Profiles;
import com.google.common.collect.ImmutableList;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.ContainerObjectSelectionList;
import net.minecraft.client.gui.components.CycleButton;
import net.minecraft.client.gui.components.Tooltip;
import net.minecraft.client.gui.components.events.GuiEventListener;
import net.minecraft.client.gui.narration.NarratableEntry;
import net.minecraft.network.chat.Component;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
public class OptionsToggleList extends ContainerObjectSelectionList<OptionsToggleList.Entry> {
private final String profileName;
private final ProfileConfiguration profileConfiguration;
public OptionsToggleList(OptionsToggleScreen optionsToggleScreen, Minecraft minecraft, String profileName) {
super(minecraft, optionsToggleScreen.width, optionsToggleScreen.layout.getContentHeight(), optionsToggleScreen.layout.getHeaderHeight(), 20);
this.profileConfiguration = optionsToggleScreen.profileConfiguration;
this.profileName = profileName;
refreshEntries(false, false);
}
// If overriding boolean is set to true then this function will set every option in the list to overrideToggle (false or true)
public void refreshEntries(boolean overriding, boolean overrideToggle) {
this.clearEntries();
Path profile = Profiles.PROFILES_DIRECTORY.resolve(profileName);
Path optionsFile = profile.resolve("options.txt");
if (overriding) {
if (!overrideToggle) { // If set to false, just set the list to nothing instead of removing them one by one.
profileConfiguration.setOptionsToLoad(new ArrayList<>());
}
}
try (Stream<String> lines = Files.lines(optionsFile)) {
lines.forEach((line) -> {
String[] option = line.split(":");
if (option.length > 1) { // If the option value exists (e.g. "lastServer")
if (overrideToggle) { // We don't need to check for the overriding boolean since this should never be true while the overriding boolean is false.
List<String> optionsToLoad = profileConfiguration.getOptionsToLoad();
optionsToLoad.add(option[0]); // Add every option because overrideToggle is set to true
profileConfiguration.setOptionsToLoad(optionsToLoad); // Configuration is saved in the OptionsToggleScreen.java when the player presses "Done"
}
// Add entry with option key and value and if the key is in the profile configuration
this.addEntry(new OptionEntry(option[0], option[1], profileConfiguration.getOptionsToLoad().contains(option[0])));
} else {
this.addEntry(new OptionEntry(option[0], "", profileConfiguration.getOptionsToLoad().contains(option[0])));
}
});
} catch (IOException e) {
OptionsProfilesMod.LOGGER.error("An error occurred when listing options", e);
}
}
protected int getScrollbarPosition() {
return super.getScrollbarPosition() + 15;
}
public int getRowWidth() {
return 340;
}
public class OptionEntry extends Entry {
private final Component optionKey;
private final CycleButton<Boolean> toggleButton;
OptionEntry(String optionKey, String optionValue, boolean toggled) {
this.optionKey = Component.literal(optionKey);
this.toggleButton = CycleButton.onOffBuilder(toggled).displayOnlyValue().create(0, 0, 44, 20, Component.empty(), (button, boolean_) -> {
List<String> optionsToLoad = profileConfiguration.getOptionsToLoad();
// If toggled to true
if (boolean_) {
button.setMessage(button.getMessage().copy().withStyle(ChatFormatting.GREEN)); // Set the button's color to green
optionsToLoad.add(optionKey);
} else {
button.setMessage(button.getMessage().copy().withStyle(ChatFormatting.RED)); // Set the button's color to red
optionsToLoad.remove(optionKey);
}
profileConfiguration.setOptionsToLoad(optionsToLoad);
});
// Set tooltip to the option value (e.g. "ao" will show "true")
this.toggleButton.setTooltip(Tooltip.create(Component.literal(optionValue)));
if (toggled) {
this.toggleButton.setMessage(this.toggleButton.getMessage().copy().withStyle(ChatFormatting.GREEN)); // Set the button's color to green
} else {
this.toggleButton.setMessage(this.toggleButton.getMessage().copy().withStyle(ChatFormatting.RED)); // Set the button's color to red
}
}
public void render(GuiGraphics guiGraphics, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
Font fontRenderer = OptionsToggleList.this.minecraft.font;
int posX = OptionsToggleList.this.getScrollbarPosition() - this.toggleButton.getWidth() - 10;
int posY = y - 2;
int textY = y + entryHeight / 2;
guiGraphics.drawString(fontRenderer, this.optionKey, x, textY - 9 / 2, 16777215, false);
this.toggleButton.setPosition(posX, posY);
this.toggleButton.render(guiGraphics, mouseX, mouseY, tickDelta);
}
public List<? extends GuiEventListener> children() {
return ImmutableList.of(this.toggleButton);
}
public List<? extends NarratableEntry> narratables() {
return ImmutableList.of(this.toggleButton);
}
}
public abstract static class Entry extends ContainerObjectSelectionList.Entry<OptionsToggleList.Entry> {
public Entry() {
}
}
}

View file

@ -0,0 +1,65 @@
package com.axolotlmaid.optionsprofiles.gui;
import com.axolotlmaid.optionsprofiles.profiles.ProfileConfiguration;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.layouts.LinearLayout;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.options.OptionsSubScreen;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.Component;
public class OptionsToggleScreen extends OptionsSubScreen {
private final Component profileName;
private OptionsToggleList optionsToggleList;
public ProfileConfiguration profileConfiguration;
protected OptionsToggleScreen(Screen lastScreen, Component profileName) {
super(lastScreen, null, Component.literal(Component.translatable("gui.optionsprofiles.options-toggle").append(": ").getString() + profileName.getString()));
this.profileName = profileName;
this.profileConfiguration = ProfileConfiguration.get(profileName.getString());
}
protected void addOptions() {}
protected void addContents() {
this.layout.setHeaderHeight(24);
this.optionsToggleList = this.layout.addToContents(new OptionsToggleList(this, this.minecraft, profileName.getString()));
}
protected void addFooter() {
LinearLayout linearLayout = this.layout.addToFooter(LinearLayout.horizontal().spacing(8));
LinearLayout linearLayoutAllButtons = linearLayout.addChild(LinearLayout.horizontal().spacing(1));
linearLayoutAllButtons.addChild(
Button.builder(
Component.translatable("gui.optionsprofiles.all-off").withStyle(ChatFormatting.RED),
(button) -> this.optionsToggleList.refreshEntries(true, false))
.size(75, 20)
.build()
);
linearLayoutAllButtons.addChild(
Button.builder(
Component.translatable("gui.optionsprofiles.all-on").withStyle(ChatFormatting.GREEN),
(button) -> this.optionsToggleList.refreshEntries(true, true))
.size(75, 20)
.build()
);
linearLayout.addChild(
Button.builder(
CommonComponents.GUI_DONE,
(button -> this.onClose())
).build()
);
}
public void removed() {
profileConfiguration.save();
}
protected void repositionElements() {
this.layout.arrangeElements();
this.optionsToggleList.updateSize(this.width, this.layout);
}
}

View file

@ -1,6 +1,7 @@
package com.axolotlmaid.optionsprofiles.gui;
import com.axolotlmaid.optionsprofiles.OptionsProfilesMod;
import com.axolotlmaid.optionsprofiles.profiles.ProfileConfiguration;
import com.axolotlmaid.optionsprofiles.profiles.Profiles;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.Minecraft;
@ -15,15 +16,15 @@ import net.minecraft.network.chat.Component;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entry> {
final ProfilesScreen profilesScreen;
private final ProfilesScreen profilesScreen;
public ProfilesList(ProfilesScreen profilesScreen, Minecraft minecraft) {
super(minecraft, profilesScreen.width + 45, profilesScreen.height - 52, 20, 20);
super(minecraft, profilesScreen.width, profilesScreen.layout.getContentHeight(), profilesScreen.layout.getHeaderHeight(), 20);
this.profilesScreen = profilesScreen;
refreshEntries();
@ -32,10 +33,16 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
public void refreshEntries() {
this.clearEntries();
Path profilesDirectory = Paths.get("options-profiles/");
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(profilesDirectory)) {
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(Profiles.PROFILES_DIRECTORY)) {
List<Path> profileList = new ArrayList<>();
for (Path profile : directoryStream) {
profileList.add(profile);
}
// Sort the list alphabetically based on the profile names
profileList.sort(Comparator.comparing(p -> p.getFileName().toString()));
for (Path profile : profileList) {
this.addEntry(new ProfilesList.ProfileEntry(Component.literal(profile.getFileName().toString())));
}
} catch (Exception e) {
@ -48,7 +55,7 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
}
public int getRowWidth() {
return super.getRowWidth() + 32;
return 340;
}
public class ProfileEntry extends Entry {
@ -71,8 +78,11 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
Profiles.loadProfile(profileName.getString());
minecraft.options.load();
minecraft.options.loadSelectedResourcePacks(minecraft.getResourcePackRepository());
minecraft.reloadResourcePacks();
if (ProfileConfiguration.get(profileName.getString()).getOptionsToLoad().contains("resourcePacks")) {
minecraft.options.loadSelectedResourcePacks(minecraft.getResourcePackRepository());
minecraft.reloadResourcePacks();
}
minecraft.options.save();
@ -87,17 +97,16 @@ public class ProfilesList extends ContainerObjectSelectionList<ProfilesList.Entr
public void render(GuiGraphics guiGraphics, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
Font fontRenderer = ProfilesList.this.minecraft.font;
int posX = ProfilesList.this.getScrollbarPosition() - this.loadButton.getWidth() - 10;
int posY = y - 2;
int textY = y + entryHeight / 2;
Objects.requireNonNull(ProfilesList.this.minecraft.font);
guiGraphics.drawString(fontRenderer, this.profileName, x - 50, textY - 9 / 2, 16777215, false);
guiGraphics.drawString(fontRenderer, this.profileName, x, textY - 9 / 2, 16777215, false);
this.editButton.setX(x + 115);
this.editButton.setY(y);
this.editButton.setPosition(posX - this.editButton.getWidth(), posY);
this.editButton.render(guiGraphics, mouseX, mouseY, tickDelta);
this.loadButton.setX(x + 190);
this.loadButton.setY(y);
this.loadButton.setPosition(posX, posY);
this.loadButton.render(guiGraphics, mouseX, mouseY, tickDelta);
}

View file

@ -1,48 +1,48 @@
package com.axolotlmaid.optionsprofiles.gui;
import com.axolotlmaid.optionsprofiles.profiles.Profiles;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.layouts.LinearLayout;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.options.OptionsSubScreen;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.Component;
public class ProfilesScreen extends Screen {
private final Screen lastScreen;
private ProfilesList profilesList;
public class ProfilesScreen extends OptionsSubScreen {
public ProfilesList profilesList;
public ProfilesScreen(Screen screen) {
super(Component.translatable("gui.optionsprofiles.profiles-menu"));
this.lastScreen = screen;
public ProfilesScreen(Screen lastScreen) {
super(lastScreen, null, Component.translatable("gui.optionsprofiles.profiles-menu"));
}
protected void init() {
this.profilesList = new ProfilesList(this, this.minecraft);
this.addWidget(this.profilesList);
protected void addOptions() {}
this.addRenderableWidget(
protected void addContents() {
this.layout.setHeaderHeight(24);
this.profilesList = this.layout.addToContents(new ProfilesList(this, this.minecraft));
}
protected void addFooter() {
LinearLayout linearLayout = this.layout.addToFooter(LinearLayout.horizontal().spacing(8));
linearLayout.addChild(
Button.builder(
Component.translatable("gui.optionsprofiles.save-current-options"),
(button) -> {
(button -> {
Profiles.createProfile();
this.profilesList.refreshEntries();
})
.size(150, 20)
.pos(this.width / 2 - 155, this.height - 29)
.build());
this.addRenderableWidget(
}))
.build()
);
linearLayout.addChild(
Button.builder(
CommonComponents.GUI_DONE,
(button) -> this.minecraft.setScreen(this.lastScreen))
.size(150, 20)
.pos(this.width / 2 + 5, this.height - 29)
.build());
(button -> this.onClose()))
.build()
);
}
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
super.render(guiGraphics, mouseX, mouseY, delta);
this.profilesList.render(guiGraphics, mouseX, mouseY, delta);
guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 8, 16777215);
protected void repositionElements() {
this.layout.arrangeElements();
this.profilesList.updateSize(this.width, this.layout);
}
}

View file

@ -24,6 +24,7 @@ public class MixinOptionsScreen extends Screen {
(button) -> this.minecraft.setScreen(new ProfilesScreen(this)))
.width(100)
.pos(5, 5)
.build());
.build()
);
}
}

View file

@ -7,7 +7,12 @@
"gui.optionsprofiles.editing-profile-title": "Editing Profile: ",
"gui.optionsprofiles.profile-name-text": "Profile Name",
"gui.optionsprofiles.overwrite-options": "Overwrite",
"gui.optionsprofiles.overwrite-options.tooltip": "Replaces the profile's options with your current options",
"gui.optionsprofiles.rename-profile": "Rename",
"gui.optionsprofiles.keybindings-only": "Keybindings Only",
"gui.optionsprofiles.delete-profile": "Delete"
"gui.optionsprofiles.delete-profile": "Delete",
"gui.optionsprofiles.options-toggle": "Select options to toggle",
"gui.optionsprofiles.options-toggle.tooltip": "Select the options you want to load in this profile",
"gui.optionsprofiles.all-on": "All ON",
"gui.optionsprofiles.all-off": "All OFF"
}

View file

@ -7,10 +7,15 @@
"gui.optionsprofiles.editing-profile-title": "Изменение профиля: ",
"gui.optionsprofiles.profile-name-text": "Имя профиля",
"gui.optionsprofiles.overwrite-options": "Перезаписать",
"gui.optionsprofiles.overwrite-options.tooltip": "Заменяет параметры профиля на ваши текущие параметры",
"gui.optionsprofiles.rename-profile": "Переименовать",
"gui.optionsprofiles.keybindings-only": "Только элементы управления",
"gui.optionsprofiles.delete-profile": "удалить",
"gui.optionsprofiles.options-toggle": "Выберите параметры для переключения",
"gui.optionsprofiles.options-toggle.tooltip": "Выберите параметры, которые вы хотите загрузить в этот профиль",
"gui.optionsprofiles.all-on": "Включи всё",
"gui.optionsprofiles.all-off": "Все выключить",
"modmenu.summaryTranslation.options-profiles": "Cохраняйте и загружайте профили настроек, не выходя из игры.",
"modmenu.descriptionTranslation.options-profiles": "Мод, позволяющий сохранять профили текущих настроек и загружать их, не выходя из игры."
}

View file

@ -7,10 +7,15 @@
"gui.optionsprofiles.editing-profile-title": "Профильне үзгәртү: ",
"gui.optionsprofiles.profile-name-text": "Профиль исеме",
"gui.optionsprofiles.overwrite-options": "перезапись",
"gui.optionsprofiles.overwrite-options.tooltip": "Профиль вариантларын хәзерге вариантларыгыз белән алыштыра",
"gui.optionsprofiles.rename-profile": "переименовывать",
"gui.optionsprofiles.keybindings-only": "Контрольләр генә",
"gui.optionsprofiles.delete-profile": "бетерү",
"gui.optionsprofiles.options-toggle": "Күчерү вариантларын сайлагыз",
"gui.optionsprofiles.options-toggle.tooltip": "Бу профильгә йөгерергә теләгән вариантларны сайлагыз",
"gui.optionsprofiles.all-on": "Барысын да кабызыгыз",
"gui.optionsprofiles.all-off": "Барысын да сүндерегез",
"modmenu.summaryTranslation.options-profiles": "Хәзерге көйләүләр профильләрен саклагыз һәм уеннан чыгусыз йөкләгез.",
"modmenu.descriptionTranslation.options-profiles": "Хәзерге көйләүләр профильләрен сакларга һәм уеннан чыгусыз йөкләргә рөхсәт итә торган мод."
}

View file

@ -7,7 +7,12 @@
"gui.optionsprofiles.editing-profile-title": "正在编辑:",
"gui.optionsprofiles.profile-name-text": "预设名",
"gui.optionsprofiles.overwrite-options": "覆盖",
"gui.optionsprofiles.overwrite-options.tooltip": "将配置文件选项替换为您当前的选项",
"gui.optionsprofiles.rename-profile": "重命名",
"gui.optionsprofiles.keybindings-only": "仅按键绑定",
"gui.optionsprofiles.delete-profile": "删除"
"gui.optionsprofiles.delete-profile": "删除",
"gui.optionsprofiles.options-toggle": "选择要切换的选项",
"gui.optionsprofiles.options-toggle.tooltip": "选择您要加载到此配置文件中的选项",
"gui.optionsprofiles.all-on": "全部开启",
"gui.optionsprofiles.all-off": "关掉一切"
}