| 7 | namespace Star { |
| 8 | |
| 9 | FuelWidget::FuelWidget() { |
| 10 | auto assets = Root::singleton().assets(); |
| 11 | |
| 12 | m_textStyle.fontSize = assets->json("/interface.config:font.buttonSize").toInt(); |
| 13 | m_textStyle.loadJson(assets->json("/interface.config:textStyle")); |
| 14 | |
| 15 | m_fuelLevel = 0; |
| 16 | m_maxLevel = 0; |
| 17 | m_potential = 0; |
| 18 | m_requested = 0; |
| 19 | |
| 20 | m_pingTimeout = 0; |
| 21 | disableScissoring(); |
| 22 | } |
| 23 | |
| 24 | void FuelWidget::update(float dt) { |
| 25 | if ((m_pingTimeout -= dt) < 0) |