Skip to content

Commit

Permalink
Tabbed config
Browse files Browse the repository at this point in the history
  • Loading branch information
Madis0 committed Dec 4, 2021
1 parent f119df2 commit 4c2329b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ A: Because it's big, gets updated a lot and you probably have a mod or two that

**Q: How do I edit the colors?**

A: Click Esc -> Mods -> OneBar -> config button. Then, for each color field you can use [this tool](https://htmlcolorcodes.com/color-picker/) for choosing a color and [this list](https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4#all-hex-value-from-100-to-0-alpha) for choosing the transparency.
A: Click Esc -> Mods -> OneBar -> config button. Colors are formatted as opacity + RGB in HEX, so choose an opacity from [this list](https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4#all-hex-value-from-100-to-0-alpha) and use [any HEX color picker](https://rgbacolorpicker.com/hex-color-picker) for choosing a color. For example if I want 80% opacity (`CC`) on blue (`0000FF`), I will enter `#CC0000FF`.

**Q: Forge support?**

Expand Down
15 changes: 10 additions & 5 deletions src/main/java/io/github/madis0/ModConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ public class ModConfig implements ConfigData {
@ConfigEntry.ColorPicker(allowAlpha = true)
public int backgroundColor = 0xFF000000;

@ConfigEntry.Gui.CollapsibleObject
@ConfigEntry.Category("textSettings")
@ConfigEntry.Gui.TransitiveObject
public TextSettings textSettings = new TextSettings();
@ConfigEntry.Gui.CollapsibleObject
@ConfigEntry.Category("goodThings")
@ConfigEntry.Gui.TransitiveObject
public GoodThings goodThings = new GoodThings();
@ConfigEntry.Gui.CollapsibleObject
@ConfigEntry.Category("badThings")
@ConfigEntry.Gui.TransitiveObject
public BadThings badThings = new BadThings();
@ConfigEntry.Gui.CollapsibleObject
@ConfigEntry.Category("entity")
@ConfigEntry.Gui.TransitiveObject
public Entity entity = new Entity();
@ConfigEntry.Gui.CollapsibleObject
@ConfigEntry.Category("otherBars")
@ConfigEntry.Gui.TransitiveObject
public OtherBars otherBars = new OtherBars();

public static class TextSettings {
Expand Down
13 changes: 7 additions & 6 deletions src/main/resources/assets/onebar/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,32 @@
"text.onebar.fireEmoji": "\uD83D\uDD25%s×",
"text.onebar.hardcoreEmoji": "\u2620",
"text.autoconfig.onebar.title": "OneBar configuration",
"text.autoconfig.onebar.category.default": "General",
"text.autoconfig.onebar.option.showOneBar": "Show OneBar",
"text.autoconfig.onebar.option.healthEstimates": "Estimates for potion and natural effects",
"text.autoconfig.onebar.option.healthEstimates.@Tooltip": "Toggles the texts and bars for (natural) regeneration, hunger effect, poison etc.",
"text.autoconfig.onebar.option.uhcMode": "UHC mode (disable natural regen estimate)",
"text.autoconfig.onebar.option.disableHunger": "Disable hunger (for minigames)",
"text.autoconfig.onebar.option.disableHunger.@Tooltip": "Hides the hunger bar/text, hunger effect and starvation estimates etc.",
"text.autoconfig.onebar.option.backgroundColor.@PrefixText": "Every color is preceded by the opacity value in hex, see mod page for help",
"text.autoconfig.onebar.option.backgroundColor.@PrefixText": "§8Every color is preceded by the opacity value in hex, see mod page for help",
"text.autoconfig.onebar.option.backgroundColor": "Background color",
"text.autoconfig.onebar.option.textSettings": "Text settings",
"text.autoconfig.onebar.category.textSettings": "Text",
"text.autoconfig.onebar.option.textSettings.showText": "Show numbers and symbols on OneBar",
"text.autoconfig.onebar.option.textSettings.showText.@Tooltip": "Disabling will still show absorption and hardcore indicators",
"text.autoconfig.onebar.option.textSettings.textColor": "Text color",
"text.autoconfig.onebar.option.textSettings.estimatesItalic": "Show effect estimates (if enabled) in §oitalic§r",
"text.autoconfig.onebar.option.textSettings.estimatesParentheses": "Show parentheses around effect estimates (if enabled) where needed",
"text.autoconfig.onebar.option.textSettings.useEmoji": "Use emoji instead of letters (e.g. \uD83D\uDD25 instead of b)",
"text.autoconfig.onebar.option.textSettings.useFractions": "Vanilla-like fractions (e.g 9,5 instead of 19)",
"text.autoconfig.onebar.option.goodThings": "Good effects and states",
"text.autoconfig.onebar.category.goodThings": "Good effects",
"text.autoconfig.onebar.option.goodThings.healthColor": "Health color",
"text.autoconfig.onebar.option.goodThings.naturalRegenerationColor": "Natural regeneration color",
"text.autoconfig.onebar.option.goodThings.regenerationColor": "Regeneration effect color",
"text.autoconfig.onebar.option.goodThings.showResistance": "Resistance percent",
"text.autoconfig.onebar.option.goodThings.heldFoodHungerBar": "Food level restoration by held food (overlay on hunger bar)",
"text.autoconfig.onebar.option.goodThings.heldFoodHungerWasteColor": "Food level restoration color: wasted",
"text.autoconfig.onebar.option.goodThings.heldFoodHungerGoodColor": "Food level restoration color: exact or less",
"text.autoconfig.onebar.option.badThings": "Bad effects and states",
"text.autoconfig.onebar.category.badThings": "Bad effects",
"text.autoconfig.onebar.option.badThings.hungerColor": "Hunger color",
"text.autoconfig.onebar.option.badThings.hungerEffectColor": "Hunger effect color",
"text.autoconfig.onebar.option.badThings.showHungerDecreasing": "Show ↓ when you're getting hungrier by activities (zero saturation)",
Expand All @@ -45,11 +46,11 @@
"text.autoconfig.onebar.option.badThings.fireColor": "Burning color",
"text.autoconfig.onebar.option.badThings.poisonColor": "Poison color",
"text.autoconfig.onebar.option.badThings.witherColor": "Wither color",
"text.autoconfig.onebar.option.entity": "Ridable entities",
"text.autoconfig.onebar.category.entity": "Ridable entities",
"text.autoconfig.onebar.option.entity.healthColor": "Health color",
"text.autoconfig.onebar.option.entity.showHorseJump": "Horse jump bar (vertical bar below crosshair)",
"text.autoconfig.onebar.option.entity.jumpColor": "Jump color",
"text.autoconfig.onebar.option.otherBars": "Other bars",
"text.autoconfig.onebar.category.otherBars": "Other bars",
"text.autoconfig.onebar.option.otherBars.xpColor": "Experience level number/bar color",
"text.autoconfig.onebar.option.otherBars.showArmorBar": "Armor bar (thin bar above OneBar, also for ridden horses)",
"text.autoconfig.onebar.option.otherBars.armorColor": "Armor color",
Expand Down
13 changes: 7 additions & 6 deletions src/main/resources/assets/onebar/lang/et_ee.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,32 @@
"text.onebar.fire": "p%s×",
"text.onebar.hardcore": "HR",
"text.autoconfig.onebar.title": "OneBar seadistus",
"text.autoconfig.onebar.category.default": "Üldine",
"text.autoconfig.onebar.option.showOneBar": "Kuva OneBar",
"text.autoconfig.onebar.option.healthEstimates": "Võlujoogi- ja loomulike mõjude ennustused",
"text.autoconfig.onebar.option.healthEstimates.@Tooltip": "Lülitab (loomuliku) taastumise, näljamõju, mürgi jt väärtuseid ja ribasid",
"text.autoconfig.onebar.option.uhcMode": "UHC-režiim (keela loomuliku taastumise ennustus)",
"text.autoconfig.onebar.option.disableHunger": "Keela nälg (minimängude jaoks)",
"text.autoconfig.onebar.option.disableHunger.@Tooltip": "Peidab näljariba/-teksti, näljaefekti ja nälja tervise ennutuse jne",
"text.autoconfig.onebar.option.backgroundColor.@PrefixText": "Iga värvi ees on läbipaistmatuse väärtus kuueteistkümnendsüsteemis, vt abi saamiseks modi lehte",
"text.autoconfig.onebar.option.backgroundColor.@PrefixText": "§8Iga värvi ees on läbipaistmatuse väärtus kuueteistkümnendsüsteemis, vt abi saamiseks modi lehte",
"text.autoconfig.onebar.option.backgroundColor": "Tausta värv",
"text.autoconfig.onebar.option.textSettings": "Teksti sätted",
"text.autoconfig.onebar.category.textSettings": "Tekst",
"text.autoconfig.onebar.option.textSettings.showText": "Kuva OneBaril arve ja sümboleid",
"text.autoconfig.onebar.option.textSettings.showText.@Tooltip": "Keelamine kuvab siiski neeldumise ja halastamatu režiimi tähiseid",
"text.autoconfig.onebar.option.textSettings.textColor": "Teksti värv",
"text.autoconfig.onebar.option.textSettings.estimatesItalic": "Kuva mõjude ennustusi (kui lubatud) §okaldkirjas§r",
"text.autoconfig.onebar.option.textSettings.estimatesParentheses": "Kuva mõjude ennustuste (kui lubatud) ümber vajadusel sulgusid",
"text.autoconfig.onebar.option.textSettings.useEmoji": "Kasuta tähtede asemel emojisid (nt p asemel \uD83D\uDD25)",
"text.autoconfig.onebar.option.textSettings.useFractions": "Vanillisarnased murdarvud (nt 19 asemel 9,5)",
"text.autoconfig.onebar.option.goodThings": "Head mõjud ja olekud",
"text.autoconfig.onebar.category.goodThings": "Head mõjud",
"text.autoconfig.onebar.option.goodThings.healthColor": "Tervise värv",
"text.autoconfig.onebar.option.goodThings.naturalRegenerationColor": "Loomuliku taastumise värv",
"text.autoconfig.onebar.option.goodThings.regenerationColor": "Taastumise mõju värv",
"text.autoconfig.onebar.option.goodThings.showResistance": "Vastupanu protsent",
"text.autoconfig.onebar.option.goodThings.heldFoodHungerBar": "Toidutaseme taastamine käesoleva toiduga (ülekate näljariba peal)",
"text.autoconfig.onebar.option.goodThings.heldFoodHungerWasteColor": "Toidutaseme taastamise värv: raisatud",
"text.autoconfig.onebar.option.goodThings.heldFoodHungerGoodColor": "Toidutaseme taastamise värv: täpne või vähem",
"text.autoconfig.onebar.option.badThings": "Halvad mõjud ja olekud",
"text.autoconfig.onebar.category.badThings": "Halvad mõjud",
"text.autoconfig.onebar.option.badThings.hungerColor": "Nälja värv",
"text.autoconfig.onebar.option.badThings.hungerEffectColor": "Näljamõju värv",
"text.autoconfig.onebar.option.badThings.showHungerDecreasing": "Kuva ↓, kui muutud tegevustega näljasemaks (küllastus on null)",
Expand All @@ -40,11 +41,11 @@
"text.autoconfig.onebar.option.badThings.fireColor": "Põlemise värv",
"text.autoconfig.onebar.option.badThings.poisonColor": "Mürgi värv",
"text.autoconfig.onebar.option.badThings.witherColor": "Närbumise värv",
"text.autoconfig.onebar.option.entity": "Ratsutatavad olemid",
"text.autoconfig.onebar.category.entity": "Ratsutatavad olemid",
"text.autoconfig.onebar.option.entity.healthColor": "Tervise värv",
"text.autoconfig.onebar.option.entity.showHorseJump": "Hobuse hüpperiba (vertikaalne riba sihtimisristi all)",
"text.autoconfig.onebar.option.entity.jumpColor": "Hüppe värv",
"text.autoconfig.onebar.option.otherBars": "Muud ribad",
"text.autoconfig.onebar.category.otherBars": "Muud ribad",
"text.autoconfig.onebar.option.otherBars.xpColor": "Kogemustasemete arvu/riba värv",
"text.autoconfig.onebar.option.otherBars.showArmorBar": "Rüüriba (õhuke riba OneBari kohal, ka ratsutataval hobusel)",
"text.autoconfig.onebar.option.otherBars.armorColor": "Rüü värv",
Expand Down

0 comments on commit 4c2329b

Please sign in to comment.