com.megacrit.cardcrawl.localization.PowerStrings Java Examples

The following examples show how to use com.megacrit.cardcrawl.localization.PowerStrings. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StaticMemoryInfo.java    From jorbs-spire-mod with MIT License 6 votes vote down vote up
private <T extends AbstractMemory> StaticMemoryInfo(Class<T> memoryClass) {
    CLASS = memoryClass;
    ID = JorbsMod.makeID(memoryClass.getSimpleName());
    PowerStrings powerStrings = CardCrawlGame.languagePack.getPowerStrings(ID);
    NAME = powerStrings.NAME;
    DESCRIPTIONS = powerStrings.DESCRIPTIONS;

    String imageFilenamePrefix = memoryClass.getSimpleName().replace("Memory","");
    CLARITY_TEXTURE_84 = TextureLoader.getTexture(makeMemoryPath("c" + imageFilenamePrefix + "_84.png"));
    CLARITY_TEXTURE_48 = TextureLoader.getTexture(makeMemoryPath("c" + imageFilenamePrefix + "_48.png"));
    EMPTY_TEXTURE_84 = TextureLoader.getTexture(makeMemoryPath("e" + imageFilenamePrefix + "_84.png"));
    EMPTY_TEXTURE_48 = TextureLoader.getTexture(makeMemoryPath("e" + imageFilenamePrefix + "_48.png"));
    REMEMBER_TEXTURE_84 = TextureLoader.getTexture(makeMemoryPath("r" + imageFilenamePrefix + "_84.png"));
    REMEMBER_TEXTURE_48 = TextureLoader.getTexture(makeMemoryPath("r" + imageFilenamePrefix + "_48.png"));

    CLARITY_IMG_84 = new TextureAtlas.AtlasRegion(CLARITY_TEXTURE_84, 0, 0, 84, 84);
    CLARITY_IMG_48 = new TextureAtlas.AtlasRegion(CLARITY_TEXTURE_48, 0, 0, 48, 48);
    EMPTY_IMG_84 = new TextureAtlas.AtlasRegion(EMPTY_TEXTURE_84, 0, 0, 84, 84);
    EMPTY_IMG_48 = new TextureAtlas.AtlasRegion(EMPTY_TEXTURE_48, 0, 0, 48, 48);
    REMEMBER_IMG_84 = new TextureAtlas.AtlasRegion(REMEMBER_TEXTURE_84, 0, 0, 84, 84);
    REMEMBER_IMG_48 = new TextureAtlas.AtlasRegion(REMEMBER_TEXTURE_48, 0, 0, 48, 48);
}
 
Example #2
Source File: StaticPowerInfo.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
private <T extends AbstractPower> StaticPowerInfo(Class<T> powerClass) {
    CLASS = powerClass;
    ID = JorbsMod.makeID(powerClass.getSimpleName());
    PowerStrings powerStrings = CardCrawlGame.languagePack.getPowerStrings(ID);
    NAME = powerStrings.NAME;
    DESCRIPTIONS = powerStrings.DESCRIPTIONS;

    String imageFilenamePrefix = powerClass.getSimpleName().replace("Power", "");
    TEXTURE_84 = TextureLoader.getTexture(makePowerPath(imageFilenamePrefix + "_84.png"));
    TEXTURE_32 = TextureLoader.getTexture(makePowerPath(imageFilenamePrefix + "_32.png"));

    IMG_84 = new AtlasRegion(TEXTURE_84, 0, 0, 84, 84);
    IMG_32 = new AtlasRegion(TEXTURE_32, 0, 0, 32, 32);
}
 
Example #3
Source File: StSLib.java    From StSLib with MIT License 5 votes vote down vote up
private void loadLangStrings(String language)
{
    String path = "localization/stslib/" + language + "/";

    BaseMod.loadCustomStringsFile(PowerStrings.class, path + "powers.json");
    BaseMod.loadCustomStringsFile(RelicStrings.class, path + "relics.json");
    try {
        BaseMod.loadCustomStringsFile(UIStrings.class, path + "ui.json");
    } catch (GdxRuntimeException ignored) {}
}