com.megacrit.cardcrawl.helpers.TipHelper Java Examples

The following examples show how to use com.megacrit.cardcrawl.helpers.TipHelper. 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: ManifestTopPanelItem.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
private void renderTips() {
    ArrayList<PowerTip> tips = AbstractDungeon.player != null && AbstractDungeon.player instanceof Cull ? cullTips : nonCullTips;
    if (this.isHovered) {
        TipHelper.queuePowerTips(Math.min(this.x, TOP_RIGHT_TIP_X), TIP_Y, tips);
    }

    SlayTheRelicsIntegration.renderTipHitbox(this.hitbox, tips);
}
 
Example #2
Source File: AbstractMemory.java    From jorbs-spire-mod with MIT License 5 votes vote down vote up
private void renderTip() {
    ArrayList<PowerTip> tips = getTips();

    // Based on the AbstractCreature.renderPowerTips impl
    float tipX = centerX + hb.width / 2.0F < TIP_X_THRESHOLD ?
            centerX + hb.width / 2.0F + TIP_OFFSET_R_X :
            centerX - hb.width / 2.0F + TIP_OFFSET_L_X;

    // The calculatedAdditionalOffset ensures everything is shifted to avoid going offscreen
    float tipY = centerY + TipHelper.calculateAdditionalOffset(tips, centerY);

    TipHelper.queuePowerTips(tipX, tipY, tips);
}
 
Example #3
Source File: CommonKeywordIconsPatches.java    From StSLib with MIT License 4 votes vote down vote up
@Override
public int[] Locate(CtBehavior ctBehavior) throws Exception {
    Matcher finalMatcher = new Matcher.FieldAccessMatcher(TipHelper.class, "KEYWORDS");
    return LineFinder.findInOrder(ctBehavior, finalMatcher);
}
 
Example #4
Source File: CommonKeywordIconsPatches.java    From StSLib with MIT License 4 votes vote down vote up
@Override
public int[] Locate(CtBehavior ctBehavior) throws Exception {
    Matcher finalMatcher = new Matcher.MethodCallMatcher(TipHelper.class, "queuePowerTips");
    return LineFinder.findInOrder(ctBehavior, finalMatcher);
}