本文整理汇总了Java中cpw.mods.fml.client.config.ConfigGuiType.STRING属性的典型用法代码示例。如果您正苦于以下问题:Java ConfigGuiType.STRING属性的具体用法?Java ConfigGuiType.STRING怎么用?Java ConfigGuiType.STRING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类cpw.mods.fml.client.config.ConfigGuiType
的用法示例。
在下文中一共展示了ConfigGuiType.STRING属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getGuiType
public static <T> ConfigGuiType getGuiType(Setting<T> setting) {
if (setting instanceof BooleanSetting) return ConfigGuiType.BOOLEAN;
else if (setting instanceof IntegerSetting) return ConfigGuiType.INTEGER;
else if (setting instanceof DoubleSetting) return ConfigGuiType.DOUBLE;
else if ((setting instanceof StringSetting) ||
(setting instanceof EnumSetting)) return ConfigGuiType.STRING;
else throw new UnsupportedOperationException("Setting type '" + setting.getClass().getSimpleName() + "' not supported.");
}
示例2: getType
public static ConfigGuiType getType(Object object) {
if (object instanceof Boolean) {
return ConfigGuiType.BOOLEAN;
} else if (object instanceof Integer) {
return ConfigGuiType.INTEGER;
} else if (object instanceof String) {
return ConfigGuiType.STRING;
} else if (object instanceof Map) {
return ConfigGuiType.CONFIG_CATEGORY;
}
return null;
}
示例3: getType
@Override
public ConfigGuiType getType()
{
ConfigGuiType type = lookup.get(field.getType().toString());
return type != null ? type : ConfigGuiType.STRING;
}
示例4: getType
public static ConfigGuiType getType(Property prop)
{
return prop.getType() == Property.Type.BOOLEAN ? ConfigGuiType.BOOLEAN : prop.getType() == Property.Type.DOUBLE ? ConfigGuiType.DOUBLE :
prop.getType() == Property.Type.INTEGER ? ConfigGuiType.INTEGER : prop.getType() == Property.Type.COLOR ? ConfigGuiType.COLOR :
prop.getType() == Property.Type.MOD_ID ? ConfigGuiType.MOD_ID : ConfigGuiType.STRING;
}