# _CUI_Abs
inline function _CUI_Abs(v)Returns a non-negative animation distance.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
src/console_ui.mlOwns console animation, history, input capture, scrolling, and drawing while delegating command execution.
console_cmd.ml → src/console_cmd.mld_event.ml → src/d_event.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mlhu_lib.ml → src/hu_lib.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencystd/string.ml as str → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/string.ml external dependencystd/time.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/time.ml external dependencyv_video.ml → src/v_video.mlinline function _CUI_Abs(v)Returns a non-negative animation distance.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
_cui_anim_durationTracks the mutable cui anim duration value used by the console ui subsystem.
_cui_anim_start_heightTracks the mutable cui anim start height value used by the console ui subsystem.
_cui_anim_startedTracks the mutable cui anim started value used by the console ui subsystem.
_cui_anim_target_heightTracks the mutable cui anim target height value used by the console ui subsystem.
function _CUI_DrawFPS(y)Reuses one text widget until the sampled FPS changes, keeping the closed-console overlay inexpensive.
| Parameter | Type | Default | Description |
|---|---|---|---|
y | dynamic | — | Vertical map- or screen-space coordinate. |
function _CUI_DrawText(x, y, text, cursor)Draws one clipped STCFN text line at logical coordinates with an optional underscore cursor.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
text | dynamic | — | Text to process. |
cursor | dynamic | — | Cursor value supplied to `_CUI_DrawText`. |
_cui_fontStores the cui font collection used by the console ui subsystem.
_cui_font_startTracks the mutable cui font start value used by the console ui subsystem.
_cui_fps_lineHolds the optional cui fps line resource used by the console ui subsystem.
_cui_fps_valueTracks the mutable cui fps value value used by the console ui subsystem.
_cui_heightTracks the mutable cui height value used by the console ui subsystem.
_cui_historyStores the cui history collection used by the console ui subsystem.
_cui_history_posTracks the mutable cui history pos value used by the console ui subsystem.
function _CUI_HistoryDown()Loads the following submitted command or returns to a blank newest entry.
function _CUI_HistoryUp()Loads the preceding submitted command into the editable line.
inline function _CUI_IDiv(a, b)Divides animation integers with truncation toward zero and a safe zero-divisor fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
_cui_initializedTracks whether cui initialized is active in the console ui subsystem.
_cui_inputStores the mutable cui input text used by the console ui subsystem.
_cui_logStores the cui log collection used by the console ui subsystem.
inline function _CUI_MaxScroll()Computes the oldest valid viewport offset for the fixed visible line count.
_cui_pause_ownedTracks whether cui pause owned is active in the console ui subsystem.
_cui_pause_restoreTracks whether cui pause restore is active in the console ui subsystem.
function _CUI_RecordHistory(command)Adds one submitted command to bounded navigation history, avoiding adjacent duplicates.
| Parameter | Type | Default | Description |
|---|---|---|---|
command | dynamic | — | Command value supplied to `_CUI_RecordHistory`. |
function _CUI_ReleasePause()Restores the pause state that existed before the console began capturing input.
_cui_scrollTracks the mutable cui scroll value used by the console ui subsystem.
function _CUI_SetInput(text)Replaces the editable command text with a bounded history entry.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to process. |
_cui_shift_downTracks whether cui shift down is active in the console ui subsystem.
function _CUI_Submit()Sends the current line across the parser boundary and applies only the returned UI requests.
function _CUI_UpdateAnimation()Advances the time-based slide and releases the owned pause only after the closing panel fully exits.
_cui_wanted_openTracks whether cui wanted open is active in the console ui subsystem.
const CUI_ANIMATION_MS = 200Defines cui animation ms for the console ui subsystem.
const CUI_BACKGROUND_COLOR = 0Defines the Doom palette selection for cui background color.
const CUI_BORDER_COLOR = 176Defines the Doom palette selection for cui border color.
function CUI_ClearLog()Clears console scrollback without altering command history or current input.
function CUI_Drawer()Renders the animated translucent panel, scrollback, separator, input line, and optional FPS counter.
function CUI_Init()Initializes bounded console collections and seeds the first informational log line exactly once.
function CUI_IsCapturing()Reports whether visible or animating console UI must consume all gameplay input.
const CUI_LINE_STEP = 9Defines cui line step for the console ui subsystem.
function CUI_Log(message)Splits and appends chronological system, error, chat, or command text to bounded scrollback.
| Parameter | Type | Default | Description |
|---|---|---|---|
message | dynamic | — | Message text or payload to process. |
const CUI_MAX_HISTORY = 32Defines the maximum cui max history accepted by the console ui subsystem.
const CUI_MAX_INPUT = 60Defines the maximum cui max input accepted by the console ui subsystem.
const CUI_MAX_LOG_LINES = 256Defines the maximum cui max log lines accepted by the console ui subsystem.
const CUI_PANEL_HEIGHT = 68Defines cui panel height for the console ui subsystem.
function CUI_Responder(ev)Toggles on tilde/O-umlaut, edits commands, scrolls output, and consumes every event while captured.
| Parameter | Type | Default | Description |
|---|---|---|---|
ev | dynamic | — | Input event to process. |
function CUI_SetFont(font, startchar)Receives the already cached STCFN HUD font so console text exactly matches one-line game messages.
| Parameter | Type | Default | Description |
|---|---|---|---|
font | dynamic | — | Font value supplied to `CUI_SetFont`. |
startchar | dynamic | — | Startchar value supplied to `CUI_SetFont`. |
function CUI_SetOpen(openConsole)Starts a reversible constant-speed slide and acquires or eventually restores the gameplay pause.
| Parameter | Type | Default | Description |
|---|---|---|---|
openConsole | dynamic | — | Open console value supplied to `CUI_SetOpen`. |
function CUI_Toggle()Reverses the current console target while preserving in-flight animation continuity.
const CUI_VISIBLE_LINES = 5Defines cui visible lines for the console ui subsystem.