Preserve interpolation braces, invariant number formatting, ON/OFF updates and line breaks. Update both initial and refresh paths, portrait and landscape. Exact names/unlocks/free charges: Scripts/HeartsTables.cs; effect/help strings: Scripts/HeartsTables.cs. Level names/hints remain separate JSON content. If a title appears in art, Title property or another screen, update those visible uses deliberately without renaming GameId, namespace, resources or save keys.
Hard-coded game strings do not automatically use shared localization. To translate the interface, route every display assignment through your translation table. Dictionaries, word banks and theme pools are independent gameplay assets and need separate validation. Test help, settings, results, tutorial and helper introductions after a fresh launch.
| Source | Exact current code |
|---|
HeartsArt.cs:34 / public static Color Hex(string h) { return ColorUtility.TryParseHtmlString(h != null && h.StartsWith("#") ? h : "#" + h, out var c) ? c : FeltTop; } | public static Sprite HelperIcon(string id) => Load("Icons/icon_" + id); |
HeartsData.cs:19 / class/static declarations | try { _file = ta ? JsonUtility.FromJson<HtTableFile>(ta.text) : null; } catch (Exception e) { Debug.LogWarning("[HeartsTable] levels.json: " + e.Message); } |
HeartsHelpers.cs:19 / class/static declarations | static readonly Color[] HelperColor = { HzUI.Hex("#F5A623"), HzUI.Hex("#4C9EEB"), HzUI.Hex("#7B61FF"), HzUI.Hex("#3CC3A0") }; |
HeartsHelpers.cs:44 / void BuildHelperBar() | h.btn = HzUI.Button("Helper_" + id, _top, null, HelperColor[i], Color.white, () => UseHelper(id), 40, (int)(sz * 0.3f)); |
HeartsHelpers.cs:45 / void BuildHelperBar() | h.btn.name = "Helper_" + id; |
HeartsHelpers.cs:60 / void BuildHelperBar() | h.label = HzUI.Label("Name", h.btn.transform, HtHelpers.Title(id), 24, Color.white, TextAnchor.MiddleCenter, false); |
HeartsHelpers.cs:67 / void BuildHelperBar() | h.badgeText = HzUI.Label("BadgeText", bd.transform, "", (int)(sz * 0.25f), Color.white); h.badgeText.rectTransform.Stretch(); |
HeartsHelpers.cs:73 / void BuildHelperBar() | h.lockText = HzUI.Label("LockText", lk.transform, "", 24, Gold, TextAnchor.MiddleCenter, false); h.lockText.fontStyle = FontStyle.Bold; |
HeartsHelpers.cs:110 / void RefreshHelpers() | h.lockText.text = at > 0 ? "Table " + at : "Soon"; |
HeartsHelpers.cs:117 / void RefreshHelpers() | h.badgeText.text = ch > 0 ? ch.ToString() : "+"; |
HeartsHelpers.cs:133 / void UseHelper(string id) | Toast(HtHelpers.Title(id) + (at > 0 ? " unlocks at table " + at : " is locked")); |
HeartsHelpers.cs:140 / void UseHelper(string id) | Toast(id == "hint" ? "Use Card Hint on your turn" : id == "pass" ? "Use Pass Advisor while passing" : id == "undo" ? "Nothing to undo yet" : _peek ? "Peek is already on" : "Use Peek during a hand"); |
HeartsHelpers.cs:222 / void OfferCharge(string id) | var m = Modal("Out of " + HtHelpers.Title(id), new Vector2(820, 640), HzUI.Hex("#4C9EEB")); |
HeartsHelpers.cs:226 / void OfferCharge(string id) | CardText(m, "Watch a short ad for one more " + HtHelpers.Title(id) + ".\nWinning a table also refills every helper by 1.", 360, 720, 120, 32, TextDark); |
HeartsHelpers.cs:227 / void OfferCharge(string id) | CardButton(m, "Watch ad +1", Mint, 470, 480, 104, () => |
HeartsHelpers.cs:235 / void OfferCharge(string id) | Toast("+1 " + HtHelpers.Title(id), Gold); |
HeartsHelpers.cs:239 / void OfferCharge(string id) | CardButton(m, "No thanks", Slate, 585, 360, 80, () => CloseModal(m), 36); |
HeartsHelpers.cs:284 / void ShowUnlock(string id, Action done) | CardText(m, "+" + HtHelpers.FreeCharges + " free uses", 575, 600, 50, 34, HzUI.Hex("#D99A1E"), true); |
HeartsHelpers.cs:285 / void ShowUnlock(string id, Action done) | CardButton(m, "Great!", Mint, 690, 420, 110, () => { CloseModal(m); done(); }, 52); |
HeartsHelpers.cs:297 / void ShowNewRule(string title, string text, Action done) | CardButton(m, "Got it", Mint, 520, 400, 110, () => { CloseModal(m); done(); }, 52); |
HeartsHelpers.cs:315 / void ShowTableIntro(Action done) | CardButton(m, "Deal!", Mint, 662, 400, 100, () => { CloseModal(m); done(); }, 50); |
HeartsTableGame.cs:203 / void BuildStatic() | _handLabel = HzUI.Label("Hand", chip.transform, "", 36, Color.white, TextAnchor.MiddleLeft); |
HeartsTableGame.cs:206 / void BuildStatic() | _dirLabel = HzUI.Label("Dir", chip.transform, "", 26, Gold, TextAnchor.MiddleLeft, false); _dirLabel.fontStyle = FontStyle.Bold; |
HeartsTableGame.cs:224 / void BuildStatic() | _msgText = HzUI.Label("T", _msgBg.transform, "", 34, Color.white, TextAnchor.MiddleCenter, false); _msgText.fontStyle = FontStyle.Bold; |
HeartsTableGame.cs:229 / void BuildStatic() | _passBtn = HzUI.Button("Pass", _top, "", Coral, Color.white, OnPassClick, 40, 60); |
HeartsTableGame.cs:235 / void BuildStatic() | _passLabel = HzUI.Label("L", _passBtn.transform, "PASS", 40, Color.white); _passLabel.rectTransform.Place(new Vector2(0.5f, 0.5f), new Vector2(220, 50), new Vector2(0, -60)); |
HeartsTableGame.cs:257 / void BuildStatic() | p.name = HzUI.Label("Name", p.rt, NameOf(seat), 34, Color.white); |
HeartsTableGame.cs:261 / void BuildStatic() | p.hand = HzUI.Label("Hand", p.rt, "0", 32, Coral, TextAnchor.MiddleLeft); |
HeartsTableGame.cs:263 / void BuildStatic() | p.total = HzUI.Label("Total", p.rt, "", 26, HzUI.Hex("#BFE3DF"), TextAnchor.MiddleLeft, false); |
HeartsTableGame.cs:269 / void BuildStatic() | p.name = HzUI.Label("Name", p.rt, NameOf(seat), 36, Color.white, TextAnchor.MiddleLeft); |
HeartsTableGame.cs:273 / void BuildStatic() | p.hand = HzUI.Label("Hand", p.rt, "0", 32, Coral, TextAnchor.MiddleLeft); |
HeartsTableGame.cs:275 / void BuildStatic() | p.total = HzUI.Label("Total", p.rt, "", 26, HzUI.Hex("#BFE3DF"), TextAnchor.MiddleLeft, false); |
HeartsTableGame.cs:312 / void RefreshPlates() | p.hand.text = S != null ? S.points[s].ToString() : "0"; |
HeartsTableGame.cs:313 / void RefreshPlates() | p.total.text = "Total " + (M != null ? M.totals[s] : 0); |
HeartsTableGame.cs:346 / void RefreshHud() | _handLabel.text = (M != null ? "Table " + M.table + " " : "") + "Hand " + hand; |
HeartsTableGame.cs:394 / void Msg(string text, float secs = 0, Color? color = null) | var rl = HzUI.Label("R", g, Cards.RankName(c), rank == 10 ? 36 : 44, col); |
HeartsTableGame.cs:412 / void Msg(string text, float secs = 0, Color? color = null) | var letter = HzUI.Label("L", frame.transform, Cards.RankName(c), 70, col); letter.rectTransform.Place(new Vector2(0.5f, 0.5f), new Vector2(90, 80), new Vector2(0, -4)); |
HeartsTableGame.cs:436 / void Msg(string text, float secs = 0, Color? color = null) | HzUI.Label("t", tag.transform, c == Cards.QueenSpades ? "13" : "-10", 22, Color.white).rectTransform.Stretch(); |
HeartsTableGame.cs:888 / void RefreshPassButton() | _passLabel.text = "PASS " + _passSel.Count + "/3"; |
HeartsTableGame.cs:958 / public override string DebugCommand(string cmd) | case "helper": UseHelper(p.Length > 1 ? p[1] : "hint"); return $"helper charges=[{string.Join(",", Prog.charges)}] hint={(_hintCard >= 0 ? Cards.Code(_hintCard) : "-")} peek={_peek} sel={string.Join(",", _passSel.Select(Cards.Code))}"; |
HeartsTableGame.cs:959 / public override string DebugCommand(string cmd) | case "charges": foreach (var id in HtHelpers.Ids) if (Prog.Has(id)) Prog.AddCharges(id, 9); SaveProg(); return "charges=" + string.Join(",", Prog.charges); |
HeartsTables.cs:57 / class/static declarations | /// <summary>Helpers (boosters) of this game. Unlock tables come from the table data ("unlock" field).</summary> |
HeartsTables.cs:260 / public static string Check(HtTable t) | if (!string.IsNullOrEmpty(t.unlock) && Array.IndexOf(HtHelpers.Ids, t.unlock) < 0) return "unknown helper '" + t.unlock + "'"; |
HeartsTableScreens.cs:34 / class/static declarations | var tl = HzUI.Label("Title", ribbon.transform, title, 62, Color.white); tl.rectTransform.Stretch(6); |
HeartsTableScreens.cs:77 / void CloseAllModals() { foreach (var m in _modals.ToList()) CloseModal(m); } | var t = HzUI.Label("Txt", m.card, text, size, color, align, display); |
HeartsTableScreens.cs:151 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Next table", Mint, by + 110, 520, 112, () => { CloseModal(m); HzPlatform.Interstitial(GameId, () => StartTable(M.table + 1)); }); |
HeartsTableScreens.cs:152 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Replay", Slate, by + 235, 300, 90, () => { CloseModal(m); StartTable(M.table); }, 40, -165); |
HeartsTableScreens.cs:153 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Tables", Slate, by + 235, 300, 90, () => { CloseModal(m); ShowTitle(); ShowLadder(); }, 40, 165); |
HeartsTableScreens.cs:158 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Try again", Mint, by + 105, 520, 112, () => { CloseModal(m); HzPlatform.Interstitial(GameId, () => StartTable(M.table)); }); |
HeartsTableScreens.cs:159 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Tables", Slate, by + 230, 520, 100, () => { CloseModal(m); ShowTitle(); ShowLadder(); }, 44); |
HeartsTableScreens.cs:164 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Next hand", Mint, by + 75, 520, 120, () => { CloseModal(m); HzPlatform.Interstitial(GameId, BeginHand); }, 54); |
HeartsTableScreens.cs:165 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Scores", Slate, by + 205, 300, 90, () => ShowScoreSheet(), 40, -165); |
HeartsTableScreens.cs:166 / void ShowHandResult(int[] scores, int moon) | CardButton(m, "Menu", Slate, by + 205, 300, 90, () => ShowMenu(), 40, 165); |
HeartsTableScreens.cs:204 / void ShowScoreSheet() | CardButton(m, "Close", Mint, h - 72, 420, 100, () => CloseModal(m), 46); |
HeartsTableScreens.cs:233 / void ShowRules() | CardButton(m, "Got it!", Mint, 1090 + extra, 440, 112, () => CloseModal(m), 52); |
HeartsTableScreens.cs:241 / void ShowMenu() | CardButton(m, "Resume", Mint, 190, 540, 110, () => CloseModal(m), 52); |
HeartsTableScreens.cs:243 / void ShowMenu() | sound = CardButton(m, SoundLabel(), HzUI.Hex("#4C9EEB"), 315, 262, 96, null, 36, -139); |
HeartsTableScreens.cs:244 / void ShowMenu() | sound.onClick.AddListener(() => { HzAudio.Muted = !HzAudio.Muted; sound.SetText(SoundLabel()); HzAudio.Play("toggle", 0.6f); }); |
HeartsTableScreens.cs:245 / void ShowMenu() | music = CardButton(m, MusicLabel(), HzUI.Hex("#4C9EEB"), 315, 262, 96, null, 36, 139); |
HeartsTableScreens.cs:246 / void ShowMenu() | music.onClick.AddListener(() => { HzAudio.MusicMuted = !HzAudio.MusicMuted; music.SetText(MusicLabel()); HzAudio.Play("toggle", 0.6f); }); |
HeartsTableScreens.cs:247 / void ShowMenu() | CardButton(m, "Rules", Coral, 435, 540, 100, () => ShowRules(), 44); |
HeartsTableScreens.cs:248 / void ShowMenu() | CardButton(m, "Score sheet", Plum, 555, 540, 100, () => ShowScoreSheet(), 44); |
HeartsTableScreens.cs:249 / void ShowMenu() | CardButton(m, "Restart table", HzUI.Hex("#F5A623"), 675, 540, 100, () => { CloseAllModals(); StopHand(false); HzPlatform.Interstitial(GameId, () => StartTable(M != null ? M.table : Level)); }, 44); |
HeartsTableScreens.cs:250 / void ShowMenu() | CardButton(m, "Main menu", HzUI.Hex("#7B61FF"), 795, 540, 100, () => { CloseAllModals(); StopHand(); ShowTitle(); }, 44); |
HeartsTableScreens.cs:253 / static string SoundLabel() => HzAudio.Muted ? "Sound: OFF" : "Sound: ON"; | static string SoundLabel() => HzAudio.Muted ? "Sound: OFF" : "Sound: ON"; |
HeartsTableScreens.cs:254 / static string MusicLabel() => HzAudio.MusicMuted ? "Music: OFF" : "Music: ON"; | static string MusicLabel() => HzAudio.MusicMuted ? "Music: OFF" : "Music: ON"; |
HeartsTableScreens.cs:307 / void ShowTitle() | var r = HzUI.Label("R", card.transform, Cards.RankName(fan[i]), 40, HeartsArt.SuitColor(su)); r.rectTransform.Place(new Vector2(0, 1), new Vector2(46, 48), new Vector2(26, -28)); |
HeartsTableScreens.cs:311 / void ShowTitle() | var title = HzUI.Label("Name", _title, "Hearts Table", portrait ? 130 : 120, Color.white); |
HeartsTableScreens.cs:314 / void ShowTitle() | var tag = HzUI.Label("Tag", _title, "Climb the ladder of card tables", 34, Gold, TextAnchor.MiddleCenter, false); tag.fontStyle = FontStyle.Bold; |
HeartsTableScreens.cs:321 / void ShowTitle() | var tl = HzUI.Label("TName", tc.transform, "Table " + cur + " " + table.name, 46, Color.white, TextAnchor.MiddleLeft); |
HeartsTableScreens.cs:324 / void ShowTitle() | var tv = HzUI.Label("TVenue", tc.transform, table.venue + " - to " + table.target, 28, HzUI.Hex("#BFE3DF"), TextAnchor.MiddleLeft, false); |
HeartsTableScreens.cs:328 / void ShowTitle() | var tt = HzUI.Label("TTwist", tc.transform, tw.Count > 0 ? string.Join(" | ", tw) : "Classic rules", 26, Gold, TextAnchor.MiddleLeft, false); |
HeartsTableScreens.cs:341 / void ShowTitle() | var play = HzUI.Button("Play", _title, cont ? "Continue" : "Play", Coral, Color.white, () => |
HeartsTableScreens.cs:349 / void ShowTitle() | var lad = HzUI.Button("Tables", _title, "Tables", Slate, Color.white, ShowLadder, 44); |
HeartsTableScreens.cs:351 / void ShowTitle() | var st = HzUI.Button("Stats", _title, "Stats", Plum, Color.white, ShowStats, 44); |
HeartsTableScreens.cs:374 / void ShowTitle() | var nameL = HzUI.Label("MyName", _title, "Your seat", 28, Color.white, TextAnchor.MiddleCenter, false); nameL.fontStyle = FontStyle.Bold; |
HeartsTableScreens.cs:382 / void ShowTitle() | var sl = HzUI.Label("Stars", chip.transform, Prog.TotalStars + " / " + (Prog.unlocked * 3), 36, Color.white, TextAnchor.MiddleLeft); sl.rectTransform.Place(new Vector2(0, 0.5f), new Vector2(160, 60), new Vector2(92, 0), new Vector2(0, 0.5f)); |
HeartsTableScreens.cs:414 / void ShowLadder() | var row = HzUI.Button("Row" + n, content, null, locked ? HzUI.Hex("#E3DDD3") : HzUI.Hex("#F3ECE2"), Color.white, () => |
HeartsTableScreens.cs:416 / void ShowLadder() | if (locked) { HzAudio.Play(HzSfx.Wrong, 0.4f); Toast("Win table " + (tn - 1) + " to unlock"); return; } |
HeartsTableScreens.cs:424 / void ShowLadder() | HzUI.Label("N", badge.transform, n.ToString(), 46, Color.white).rectTransform.Stretch(); |
HeartsTableScreens.cs:425 / void ShowLadder() | var nm = HzUI.Label("Name", row.transform, t.name, 40, locked ? TextSub : TextDark, TextAnchor.MiddleLeft); |
HeartsTableScreens.cs:430 / void ShowLadder() | var il = HzUI.Label("Info", row.transform, info, 24, tw.Count > 0 ? HzUI.Hex("#7B3FA0") : TextSub, TextAnchor.MiddleLeft, false); |
HeartsTableScreens.cs:434 / void ShowLadder() | var unlock = string.IsNullOrEmpty(t.unlock) ? "" : "Unlocks " + HtHelpers.Title(t.unlock); |
HeartsTableScreens.cs:437 / void ShowLadder() | var ul = HzUI.Label("Unlock", row.transform, unlock, 24, HzUI.Hex("#D98A1E"), TextAnchor.MiddleLeft, false); |
HeartsTableScreens.cs:462 / void ShowLadder() | HzUI.Label("T", nw.transform, "NEW", 26, Color.white).rectTransform.Stretch(); |
HeartsTableScreens.cs:470 / void ShowLadder() | CardButton(m, "Close", Mint, h - 75, 400, 100, () => CloseModal(m), 46); |
HeartsTableScreens.cs:492 / void ShowStats() | ("Helpers used", Stats.helpersUsed.ToString()), |
HeartsTableScreens.cs:502 / void ShowStats() | CardButton(m, "Close", Mint, 1145, 400, 100, () => CloseModal(m), 46); |