forked from External/mage
added option to hide ability text overlay
This commit is contained in:
parent
436908fc75
commit
43dcd13d16
3 changed files with 41 additions and 6 deletions
|
|
@ -610,7 +610,7 @@ public class MageActionCallback implements ActionCallback {
|
|||
// XXX: scaled to fit width
|
||||
bigCard.setCard(mageCard.getOriginal().getId(), enlargeMode, image, mageCard.getOriginal().getRules(), mageCard.getOriginal().isToRotate());
|
||||
// if it's an ability, show only the ability text as overlay
|
||||
if (mageCard.getOriginal().isAbility() && enlargeMode == EnlargeMode.NORMAL) {
|
||||
if (mageCard.getOriginal().isAbility() && enlargeMode == EnlargeMode.NORMAL && isAbilityTextOverlayEnabled()) {
|
||||
bigCard.showTextComponent();
|
||||
} else {
|
||||
bigCard.hideTextComponent();
|
||||
|
|
@ -624,6 +624,10 @@ public class MageActionCallback implements ActionCallback {
|
|||
enlargeredViewOpened = new Date();
|
||||
}
|
||||
|
||||
private boolean isAbilityTextOverlayEnabled() {
|
||||
return PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_ABILITY_TEXT_OVERLAY, "true").equals("true");
|
||||
}
|
||||
|
||||
private synchronized void startHideTimeout() {
|
||||
cancelTimeout();
|
||||
hideTimeout = timeoutExecutor.schedule(this::hideEnlargedCard, 700, TimeUnit.MILLISECONDS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue