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
|
||||
public void dragStop(InputEvent event, float x, float y, int pointer) {
|
||||
float deltaY = y - startY;
|
||||
|
||||
if (deltaY < 0) {
|
||||
isDragging = false;
|
||||
SoundSystem.instance.play(SoundEffectType.FlipCard, false);
|
||||
|
||||
if (!frontSideUp() || !hover)
|
||||
return;
|
||||
|
||||
float deltaY = y - startY;
|
||||
if (deltaY < 0) {
|
||||
shouldDisplayText = !shouldDisplayText;
|
||||
switchTooltip();
|
||||
}
|
||||
@@ -601,6 +603,8 @@ public class RewardActor extends Actor implements Disposable, ImageFetcher.Callb
|
||||
|
||||
tooltip.setActor(new ComplexTooltip(new RewardImage(processDrawable(alt))));
|
||||
} else {
|
||||
T = renderPlaceholder(new Graphics(), reward.getCard(), false);
|
||||
|
||||
RewardImage image = shouldDisplayText
|
||||
? new RewardImage(processDrawable(T))
|
||||
: toolTipImage;
|
||||
@@ -1000,11 +1004,11 @@ public class RewardActor extends Actor implements Disposable, ImageFetcher.Callb
|
||||
x = -getWidth() / 2;
|
||||
}
|
||||
if (Reward.Type.Card.equals(reward.getType())) {
|
||||
if (!loaded || image == null) {
|
||||
if (T == null) {
|
||||
T = renderPlaceholder(new Graphics(), reward.getCard(), false);
|
||||
}
|
||||
|
||||
if (!loaded || image == null) {
|
||||
drawCard(batch, T, x, width);
|
||||
} else {
|
||||
drawCard(batch, image, x, width);
|
||||
|
||||
Reference in New Issue
Block a user