Centered prompt rendered just below the crosshair while the local player is in range of, and looking at, an available weapon spawner.
More...
#include <PickupPrompt.hpp>
Centered prompt rendered just below the crosshair while the local player is in range of, and looking at, an available weapon spawner.
Visibility and the displayed weapon name are driven entirely by HudGameState::pickupAvailable / pickupWeaponId — Game.cpp populates them each frame by replicating the WeaponSpawnerSystem proximity check for the local player.
◆ PickupPrompt()
| PickupPrompt::PickupPrompt |
( |
| ) |
|
◆ draw()
| void PickupPrompt::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.
◆ fontSize
| float PickupPrompt::fontSize = 24.f |
Size of the descriptive text (logical px).
◆ keyBoxPadding
| float PickupPrompt::keyBoxPadding = 5.f |
Padding inside the key glyph box.
◆ keyBoxRadius
| float PickupPrompt::keyBoxRadius = 4.f |
Corner radius of the key glyph box.
◆ keyFontSize
| float PickupPrompt::keyFontSize = 26.f |
Size of the "F" key glyph (logical px).
◆ spacing
| float PickupPrompt::spacing = 10.f |
Gap between the key glyph box and the text.
◆ weaponId_
| int PickupPrompt::weaponId_ = 0 |
|
private |
The documentation for this struct was generated from the following files: