MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / FuelWidget

Method FuelWidget

source/windowing/StarFuelWidget.cpp:9–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace Star {
8
9FuelWidget::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
24void FuelWidget::update(float dt) {
25 if ((m_pingTimeout -= dt) < 0)

Callers

nothing calls this directly

Calls 5

singletonClass · 0.85
assetsMethod · 0.80
toIntMethod · 0.80
jsonMethod · 0.80
loadJsonMethod · 0.45

Tested by

no test coverage detected