Skip to content

Commit

Permalink
testing pref name vs label.
Browse files Browse the repository at this point in the history
  • Loading branch information
riverwanderer committed Sep 25, 2023
1 parent e4150ad commit 1ca5b0a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions vassal-app/src/main/java/VASSAL/build/module/PlayerRoster.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,19 +276,25 @@ public void addTo(Buildable b) {
// Module control features: set required string prefs so that module designers don't need to.
// Designers will be able to use Set Global Property without further set up.
final String Demo = "Demo";
final BooleanConfigurer bConfig = new BooleanConfigurer(VassalRandomSide, VassalRandomSide, false);
final BooleanConfigurer bConfig = new BooleanConfigurer(VassalRandomSide, "Random", false);
pr.addOption(Demo, bConfig);
StringConfigurer sConfig = new StringConfigurer(VassalForceSide, VassalForceSide, null);
StringConfigurer sConfig = new StringConfigurer(VassalForceSide, "Force", null);
pr.addOption(Demo, sConfig);
// testing this works
sConfig = new StringConfigurer("TestCfg", "TestCfg", "this tests out lovely");
sConfig = new StringConfigurer("TestCfg", "Test Cfg", "this tests out lovely");
pr.addOption(Demo, sConfig);
sConfig = new StringConfigurer("TestCfg2", "TestCfg2", "this tests out better");
sConfig = new StringConfigurer("TestCfg2", "Test Cfg2", "this tests out better");
pr.addOption(Demo, sConfig);
// Initialise otherwise values might persist
pr.setValue(VassalRandomSide, false);
pr.setValue(VassalForceSide, "");

final String VSQL = "VSQL Preferences";
final String RULE_LEVEL = "ruleLevel";
int ruleLevel = 3;
final StringConfigurer ruleLevelcfg = new StringConfigurer (RULE_LEVEL, "Rule Level", ruleLevel);
GameModule.getGameModule().getPrefs().addOption(VSQL, ruleLevelcfg);

super.addTo(b);
}

Expand Down

0 comments on commit 1ca5b0a

Please sign in to comment.