use of main.content.VALUE in project Eidolons by IDemiurge.
the class MC_ControlPanel method doEdit.
public static void doEdit(MusicList list, boolean alt) {
VALUE val = AT_PROPS.MUSIC_GENRE;
if (!alt) // choose val
{
val = std_edit_vals[DialogMaster.optionChoice(std_edit_vals, "What value to edit?")];
}
// ListChooser.chooseString(stringList);
String input = CreationHelper.getInput(val, list, list.getValue(val));
list.setValue(val, input, true);
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class MC_ControlPanel method massEdit.
public static void massEdit(boolean emptyOnly) {
List<ObjType> types = DataManager.getTypes(AT_OBJ_TYPE.MUSIC_LIST);
VALUE prop = getMassFilterValue();
if (prop != null) {
String filterValue = inputMassValue(prop);
for (ObjType sub : new ArrayList<>(types)) // if (emptyOnly) {
{
if (!sub.checkContainerProp((PROPERTY) prop, filterValue, true)) {
types.remove(sub);
}
}
// } else if (!generic.checkValue(prop, filterValue))
// types.remove(generic);
}
prop = getMassEditValue();
if (prop == null) {
return;
}
if (emptyOnly) {
for (ObjType sub : new ArrayList<>(types)) {
if (sub.checkValue(prop)) {
types.remove(sub);
}
}
}
massEdit(types, prop);
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class PromptMaster method fillOut.
public static void fillOut(ArcaneEntity entity, boolean emptyOnly) {
// entity.getOBJ_TYPE_ENUM();
for (VALUE t : CreationHelper.getRequiredValues(entity, false)) {
String value = entity.getValue(t);
if (!StringMaster.isEmpty(value)) {
if (emptyOnly) {
continue;
}
}
String input = CreationHelper.getInput(t, entity, value);
if (!StringMaster.isEmpty(input)) {
entity.setValue(value, input, true);
} else if (DialogMaster.confirm("Done?")) {
break;
} else {
entity.setValue(value, input, true);
}
}
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class InfoMaster method getOrReasonString.
public static String getOrReasonString(String value, VALUE... p) {
String string = "";
for (VALUE param : p) {
string += param.getName() + OR;
}
string = string.substring(0, string.length() - OR.length());
string += PARAM_REASON_STRING + value;
return string;
}
use of main.content.VALUE in project Eidolons by IDemiurge.
the class ValuePageManager method initMaps.
private static void initMaps(Map<OBJ_TYPE, Map<String, List<VALUE>>> pageMaps, VALUE[][][] pageArray, String[] PAGE_NAMES, boolean alt) {
for (DC_TYPE TYPE : DC_TYPE.values()) {
int i = TYPE.getCode();
if (pageArray.length <= i) {
break;
}
VALUE[][] pages = pageArray[i];
if (pages == null) {
continue;
}
List<String> pageNames = StringMaster.openContainer(PAGE_NAMES[i]);
List<List<VALUE>> pageList = new ArrayMaster<VALUE>().get2dList(pages);
Map<String, List<VALUE>> map = new MapMaster<String, List<VALUE>>().constructMap(pageNames, pageList);
if (!alt) {
map.put(DC_HEADER, Arrays.asList(ValuePages.GENERIC_DC_HEADER));
map.put(AV_HEADER, Arrays.asList(ValuePages.GENERIC_AV_HEADER));
map.put(AV_TRAILING_PAGE, Arrays.asList(ValuePages.AV_TRAILING_PAGE));
map.put(DC_TRAILING_PAGE, Arrays.asList(ValuePages.DC_TRAILING_PAGE));
}
pageMaps.put(TYPE, map);
}
}
Aggregations