MiniQuake2

src/miniquake2/client/ui/menu.ml

Provides miniquake2 client ui menu facilities for this project.

Package
miniquake2.client.ui.menu
Reachable
Yes

Imports

Declarations

action

function action(id, label, command)

Performs the action operation for the miniquake2 client ui menu module.

ParameterTypeDefaultDescription
iddynamic—Stable identifier of the affected item.
labeldynamic—label value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

activate

function activate(menu)

Performs the activate operation for the miniquake2 client ui menu module.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

adjust

function adjust(menu, direction)

Adjust state.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
directiondynamic—direction value consumed by this operation.

View source

bannerName

function bannerName(pageId)

Return the banner name.

ParameterTypeDefaultDescription
pageIddynamic—Identifier of page.

View source

choice

function choice(id, label, value, choices, command)

Return the choice value.

ParameterTypeDefaultDescription
iddynamic—Stable identifier of the affected item.
labeldynamic—label value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.
choicesdynamic—choices value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

create

function create()

Creates create for the miniquake2 client ui menu module.

View source

defaultPages

function defaultPages()

Return the default pages value.

View source

drainCommands

function drainCommands(menu)

Performs the drainCommands operation for the miniquake2 client ui menu module.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

draw

function draw(menu, screenWidth, screenHeight, now, exports)

Draws draw through the miniquake2 client ui menu rendering path.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
nowdynamic—now value consumed by this operation.
exportsdynamic—exports value consumed by this operation.

View source

drawAltText

function drawAltText(exports, x, y, text)

Draw alt text.

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

drawMain

function drawMain(menu, screenWidth, screenHeight, now, exports)

Draw main.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
nowdynamic—now value consumed by this operation.
exportsdynamic—exports value consumed by this operation.

View source

drawPlayerPreview

function drawPlayerPreview(menu, screenWidth, screenHeight, now, exports)

PlayerConfig_MenuDraw renders the selected player as a full-bright alias model in a world-less 144x168 view. Register calls are intentionally made here: the renderer deduplicates current-generation resources, while a map registration invalidates old handles and the next menu frame reacquires them.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
screenWidthdynamic—screenWidth value consumed by this operation.
screenHeightdynamic—screenHeight value consumed by this operation.
nowdynamic—now 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 menu 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

field

function field(id, label, value, maximumLength, command)

Return the field value.

ParameterTypeDefaultDescription
iddynamic—Stable identifier of the affected item.
labeldynamic—label value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.
maximumLengthdynamic—maximumLength value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

handleKey

function handleKey(menu, key)

Handle key.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
keydynamic—key value consumed by this operation.

View source

itemById

function itemById(menu, pageId, itemId)

Return the item by id value.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
pageIddynamic—Identifier of page.
itemIddynamic—Identifier of item.

View source

itemValue

function itemValue(item)

Return the item value.

ParameterTypeDefaultDescription
itemdynamic—item value consumed by this operation.

View source

label

function label(id, text)

Return the label value.

ParameterTypeDefaultDescription
iddynamic—Stable identifier of the affected item.
textdynamic—Text consumed by the operation.

View source

mainCursorName

function mainCursorName(now)

Return the main cursor name.

ParameterTypeDefaultDescription
nowdynamic—now value consumed by this operation.

View source

MAX_MENU_COMMANDS

const MAX_MENU_COMMANDS = 16

Defines the max menu commands constant used by the miniquake2 client ui menu module.

View source

menuCursorGlyph

function menuCursorGlyph(now)

Return the menu cursor glyph value.

ParameterTypeDefaultDescription
nowdynamic—now value consumed by this operation.

View source

menuEmptyCommands

menuEmptyCommands

Stores module-wide menu empty commands state for the miniquake2 client ui menu module.

View source

menuPlayerPreviewLightStyles

menuPlayerPreviewLightStyles

Stores module-wide menu player preview light styles state for the miniquake2 client ui menu module.

View source

move

function move(menu, direction)

Move state.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
directiondynamic—direction value consumed by this operation.

View source

open

function open(menu, id)

Opens open for the miniquake2 client ui menu module.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
iddynamic—Stable identifier of the affected item.

View source

page

function page(menu)

Return the page value.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

playerPreviewModelPath

function playerPreviewModelPath(menu)

Return the player preview model path.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

playerPreviewPath

function playerPreviewPath(menu)

Return the player preview path.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

playerPreviewSkinPath

function playerPreviewSkinPath(menu)

Return the player preview skin path.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

playerSkinChoices

function playerSkinChoices(modelName)

Return the player skin choices value.

ParameterTypeDefaultDescription
modelNamedynamic—modelName value consumed by this operation.

View source

queueCommand

function queueCommand(menu, command)

Queue command.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

setActionCommand

function setActionCommand(menu, pageId, itemId, text, command, enabled)

Set action command.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
pageIddynamic—Identifier of page.
itemIddynamic—Identifier of item.
textdynamic—Text consumed by the operation.
commanddynamic—command value consumed by this operation.
enableddynamic—enabled value consumed by this operation.

View source

setItemLabel

function setItemLabel(menu, pageId, itemId, text)

Set item label.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
pageIddynamic—Identifier of page.
itemIddynamic—Identifier of item.
textdynamic—Text consumed by the operation.

View source

setItemText

function setItemText(menu, pageId, itemId, value)

Set item text.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
pageIddynamic—Identifier of page.
itemIddynamic—Identifier of item.
valuedynamic—Value consumed or transformed by the operation.

View source

setItemValue

function setItemValue(menu, pageId, itemId, value)

Set item value.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.
pageIddynamic—Identifier of page.
itemIddynamic—Identifier of item.
valuedynamic—Value consumed or transformed by the operation.

View source

slider

function slider(id, label, value, minimum, maximum, step, command)

Return the slider value.

ParameterTypeDefaultDescription
iddynamic—Stable identifier of the affected item.
labeldynamic—label value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.
minimumdynamic—minimum value consumed by this operation.
maximumdynamic—maximum value consumed by this operation.
stepdynamic—step value consumed by this operation.
commanddynamic—command value consumed by this operation.

View source

synchronizePlayerSkins

function synchronizePlayerSkins(menu)

Synchronize player skins.

ParameterTypeDefaultDescription
menudynamic—menu value consumed by this operation.

View source

toggle

function toggle(id, label, value, command)

Toggle state.

ParameterTypeDefaultDescription
iddynamic—Stable identifier of the affected item.
labeldynamic—label value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.
commanddynamic—command value consumed by this operation.

View source