| 811 | } |
| 812 | |
| 813 | void DrawFlaskValues(const Surface &out, Point pos, int currValue, int maxValue) |
| 814 | { |
| 815 | UiFlags color = (currValue > 0 ? (currValue == maxValue ? UiFlags::ColorGold : UiFlags::ColorWhite) : UiFlags::ColorRed); |
| 816 | |
| 817 | auto drawStringWithShadow = [out, color](string_view text, Point pos) { |
| 818 | DrawString(out, text, pos + Displacement { -1, -1 }, { UiFlags::ColorBlack | UiFlags::KerningFitSpacing, 0 }); |
| 819 | DrawString(out, text, pos, { color | UiFlags::KerningFitSpacing, 0 }); |
| 820 | }; |
| 821 | |
| 822 | std::string currText = StrCat(currValue); |
| 823 | drawStringWithShadow(currText, pos - Displacement { GetLineWidth(currText, GameFont12) + 1, 0 }); |
| 824 | drawStringWithShadow("/", pos); |
| 825 | drawStringWithShadow(StrCat(maxValue), pos + Displacement { GetLineWidth("/", GameFont12) + 1, 0 }); |
| 826 | } |
| 827 | |
| 828 | void control_update_life_mana() |
| 829 | { |
no test coverage detected