Provides miniquake2 client ui screen facilities for this project.
# centerPrint
function centerPrint(screen, text, now, duration)
Print center.
| Parameter | Type | Default | Description |
|---|
screen | dynamic | — | screen value consumed by this operation. |
text | dynamic | — | Text consumed by the operation. |
now | dynamic | — | now value consumed by this operation. |
duration | dynamic | — | duration value consumed by this operation. |
View source
# crosshairPosition
function crosshairPosition(screenWidth, screenHeight, pictureWidth, pictureHeight)
Return the crosshair position.
| Parameter | Type | Default | Description |
|---|
screenWidth | dynamic | — | screenWidth value consumed by this operation. |
screenHeight | dynamic | — | screenHeight value consumed by this operation. |
pictureWidth | dynamic | — | pictureWidth value consumed by this operation. |
pictureHeight | dynamic | — | pictureHeight value consumed by this operation. |
View source
# draw
function draw(screen, now, screenWidth, screenHeight, stats, configStrings, serverFrame, playerNumber, exports)
Draws draw through the miniquake2 client ui screen rendering path.
| Parameter | Type | Default | Description |
|---|
screen | dynamic | — | screen value consumed by this operation. |
now | dynamic | — | now value consumed by this operation. |
screenWidth | dynamic | — | screenWidth value consumed by this operation. |
screenHeight | dynamic | — | screenHeight value consumed by this operation. |
stats | dynamic | — | stats value consumed by this operation. |
configStrings | dynamic | — | configStrings value consumed by this operation. |
serverFrame | dynamic | — | serverFrame value consumed by this operation. |
playerNumber | dynamic | — | playerNumber value consumed by this operation. |
exports | dynamic | — | exports value consumed by this operation. |
View source
# drawCenteredLines
function drawCenteredLines(exports, screenWidth, startY, text)
Draw centered lines.
| Parameter | Type | Default | Description |
|---|
exports | dynamic | — | exports value consumed by this operation. |
screenWidth | dynamic | — | screenWidth value consumed by this operation. |
startY | dynamic | — | startY value consumed by this operation. |
text | dynamic | — | Text consumed by the operation. |
View source
# drawCrosshair
function drawCrosshair(screen, screenWidth, screenHeight, exports)
Draw crosshair.
| Parameter | Type | Default | Description |
|---|
screen | dynamic | — | screen value consumed by this operation. |
screenWidth | dynamic | — | screenWidth value consumed by this operation. |
screenHeight | dynamic | — | screenHeight value consumed by this operation. |
exports | dynamic | — | exports value consumed by this operation. |
View source
# drawInventory
function drawInventory(screen, screenWidth, screenHeight, exports)
Draw inventory.
| Parameter | Type | Default | Description |
|---|
screen | dynamic | — | screen value consumed by this operation. |
screenWidth | dynamic | — | screenWidth value consumed by this operation. |
screenHeight | dynamic | — | screenHeight value consumed by this operation. |
exports | dynamic | — | exports value consumed by this operation. |
View source
# drawText
function drawText(exports, x, y, text)
Draws text through the miniquake2 client ui screen rendering path.
| Parameter | Type | Default | Description |
|---|
exports | dynamic | — | exports value consumed by this operation. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
text | dynamic | — | Text consumed by the operation. |
View source
# updateInventory
function updateInventory(screen, values, configStrings, selected)
Convert the fixed Protocol-34 inventory vector into the compact rows the renderer needs. Receiving an update does not implicitly open the inventory; the local `inven` command owns that user-visible toggle.
| Parameter | Type | Default | Description |
|---|
screen | dynamic | — | screen value consumed by this operation. |
values | dynamic | — | values value consumed by this operation. |
configStrings | dynamic | — | configStrings value consumed by this operation. |
selected | dynamic | — | selected value consumed by this operation. |
View source