improvements

This commit is contained in:
Michal Vrba
2026-08-28 16:34:40 +02:00
parent 4803bc22a6
commit 02bca7c34a
212 changed files with 622 additions and 112 deletions
@@ -88,9 +88,9 @@
int total = Player.Hand.Count;
double mid = (total - 1) / 2.0;
double offset = i - mid;
double angle = total > 1 ? offset * (Math.Min(35.0 / total, 5.5)) : 0;
double yOffset = Math.Abs(offset) * 4.0;
double xOffset = offset * (total > 8 ? 26 : 38);
double angle = total > 1 ? offset * (Math.Min(35.0 / total, 5.2)) : 0;
double yOffset = Math.Abs(offset) * 3.5;
double stepFactor = total > 8 ? 0.75 : (total > 5 ? 0.88 : 1.0);
// Ak patrí do aktívnej skupiny rovnakej hodnoty, vysunieme ju
string slotClasses = "hand-card-slot";
@@ -99,7 +99,7 @@
slotClasses += " rank-group-lifted";
}
string fanSlotStyle = $"transform: translateX({xOffset}px) translateY({yOffset}px) rotate({angle}deg); z-index: {(isSelected ? 140 + i : (isSameRankAsSelected ? 110 + i : i + 1))};";
string fanSlotStyle = $"transform: translateX(calc({offset.ToString(System.Globalization.CultureInfo.InvariantCulture)} * var(--fan-card-step) * {stepFactor.ToString(System.Globalization.CultureInfo.InvariantCulture)})) translateY({yOffset.ToString(System.Globalization.CultureInfo.InvariantCulture)}px) rotate({angle.ToString(System.Globalization.CultureInfo.InvariantCulture)}deg); z-index: {(isSelected ? 140 + i : (isSameRankAsSelected ? 110 + i : i + 1))};";
string selectedClass = isSelected ? "card-selected-combo" : (isSameRankAsSelected ? "card-group-active" : "");
<div class="@slotClasses" style="@fanSlotStyle">