Skip to content

Commit

Permalink
Set default value for StringSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
Big-Iron-Cheems committed May 3, 2024
1 parent 31aafaa commit 513d99f
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static class Builder extends SettingBuilder<Builder, String, StringSettin
private boolean wide;

public Builder() {
super(null);
super("");
}

public Builder renderer(Class<? extends WTextBox.Renderer> renderer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public class TextHud extends HudElement {
.name("condition")
.description("Condition to check when shown is not Always.")
.visible(() -> shown.get() != Shown.Always)
.defaultValue("")
.onChanged(s -> recompile())
.renderer(StarscriptTextBoxRenderer.class)
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class Macro implements ISerializable<Macro> {
public Setting<String> name = sgGeneral.add(new StringSetting.Builder()
.name("name")
.description("The name of the macro.")
.defaultValue("")
.build()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ public abstract class BaseMarker implements ISerializable<BaseMarker> {
public final Setting<String> name = sgBase.add(new StringSetting.Builder()
.name("name")
.description("Custom name for this marker.")
.defaultValue("")
.build()
);

protected final Setting<String> description = sgBase.add(new StringSetting.Builder()
.name("description")
.description("Custom description for this marker.")
.defaultValue("")
.build()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class Profile implements ISerializable<Profile> {
public Setting<String> name = sgGeneral.add(new StringSetting.Builder()
.name("name")
.description("The name of the profile.")
.defaultValue("")
.filter(Utils::nameFilter)
.build()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class Proxy implements ISerializable<Proxy> {
public Setting<String> name = sgGeneral.add(new StringSetting.Builder()
.name("name")
.description("The name of the proxy.")
.defaultValue("")
.build()
);

Expand All @@ -37,7 +36,6 @@ public class Proxy implements ISerializable<Proxy> {
public Setting<String> address = sgGeneral.add(new StringSetting.Builder()
.name("address")
.description("The ip address of the proxy.")
.defaultValue("")
.filter(Utils::ipFilter)
.build()
);
Expand All @@ -64,14 +62,12 @@ public class Proxy implements ISerializable<Proxy> {
public Setting<String> username = sgOptional.add(new StringSetting.Builder()
.name("username")
.description("The username of the proxy.")
.defaultValue("")
.build()
);

public Setting<String> password = sgOptional.add(new StringSetting.Builder()
.name("password")
.description("The password of the proxy.")
.defaultValue("")
.visible(() -> type.get().equals(ProxyType.Socks5))
.build()
);
Expand Down

0 comments on commit 513d99f

Please sign in to comment.