Skip to content

Commit

Permalink
Fix Feature Toggle widths
Browse files Browse the repository at this point in the history
  • Loading branch information
sakura-ryoko committed Dec 2, 2024
1 parent 581a029 commit ee5167d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ author = masa
mod_file_name = tweakeroo-fabric

# Current mod version
mod_version = 0.21.54
mod_version = 0.21.55

# Required malilib version
malilib_version = 1f6f19c122
malilib_version = a4f54b1e67

# Minecraft, Fabric Loader and API and mappings versions
minecraft_version_out = 1.21
Expand Down
41 changes: 20 additions & 21 deletions src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ public String getName()
@Override
public String getConfigGuiDisplayName()
{
// This doesn't get called ?
String name = StringUtils.getTranslatedOrFallback(this.translatedName, this.name);

if (this.singlePlayer)
Expand All @@ -269,6 +268,26 @@ public String getPrettyName()
!this.prettyName.isEmpty() ? this.prettyName : StringUtils.splitCamelCase(this.name.substring(5)));
}

@Override
public String getComment()
{
String comment = StringUtils.getTranslatedOrFallback(this.comment, this.comment);

if (comment != null && this.singlePlayer)
{
return comment + "\n" + StringUtils.translate("tweakeroo.label.config_comment.single_player_only");
}

//System.out.printf("FeatureToggle#getComment(): comment [%s] // test [%s]\n", this.comment, comment);
return comment;
}

@Override
public String getTranslatedName()
{
return StringUtils.getTranslatedOrFallback(this.translatedName, this.name);
}

@Override
public String getStringValue()
{
Expand Down Expand Up @@ -301,26 +320,6 @@ public void setValueChangeCallback(IValueChangeCallback<IConfigBoolean> callback
this.callback = callback;
}

@Override
public String getComment()
{
String comment = StringUtils.getTranslatedOrFallback(this.comment, this.comment);

if (comment != null && this.singlePlayer)
{
return comment + "\n" + StringUtils.translate("tweakeroo.label.config_comment.single_player_only");
}

//System.out.printf("FeatureToggle#getComment(): comment [%s] // test [%s]\n", this.comment, comment);
return comment;
}

@Override
public String getTranslatedName()
{
return this.translatedName;
}

@Override
public void setPrettyName(String s)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@

"depends": {
"minecraft": ">=1.21 <=1.21.1",
"malilib": ">=0.21.3"
"malilib": ">=0.21.4"
}
}

0 comments on commit ee5167d

Please sign in to comment.