Shows current magazine ammo and reserve ammo without panel chrome.
More...
#include <AmmoCounter.hpp>
Shows current magazine ammo and reserve ammo without panel chrome.
◆ AmmoCounter()
| AmmoCounter::AmmoCounter |
( |
| ) |
|
◆ draw()
| void AmmoCounter::draw |
( |
HudContext & | ctx, |
|
|
float | drawX, |
|
|
float | drawY ) |
|
overridevirtual |
Emit geometry into the draw context.
- Parameters
-
| ctx | Immediate-mode draw API. |
| drawX | Resolved pixel X (anchor + offset already applied). |
| drawY | Resolved pixel Y. |
Implements HudWidget.
◆ update()
Called each frame before draw(). Update animation, consume events.
Implements HudWidget.
◆ backgroundOffsetX
| float AmmoCounter::backgroundOffsetX = -120.5f |
◆ backgroundOffsetY
| float AmmoCounter::backgroundOffsetY = -4.f |
◆ backgroundScale
| float AmmoCounter::backgroundScale = 1.26f |
◆ backgroundStretchX
| float AmmoCounter::backgroundStretchX = 1.3f |
◆ backgroundStretchY
| float AmmoCounter::backgroundStretchY = 1.f |
◆ clipFontSize
| float AmmoCounter::clipFontSize = 125.5f |
Current ammo in the magazine.
◆ displayClip_
| int AmmoCounter::displayClip_ = 0 |
|
private |
◆ displayReserve_
| int AmmoCounter::displayReserve_ = 0 |
|
private |
◆ edgePadding
| float AmmoCounter::edgePadding = 0.f |
Inset from the panel edge to the rightmost number.
◆ panelHeight
| float AmmoCounter::panelHeight = 100.f |
◆ panelWidth
| float AmmoCounter::panelWidth = 230.f |
◆ reserveFontSize
| float AmmoCounter::reserveFontSize = 75.f |
◆ weaponId_
| int AmmoCounter::weaponId_ = 0 |
|
private |
The documentation for this struct was generated from the following files: