MiniQuake2

src/miniquake2/client/ui/screen.ml

Provides miniquake2 client ui screen facilities for this project.

Package
miniquake2.client.ui.screen
Reachable
Yes

Imports

Declarations

centerPrint

function centerPrint(screen, text, now, duration)

Print center.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
textdynamic—Text consumed by the operation.
nowdynamic—now value consumed by this operation.
durationdynamic—duration value consumed by this operation.

View source

create

function create(console, menu)

Creates create for the miniquake2 client ui screen module.

ParameterTypeDefaultDescription
consoledynamic—console value consumed by this operation.
menudynamic—menu value consumed by this operation.

View source

crosshairPosition

function crosshairPosition(screenWidth, screenHeight, pictureWidth, pictureHeight)

Return the crosshair position.

ParameterTypeDefaultDescription
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
pictureWidthdynamic—pictureWidth value consumed by this operation.
pictureHeightdynamic—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.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
nowdynamic—now value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
statsdynamic—stats value consumed by this operation.
configStringsdynamic—configStrings value consumed by this operation.
serverFramedynamic—serverFrame value consumed by this operation.
playerNumberdynamic—playerNumber value consumed by this operation.
exportsdynamic—exports value consumed by this operation.

View source

drawCenteredLines

function drawCenteredLines(exports, screenWidth, startY, text)

Draw centered lines.

ParameterTypeDefaultDescription
exportsdynamic—exports value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
startYdynamic—startY value consumed by this operation.
textdynamic—Text consumed by the operation.

View source

drawCrosshair

function drawCrosshair(screen, screenWidth, screenHeight, exports)

Draw crosshair.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
exportsdynamic—exports value consumed by this operation.

View source

drawInventory

function drawInventory(screen, screenWidth, screenHeight, exports)

Draw inventory.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
exportsdynamic—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.

ParameterTypeDefaultDescription
exportsdynamic—exports value consumed by this operation.
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
textdynamic—Text consumed by the operation.

View source

setInventory

function setInventory(screen, items, selected)

Set inventory.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
itemsdynamic—Items consumed or updated by the operation.
selecteddynamic—selected value consumed by this 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.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
valuesdynamic—values value consumed by this operation.
configStringsdynamic—configStrings value consumed by this operation.
selecteddynamic—selected value consumed by this operation.

View source

updateInventoryHotkeys

function updateInventoryHotkeys(screen, input)

Resolve the first exact `use <item>` binding shown by the stock inventory.

ParameterTypeDefaultDescription
screendynamic—screen value consumed by this operation.
inputdynamic—input value consumed by this operation.

View source