Files
src/miniquake/render_ui_contract.ml
- Package
miniquake.render_ui_contract- Reachable
- Yes
Imports
Declarations
# consoleLogicalHeight
function consoleLogicalHeight(width, height, physicalHeight)
Implements the `consoleLogicalHeight` operation for `miniquake.render_ui_contract` (console logical height).
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
physicalHeight | dynamic | — | The physical height input consumed by `consoleLogicalHeight`. |
View source
# consoleLogicalWidth
function consoleLogicalWidth(width, height)
Implements the `consoleLogicalWidth` operation for `miniquake.render_ui_contract` (console logical width).
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
View source
# consoleScale
function consoleScale(width, height)
Console glyphs use the same nearest-neighbour integer enlargement as the other indexed Quake UI art. Keep the backing text buffer in logical pixels so a resize changes wrapping at the same scale that is actually rendered.
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
View source
# INVENTORY_HEIGHT
const INVENTORY_HEIGHT = 24
Defines the inventory height value used by `miniquake.render_ui_contract`.
View source
# overlayOrder
function overlayOrder(dialog, loading, intermission, gameInput)
Implements the `overlayOrder` operation for `miniquake.render_ui_contract` (overlay order).
| Parameter | Type | Default | Description |
|---|
dialog | dynamic | — | The dialog input consumed by `overlayOrder`. |
loading | dynamic | — | The loading input consumed by `overlayOrder`. |
intermission | dynamic | — | The intermission input consumed by `overlayOrder`. |
gameInput | dynamic | — | The game input input consumed by `overlayOrder`. |
View source
# set2dStateOrder
function set2dStateOrder()
Update module state for 2d state order.
View source
# STATUSBAR_HEIGHT
const STATUSBAR_HEIGHT = 24
Defines the statusbar height value used by `miniquake.render_ui_contract`.
View source
# STATUSBAR_WIDTH
const STATUSBAR_WIDTH = 320
Defines the statusbar width value used by `miniquake.render_ui_contract`.
View source
# statusbarLines
function statusbarLines(viewSize, intermission)
Implements the `statusbarLines` operation for `miniquake.render_ui_contract` (statusbar lines).
| Parameter | Type | Default | Description |
|---|
viewSize | dynamic | — | Size of the requested data or resource. |
intermission | dynamic | — | The intermission input consumed by `statusbarLines`. |
View source
# statusbarPhysicalLines
function statusbarPhysicalLines(width, height, viewSize, intermission)
Implements the `statusbarPhysicalLines` operation for `miniquake.render_ui_contract` (statusbar physical lines).
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
viewSize | dynamic | — | Size of the requested data or resource. |
intermission | dynamic | — | The intermission input consumed by `statusbarPhysicalLines`. |
View source
# statusbarScale
function statusbarScale(width, height)
The status bar, inventory strip and their 8-pixel glyphs are authored for the same 320-pixel Quake canvas as the menus. Keeping one integral scale avoids a tiny HUD at high resolutions and prevents filtered indexed art.
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
View source
# statusbarScaledXOffset
function statusbarScaledXOffset(width, gameType, scale)
Implements the `statusbarScaledXOffset` operation for `miniquake.render_ui_contract` (statusbar scaled x offset).
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
gameType | dynamic | — | The game type input consumed by `statusbarScaledXOffset`. |
scale | dynamic | — | The scale input consumed by `statusbarScaledXOffset`. |
View source
# statusbarXOffset
function statusbarXOffset(width, gameType)
Implements the `statusbarXOffset` operation for `miniquake.render_ui_contract` (statusbar x offset).
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
gameType | dynamic | — | The game type input consumed by `statusbarXOffset`. |
View source
# TGA_BYTES_PER_PIXEL
const TGA_BYTES_PER_PIXEL = 3
Defines the tga bytes per pixel value used by `miniquake.render_ui_contract`.
View source
# tgaByteLength
function tgaByteLength(width, height)
Return tga byte length derived from the active module state.
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
View source
# viewModelDepthMaximum
function viewModelDepthMaximum()
Implements the `viewModelDepthMaximum` operation for `miniquake.render_ui_contract` (view model depth maximum).
View source
# virtualCanvasLayout
function virtualCanvasLayout(width, height)
Implements the `virtualCanvasLayout` operation for `miniquake.render_ui_contract` (virtual canvas layout).
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
View source
# virtualCanvasScale
function virtualCanvasScale(width, height)
GLQuake's menu helpers retain a 320-pixel logical canvas and only center it horizontally. Modern high-DPI modes need enlargement, but fractional or unbounded stretching makes the indexed font and qpics visibly uneven. Use a conservative integral scale: original size around 640x480, 2x around 1080p, and at most 4x on very large displays. Some valid widescreen modes (for example 1176x664) fall just below the legacy 1.5x ratio threshold despite having ample room for a 2x 320x200 canvas; promote those explicitly so the original 8-pixel menu font does not become needlessly tiny.
| Parameter | Type | Default | Description |
|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
View source