mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Fix display
This commit is contained in:
@@ -541,11 +541,13 @@ public class RewardActor extends Actor implements Disposable, ImageFetcher.Callb
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dragStop(InputEvent event, float x, float y, int pointer) {
|
public void dragStop(InputEvent event, float x, float y, int pointer) {
|
||||||
float deltaY = y - startY;
|
isDragging = false;
|
||||||
|
|
||||||
|
if (!frontSideUp() || !hover)
|
||||||
|
return;
|
||||||
|
|
||||||
|
float deltaY = y - startY;
|
||||||
if (deltaY < 0) {
|
if (deltaY < 0) {
|
||||||
isDragging = false;
|
|
||||||
SoundSystem.instance.play(SoundEffectType.FlipCard, false);
|
|
||||||
shouldDisplayText = !shouldDisplayText;
|
shouldDisplayText = !shouldDisplayText;
|
||||||
switchTooltip();
|
switchTooltip();
|
||||||
}
|
}
|
||||||
@@ -601,9 +603,11 @@ public class RewardActor extends Actor implements Disposable, ImageFetcher.Callb
|
|||||||
|
|
||||||
tooltip.setActor(new ComplexTooltip(new RewardImage(processDrawable(alt))));
|
tooltip.setActor(new ComplexTooltip(new RewardImage(processDrawable(alt))));
|
||||||
} else {
|
} else {
|
||||||
|
T = renderPlaceholder(new Graphics(), reward.getCard(), false);
|
||||||
|
|
||||||
RewardImage image = shouldDisplayText
|
RewardImage image = shouldDisplayText
|
||||||
? new RewardImage(processDrawable(T))
|
? new RewardImage(processDrawable(T))
|
||||||
: toolTipImage;
|
: toolTipImage;
|
||||||
|
|
||||||
if (image == null)
|
if (image == null)
|
||||||
return;
|
return;
|
||||||
@@ -1000,11 +1004,11 @@ public class RewardActor extends Actor implements Disposable, ImageFetcher.Callb
|
|||||||
x = -getWidth() / 2;
|
x = -getWidth() / 2;
|
||||||
}
|
}
|
||||||
if (Reward.Type.Card.equals(reward.getType())) {
|
if (Reward.Type.Card.equals(reward.getType())) {
|
||||||
if (T == null) {
|
|
||||||
T = renderPlaceholder(new Graphics(), reward.getCard(), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!loaded || image == null) {
|
if (!loaded || image == null) {
|
||||||
|
if (T == null) {
|
||||||
|
T = renderPlaceholder(new Graphics(), reward.getCard(), false);
|
||||||
|
}
|
||||||
|
|
||||||
drawCard(batch, T, x, width);
|
drawCard(batch, T, x, width);
|
||||||
} else {
|
} else {
|
||||||
drawCard(batch, image, x, width);
|
drawCard(batch, image, x, width);
|
||||||
|
|||||||
Reference in New Issue
Block a user