| 44 | } |
| 45 | |
| 46 | float calc_color(u32 idx, u32 total, float stage, float max_stage, bool blend) |
| 47 | { |
| 48 | float kk = (stage / max_stage) * (float(total + 1)); |
| 49 | if (blend) |
| 50 | { |
| 51 | return (1 / (exp((float(idx) - kk) * 0.9f) + 1.0f)); |
| 52 | } |
| 53 | |
| 54 | if ((float)idx < kk) |
| 55 | { |
| 56 | return 1.0f; |
| 57 | } |
| 58 | return 0.0f; |
| 59 | } |
| 60 | |
| 61 | void CUIProgressShape::Draw() |
| 62 | { |