/*
Q2PRO-X extended menu definitions.

This file is loaded automatically after q2pro.menu.
The "inject" blocks insert items into menus defined in q2pro.menu.
All "begin/end" blocks define Q2PRO-X specific submenus.
*/

inject options 0
    action --status "Grouped Q2PRO-X custom features: laghax, prediction, movement, video, sound" "Q2PRO-X" pushmenu q2prox
endinject

inject multiplayer 0
    action --status "Open the modern Q2PRO-X server browser overlay" "browse servers (Q2PRO-X)" serverbrowser_open_modern
endinject

inject game 0
    action --status "Browse every cvar live: search, description, values, source" "cvar reference (Q2PRO-X)" cvar_help
    action --status "Open the modern Q2PRO-X server browser overlay" "browse servers (Q2PRO-X)" serverbrowser_open
endinject

inject game 5
    action "Q2PRO-X" pushmenu q2prox
endinject

begin q2prox
    title "Q2PRO-X"
    style --no-compact
    action --status "Browse every cvar live: search, description, values, source" "cvar reference..." cvar_help
    blank
    action --status "Global settings: laghax, sound, movement, display, server browser, mod overlay" "global settings" pushmenu q2prox_global
    action --status "Mod-local settings: visual fx, visibility, scripts/binds" "local mod settings" pushmenu q2prox_local
    action --status "Config management: save, defaults, autosave, key binds" "config" pushmenu q2prox_config
    blank
    action --align --status "Open the classic renderer setup page" "legacy video setup..." pushmenu video
    action --align --status "Open the classic sound setup page" "legacy sound setup..." pushmenu sound
    action --align --status "Open the classic input setup page" "legacy input setup..." pushmenu input
end

begin q2prox_global
    title "Q2PRO-X / Global Settings"
    style --no-compact
    action --status "Adaptive prediction-error smoothing, HUD, and tuning weights" "laghax" pushmenu q2prox_laghax
    action --status "Ghost weapon prediction toggles and debug options" "weapon predicts" pushmenu q2prox_predict
    action --status "Predict-aware visual-only filter for muzzle, projectiles, impacts, explosions, hit markers" "weapon parts visibility" pushmenu q2prox_weaponfx
    action --status "FPS-independent movement and local player prediction" "movement & player" pushmenu q2prox_movement
    action --status "Display backend, desktop fullscreen, render scale" "display & capture" pushmenu q2prox_video
    action --status "OpenAL profile, HRTF, reverb, and runtime sound actions" "sound & acoustics" pushmenu q2prox_sound
    action --status "Headphone binaural 3D sound, HRTF encoding, and advanced tuning" "binaural / 3D" pushmenu q2prox_binaural
    action --status "Per-weapon and player volume controls (50 = default, 0 = mute, 100 = 2x)" "sound volumes" pushmenu q2prox_weaponvol
    action --status "In-game cvar reference browser settings: alpha, language, text scale" "cvar browser" pushmenu q2prox_cvarbrowser
    action --status "Modern server browser overlay settings" "server browser" pushmenu q2prox_serverbrowser
    action --status "Mod command overlay (OpenTDM/OpenFFA) settings" "mod overlay" pushmenu q2prox_modhelp
    action --status "Passive same-team HUD for OpenTDM matches: teammate health/armor/power, current weapon, freshness. Client-only, no auto-commands, no console spam." "opentdm team HUD" pushmenu q2prox_opentdm_teamhud
end

begin q2prox_local
    title "Q2PRO-X / Local Mod Settings"
    style --no-compact
    action --status "Fog, renderer tweaks, bloom, color grading, sharpen" "visual fx" pushmenu q2prox_vfx
    action --status "Item and player visibility highlighting with configurable colors" "visibility / highlights" pushmenu q2prox_vis
    action --status "Useful command binds, weapon drop modifier, macros" "scripts / binds" pushmenu q2prox_scripts
end

begin q2prox_config
    title "Q2PRO-X / Config"
    style --no-compact
    toggle --live --status "autosave Q2PRO-X config on menu changes (both scopes)" "autosave config" cl_q2prox_cfg_autosave
    toggle --live --status "cl_altf4_exit: Alt+F4 quits the game (default on)" "Alt+F4 quit" cl_altf4_exit
    blank
    values --status "cl_q2prox_menu_mode: 0 = classic (q2pro.menu + q2pro-x/*.menu overlays + inject), 1 = guided (q2pro-x.menu2 only). Takes effect after restart. -q2proxmenu2 forces guided for one run." "menu mode (restart required)" cl_q2prox_menu_mode classic guided
    blank
    bind --status "cvar_browser_toggle: toggle the Q2PRO-X cvar reference overlay" "cvar browser toggle key" cvar_browser_toggle
    blank
    action --align --status "Save all Q2PRO-X settings (global + mod-local)" "save all configs..." q2prox_cfg_save
    action --align --status "Save global settings to baseq2/q2pro-x/q2pro-x.cfg" "save global config..." q2prox_cfg_save_global
    action --align --status "Save mod-local settings to <gamedir>/q2pro-x/q2pro-x.cfg" "save mod config..." q2prox_cfg_save_local
    blank
    action --align --status "Reset all Q2PRO-X settings to defaults" "defaults all..." q2prox_cfg_defaults
    action --align --status "Reset only global settings to defaults" "defaults global..." q2prox_cfg_defaults_global
    action --align --status "Reset only mod-local settings to defaults" "defaults mod-local..." q2prox_cfg_defaults_local
end

begin q2prox_laghax
    title "Q2PRO-X / Laghax"
    style --no-compact
    values --status "cl_laghax: 0 = off, 1 = fixed window, 2 = adaptive smoothing" "laghax mode" cl_laghax off fixed adaptive
    toggle --status "cl_laghax_hud: draw real-time laghax overlay in the top-right corner (or wherever you dragged it)" "laghax HUD" cl_laghax_hud
    range --live --precision 2 --status "cl_laghax_hud_alpha: laghax HUD opacity (independent from scr_alpha)" "HUD opacity" cl_laghax_hud_alpha 0 1 0.05
    toggle --live --status "cl_laghax_hud_show_predict_params: add a compact row to the laghax HUD listing the weapon / player predicts that are currently enabled and effective. Live — the HUD updates immediately when you toggle predict cvars in another menu." "show weapons & player predicts enabled params" cl_laghax_hud_show_predict_params
    toggle --live --status "cl_laghax_hud_show_physics_params: add a compact row to the laghax HUD showing the current movement feel mode and step smoothing mode (always visible, including q2pro default), plus legacy predict and fixed move flags when effective. Live." "show physics enabled params" cl_laghax_hud_show_physics_params
    toggle --live --status "cl_laghax_hud_show_predict_runtime: add live ghost runtime rows to the laghax HUD (ammo gate, switch gate, handoff/suppress counters, predicted gun animation). Diagnostic only — does not change weapon prediction behaviour." "show weapon predict runtime" cl_laghax_hud_show_predict_runtime
    toggle --live --status "cl_laghax_hud_pillarbox_workspace: allow the laghax HUD to be placed into the pillarbox side bars (aspect-fit free area). Default position is the top-right of whichever workspace you choose." "pillarbox free area" cl_laghax_hud_pillarbox_workspace
    action --align --status "Enter laghax HUD edit mode: left-drag the widget to a new position, Enter or Escape to exit. Gameplay input is suspended while edit mode is active." "edit HUD position..." laghax_hud_edit
    action --align --status "Clear the saved HUD position and return to default top-right placement." "reset HUD position" laghax_hud_reset
    toggle --status "cl_laghax_debug: print smoothing stats every server frame" "laghax debug" cl_laghax_debug
    range --status "cl_laghax_maxms: hard safety cap for the smoothing window in milliseconds" "max ms cap" cl_laghax_maxms 0 150 5
    range --status "cl_laghax_maxwindow: adaptive-mode target cap before the hard clamp" "adaptive max window" cl_laghax_maxwindow 0 120 5
    range --status "cl_laghax_minerror: errors below this threshold snap instantly" "minimum error" cl_laghax_minerror 0 8 0.1
    range --status "cl_laghax_ping_weight: contribution of ping to adaptive stress" "ping weight" cl_laghax_ping_weight 0 1 0.05
    range --status "cl_laghax_jitter_weight: contribution of jitter to adaptive stress" "jitter weight" cl_laghax_jitter_weight 0 1 0.05
    range --status "cl_laghax_loss_weight: contribution of disturbance / drops to adaptive stress" "loss weight" cl_laghax_loss_weight 0 1 0.05
    range --status "cl_laghax_debt_weight: contribution of prediction debt to adaptive stress" "debt weight" cl_laghax_debt_weight 0 1 0.05
    range --status "cl_laghax_gap_weight: contribution of authority-gap signal to adaptive stress" "gap weight" cl_laghax_gap_weight 0 1 0.05
end

begin q2prox_opentdm_teamhud
    title "Q2PRO-X / OpenTDM Team HUD"
    style --no-compact
    toggle --live --status "cl_opentdm_team_hud: master enable for the passive same-team HUD. Only draws on OpenTDM, only while you are on TEAM_A or TEAM_B, never for spectators or on other mods." "opentdm team HUD" cl_opentdm_team_hud
    range --live --precision 2 --status "cl_opentdm_team_hud_alpha: team HUD opacity (independent from scr_alpha, modulated by OLED UI protection)" "HUD opacity" cl_opentdm_team_hud_alpha 0 1 0.05
    range --live --precision 2 --status "cl_opentdm_team_hud_scale: Team HUD text scale multiplier (independent from scr_scale; higher = larger and easier to read)" "text scale" cl_opentdm_team_hud_scale 0.5 2 0.05
    range --live --status "cl_opentdm_team_hud_width: width of the trailing LAST MSG area in character cells; use it to stretch the overlay horizontally without changing its position" "message width" cl_opentdm_team_hud_width 12 48 1
    toggle --live --status "cl_opentdm_team_hud_show_weapon: show the current held weapon column (decoded passively from teammate entity, works with cl_vwep 0)" "show weapon" cl_opentdm_team_hud_show_weapon
    toggle --live --status "cl_opentdm_team_hud_show_powerarmor: include P (power armor cells) in the H/A/P column when the last OpenTDM ID view reported it" "show power armor" cl_opentdm_team_hud_show_powerarmor
    toggle --live --status "cl_opentdm_team_hud_show_freshness: show a freshness / age indicator for passive teammate values (green -> yellow -> red -> disappear)" "show freshness" cl_opentdm_team_hud_show_freshness
    toggle --live --status "cl_opentdm_team_hud_show_teamchat: show the last already-visible say_team message beside the teammate who sent it (passive HUD mirror only, console/chat output unchanged)" "show last team chat" cl_opentdm_team_hud_show_teamchat
    range --live --status "cl_opentdm_team_hud_fresh_sec: how long passive teammate values stay green before transitioning into yellow and red; never exceeds stale threshold" "fresh period (sec)" cl_opentdm_team_hud_fresh_sec 1 120 1
    range --live --status "cl_opentdm_team_hud_stale_sec: seconds after which cached H/A/P and weapon values expire and disappear from the HUD" "stale threshold (sec)" cl_opentdm_team_hud_stale_sec 4 120 1
    toggle --live --status "cl_opentdm_team_hud_pillarbox_workspace: allow placement in the pillarbox side bars (aspect-fit free area)" "pillarbox free area" cl_opentdm_team_hud_pillarbox_workspace
    action --align --status "Enter OpenTDM Team HUD edit mode: left-drag to reposition, Enter or Escape to exit. Gameplay input is suspended while edit mode is active." "edit HUD position..." opentdm_team_hud_edit
    action --align --status "Clear the saved HUD position and return to the default placement." "reset HUD position" opentdm_team_hud_reset
end

begin q2prox_predict
    title "Q2PRO-X / Weapon Predicts"
    style --no-compact
    toggle --status "cl_predict_weapons_enable: master switch for the entire weapon-predict system. Off = all weapon predicts disabled regardless of per-weapon toggles; weapon-side admissions and weapon telemetry are silenced, but the shared ping gate may still govern player predict. Per-weapon cl_predict_* settings are preserved and resume when master is turned back on." "weapon predict master" cl_predict_weapons_enable
    blank
    pairs --status "cl_predict_debug: 1 = keep ghost and server effects together, 2 = verbose diagnostics" "predict debug" cl_predict_debug off 0 "show both" 1 verbose 2
    toggle --status "cl_weapon_anim_debug: print weapon animation timeline (server vs predicted gun frame) on every change" "weapon anim debug" cl_weapon_anim_debug
    toggle --status "cl_predict_rockets: predict own rocket launcher projectile immediately" "predict rockets" cl_predict_rockets
    toggle --status "cl_predict_rockets_explosion: predict the rocket impact explosion too" "predict rocket explosion" cl_predict_rockets_explosion
    toggle --status "cl_predict_railgun: predict the rail beam instantly on fire" "predict railgun" cl_predict_railgun
    toggle --status "cl_predict_shotgun: predict shotgun muzzle and pellet hit feedback" "predict shotgun" cl_predict_shotgun
    toggle --status "cl_predict_super_shotgun: predict super-shotgun muzzle and pellet hit feedback" "predict super shotgun" cl_predict_super_shotgun
    toggle --status "cl_predict_machinegun: predict machinegun local fire feedback" "predict machinegun" cl_predict_machinegun
    toggle --status "cl_predict_chaingun: predict chaingun local fire feedback" "predict chaingun" cl_predict_chaingun
    toggle --status "cl_predict_blaster: predict blaster projectile and muzzle feedback" "predict blaster" cl_predict_blaster
    toggle --status "cl_predict_grenades: predict grenade launcher projectile feedback" "predict grenades" cl_predict_grenades
    toggle --status "cl_predict_hand_grenades: predict hand-grenade throw feedback" "predict hand grenades" cl_predict_hand_grenades
    toggle --status "cl_predict_hyperblaster: predict hyperblaster local fire feedback" "predict hyperblaster" cl_predict_hyperblaster
    values --status "cl_predict_player: 0 = off, 1 = local jump/fall prediction, 2 = debug. Also gated by the shared adaptive ping gate — player predict becomes effective only after the same ping threshold and dwell timer as weapon predicts. Original entry also in movement & player menu." "predict player" cl_predict_player off on debug
    blank
    range --status "cl_predict_ping_min_ms: minimum ping (ms) before the shared adaptive gate admits weapon and player predicts. 0 = adaptive gate disabled; only raw/master toggles remain. >0 = gate opens only after ping has stayed at or above this threshold for the dwell time." "minimum ping (ms)" cl_predict_ping_min_ms 0 200 1
    range --status "cl_predict_ping_dwell_sec: seconds ping must stay continuously on one side of the threshold before the shared gate flips (covers both weapon predicts and player predict). 0 = instant flip (for testing). Default 5 sec prevents thrash." "ping dwell (sec)" cl_predict_ping_dwell_sec 0 30 1
end

begin q2prox_weaponfx
    title "Q2PRO-X / Weapon Parts Visibility"
    style --no-compact
    toggle --live --status "cl_weaponfx_vis_enable: master toggle for the Q2PRO-X visual filter (off = neutral, legacy cvars only)" "custom visibility layer" cl_weaponfx_vis_enable
    blank
    toggle --live --status "cl_weaponfx_vis_own_predicted: show local ghost/predicted weapon FX (instant fire visuals)" "own predicted fx" cl_weaponfx_vis_own_predicted
    toggle --live --status "cl_weaponfx_vis_own_server: show authoritative server FX that belong to our own fire path" "own server fx" cl_weaponfx_vis_own_server
    toggle --live --status "cl_weaponfx_vis_other: show weapon FX from other players / monsters / foreign sources" "other players fx" cl_weaponfx_vis_other
    blank
    toggle --live --status "cl_weaponfx_vis_muzzle: muzzle flash model / sprite / local muzzle visual" "muzzle flash" cl_weaponfx_vis_muzzle
    toggle --live --status "cl_weaponfx_vis_muzzle_light: dynamic light from muzzle flash" "muzzle light" cl_weaponfx_vis_muzzle_light
    toggle --live --status "cl_weaponfx_vis_hitscan: rail beam and any tracer-like direct-fire visual path" "hitscan beam / tracer" cl_weaponfx_vis_hitscan
    toggle --live --status "cl_weaponfx_vis_projectiles: flying rocket / grenade / blaster / HB / BFG projectile model (and its inherent glow)" "projectile models" cl_weaponfx_vis_projectiles
    toggle --live --status "cl_weaponfx_vis_trails: trails emitted by rockets, grenades, blasters, BFG" "projectile trails" cl_weaponfx_vis_trails
    toggle --live --status "cl_weaponfx_vis_impact_wall: wall/world impact visuals (gunshot sparks, smoke, blaster flash)" "wall impacts" cl_weaponfx_vis_impact_wall
    toggle --live --status "cl_weaponfx_vis_impact_flesh: blood / flesh-hit visuals" "flesh impacts" cl_weaponfx_vis_impact_flesh
    toggle --live --status "cl_weaponfx_vis_explosion_visual: explosion sprite / model" "explosion visual" cl_weaponfx_vis_explosion_visual
    toggle --live --status "cl_weaponfx_vis_explosion_particles: explosion debris / smoke particles" "explosion particles" cl_weaponfx_vis_explosion_particles
    toggle --live --status "cl_weaponfx_vis_explosion_light: dynamic light from explosions" "explosion light" cl_weaponfx_vis_explosion_light
    toggle --live --status "cl_weaponfx_vis_hit_markers: HUD hit marker (sound level still controlled by cl_hit_markers)" "hit markers" cl_weaponfx_vis_hit_markers
    blank
    action --align --status "Print current WFX state + effective behavior to console" "weapon parts info..." weaponfx_info
end

begin q2prox_movement
    title "Q2PRO-X / Movement"
    style --no-compact
    values --status "cl_mouse_behavior_mode: global mouse behaviour mode. q2pro = current Q2PRO-X default (raw input + m_accel + m_autosens + Q2PRO-X lookstrafe). r1q2 = compatibility for R1Q2 migrants (classic transform, R1Q2 lookstrafe; backend from m_directinput: 0=legacy cursor-centered, 1/2=DirectInput-like relative). Changes apply live." "mouse behavior" cl_mouse_behavior_mode q2pro r1q2
    values --status "cl_movement_feel_mode: client command timing. r1q2-like = classic standstill-start/jump feel; ignores fixed move." "movement feel" cl_movement_feel_mode q2pro r1q2-like
    values --status "cl_predict_move_mode: client prediction backend. cl_fixedmove and weapon predicts work in both." "client predict" cl_predict_move_mode "modern (new q2pro/Q2PRO-X)" "legacy (q2pro-m/q2pro r1826)"
    values --status "cl_step_smoothing_mode: local stair-step feel. Independent from predict mode and cl_fixedmove." "step smoothing" cl_step_smoothing_mode q2pro r1q2-1 r1q2-2 r1q2-3
    toggle --status "cl_fixedmove: normalize movement to a fixed 10 ms command clock (ignored when movement feel = r1q2-like)" "fixed move" cl_fixedmove
    toggle --status "cl_fixedmove_debug: print finalized fixedmove command timing" "fixedmove debug" cl_fixedmove_debug
    values --status "cl_predict_player: 0 = off, 1 = local jump/fall prediction, 2 = debug. When cl_predict_ping_min_ms > 0, also gated by the shared adaptive ping gate (same threshold + dwell as weapon predicts)." "predict player" cl_predict_player off on debug
    blank
    action --align --status "Print resolved movement feel state and applied backend" "movement feel info..." movementfeel_info
    action --align --status "Open the classic input setup page" "legacy input setup..." pushmenu input
    action --align --status "Open the classic key bindings page" "legacy key bindings..." pushmenu keys
end

begin q2prox_video
    title "Q2PRO-X / Display & Capture"
    style --no-compact
    pairs --status "vid_driver: win32wgl is classic OpenGL, win32egl is the capture-friendly ANGLE path" "video backend" vid_driver "win32wgl" win32wgl "win32egl" win32egl
    strings --status "vid_resolution: pick a resolution; in windowed mode this sets window size, in fullscreen modes it picks the display mode. 'desktop' = native monitor mode." "resolution" vid_resolution $$vid_resolution_list
    toggle --status "vid_windowed: run the game in a normal resizable window instead of fullscreen. Changes apply immediately. Alt+Enter also toggles this. In windowed mode, vid_resolution sets the window size." "windowed mode" vid_windowed
    pairs --status "vid_fullscreen_type: which fullscreen mode to use when windowed mode is OFF. Desktop fullscreen = borderless with fast Alt+Tab. Exclusive fullscreen = classic monitor-owned mode switch. Alt+Enter toggles between windowed and whichever mode is selected here." "default fullscreen mode" vid_fullscreen_type "desktop fullscreen" desktop "exclusive fullscreen" exclusive
    strings --status "vid_refresh: pick refresh rate (exclusive fullscreen only); 'max' = highest available; if exact rate not supported, snaps to closest; ignored in windowed and desktop modes" "refresh rate" vid_refresh $$vid_refresh_list
    range --status "vid_desktop_fullscreen_margin: shrink the borderless window slightly if a driver needs it (desktop fullscreen only)" "fullscreen margin" vid_desktop_fullscreen_margin 0 16 1
    values --live --status "vid_desktop_fullscreen_fit: fill = native monitor fill, aspect = preserve selected mode aspect with black bars (deterministic 4:3 pillarbox on widescreen)" "fullscreen fit" vid_desktop_fullscreen_fit fill aspect
    action --align --status "OLED protection suite: aspect-fit bar animation, idle full-screen dim, UI alpha breathing — idle and UI work in any display mode; bar animation requires app-owned aspect-fit bars" "OLED protection..." pushmenu q2prox_oled
    range --format "%d%%" --status "gl_render_scale: internal 3D scene resolution (100=native, 200=2x, auto-clamped by GPU limits)" "render scale" gl_render_scale 100 1000 25
    values --status "gl_render_scale_mode: auto=best path, texture=bloom/waterwarp, blit=high-range, tiled=extreme" "scale mode" gl_render_scale_mode auto texture blit tiled
    values --status "gl_render_scale_filter: resolve quality (fast=single blit, balanced=progressive 2x, quality=progressive+guard)" "scale filter" gl_render_scale_filter fast balanced quality
    blank
    range --live --precision 2 --status "cl_menu_alpha: menu background transparency (1.0 = opaque, lower = see game behind menu)" "menu opacity" cl_menu_alpha 0 1 0.05
    blank
    action --align --status "Print render scale status: path, maxima, tile grid, internal size" "render scale info..." gl_render_scale_info
    action --align --status "Apply vid_driver or desktop-fullscreen changes now" "restart video..." vid_restart
end

begin q2prox_oled
    title "Q2PRO-X / OLED Protection"
    style --no-compact
    toggle --live --status "vid_oled_enable: master switch for the OLED protection suite. Three independent subfeatures: aspect-fit bar animation (app-owned bars only), idle full-screen dim (any display mode), UI alpha breathing (any display mode)." "OLED protection" vid_oled_enable
    blank
    toggle --live --status "vid_oled_bar_protection: animate the aspect-fit black bars instead of leaving them static. Availability: only when Q2PRO-X owns app-side pillarbox bars (vid_desktop_fullscreen 1 + vid_desktop_fullscreen_fit 1 with the content rect smaller than the window). In exclusive fullscreen the monitor's driver owns any black bars, so this subfeature reports unavailable — idle dim and UI alpha protection continue to work there." "bar protection" vid_oled_bar_protection
    values --live --status "vid_oled_bar_preset: fade = single A->B->A, random fade = slow random drift between A and B, breathe = sinusoidal A->B->A" "bar preset" vid_oled_bar_preset fade "random fade" breathe
    pairs --live --status "vid_oled_bar_color_a: first bar protection color" "bar color A" vid_oled_bar_color_a "black" "#000000" "near black" "#0a0a0a" "dim gray" "#141414" "gray" "#1e1e1e"
    pairs --live --status "vid_oled_bar_color_b: second bar protection color" "bar color B" vid_oled_bar_color_b "black" "#000000" "near black" "#0a0a0a" "dim gray" "#141414" "gray" "#1e1e1e"
    range --live --format "%d s" --status "vid_oled_bar_delay_sec: seconds of plain black bars before bar animation starts (per eligible session). Low values useful for testing." "bar start delay" vid_oled_bar_delay_sec 10 3600 10
    range --live --format "%d min" --status "vid_oled_bar_active_min: minutes of bar animation per active phase" "bar active time" vid_oled_bar_active_min 1 10 1
    range --live --format "%d min" --status "vid_oled_bar_interval_min: minutes of plain black bars between active phases" "bar idle interval" vid_oled_bar_interval_min 1 60 1
    blank
    toggle --live --status "vid_oled_idle_protection: dim the entire window (game + HUD + menus + bars) after user inactivity; restores smoothly on input. Works in any display mode — windowed, exclusive fullscreen, desktop fullscreen. Also hides the mouse cursor during the dim pulse so it does not stay as a static bright dot on the darkened image." "idle screen protection" vid_oled_idle_protection
    range --live --format "%d s" --status "vid_oled_idle_delay_sec: seconds of user inactivity before the dim pulse starts. Low values useful for testing." "idle delay" vid_oled_idle_delay_sec 20 3600 10
    range --live --format "%d s" --status "vid_oled_idle_fade_sec: half-cycle time for visible->black and black->visible" "idle fade time" vid_oled_idle_fade_sec 5 120 5
    range --live --precision 1 --status "vid_oled_idle_hold_sec: how long the overlay stays at full dim (pure black) between pulse-down and pulse-up. Without this hold, the peak of the triangular waveform lasts ~1 frame and is imperceptible against permanently-black driver pillarbox bars. Set to 0 to restore the classic 1-frame peak. Ignored when idle monitor-off is active (HOLD phase stays indefinite until user activity)." "idle hold time" vid_oled_idle_hold_sec 0.0 30.0 0.5
    toggle --live --status "vid_oled_idle_monitor_off (Windows only, optional, default OFF): asks the operating system to put the WHOLE display into DPMS standby during the HOLD dark phase. This is an OS/display-level power-state action, not a rendering tweak — the entire monitor (not just the game viewport) physically stops emitting light until any user input wakes it. Exists mainly for OLED users who want the most aggressive burn-in protection, because monitor image processing (black stabilizer / game mode / SDR gamma LUT) can lift even a literal zero-framebuffer above panel-off level, so only DPMS matches the true pixels-off reference of exclusive-fullscreen pillarbox bars. When this is disabled (default), the Round 4c software-only path still runs: hardware framebuffer clear + post-processing suppression during HOLD_DARK, which is zero-risk and works in every display mode. When enabled, HOLD_DARK stays indefinite (no pulse cycling) and wakes on user input." "idle monitor DPMS off (Win, opt-in)" vid_oled_idle_monitor_off
    range --live --precision 2 --status "vid_oled_idle_restore_sec: when user activity is detected mid-pulse, how many seconds to fade the overlay back to zero" "idle restore time" vid_oled_idle_restore_sec 0.1 5.0 0.1
    toggle --live --status "vid_oled_idle_mute_audio: mute game audio while OLED idle screen protection is actively dimming the screen; restores automatically when user activity resumes. Does not modify s_volume. Stacks safely with s_mute_when_inactive." "mute audio on idle protect" vid_oled_idle_mute_audio
    blank
    toggle --live --status "vid_oled_ui_protection: softly modulate the alpha of protected UI paths (draw HUD items, laghax HUD, modern server browser) over time to reduce burn-in risk. Subtle sinusoidal breathing between min and max alpha over the cycle time. Works in any display mode — windowed, exclusive fullscreen, desktop fullscreen." "interface alpha protect" vid_oled_ui_protection
    range --live --precision 2 --status "vid_oled_ui_min_alpha: minimum alpha during the cycle (0.0 = fully invisible, 1.0 = fully opaque)" "interface min alpha" vid_oled_ui_min_alpha 0.0 1.0 0.05
    range --live --precision 2 --status "vid_oled_ui_max_alpha: maximum alpha during the cycle" "interface max alpha" vid_oled_ui_max_alpha 0.05 1.0 0.05
    range --live --format "%d s" --status "vid_oled_ui_cycle_sec: one full min->max->min cycle duration in seconds" "interface cycle time" vid_oled_ui_cycle_sec 5 600 5
    blank
    action --align --status "Print OLED protection status to console with per-subfeature eligibility reasons (why bar/idle/ui is or is not currently active), phases, colors, idle alpha, ui alpha, cursor suppression" "OLED info..." vid_oled_info
end

begin q2prox_vfx
    title "Q2PRO-X / Visual FX (mod-local)"
    style --no-compact
    toggle --live --status "usefog: client-side fog effect (shader renderer only, q2pro-m compatible)" "fog" usefog
    range --live --precision 2 --status "fogdensity: fog density (higher = thicker)" "fog density" fogdensity 0.01 1 0.01
    range --live --precision 2 --status "foghue: fog color hue (0-1, HSL)" "fog hue" foghue 0 1 0.05
    range --live --precision 2 --status "fogsaturation: fog color saturation (0-1, HSL)" "fog saturation" fogsaturation 0 1 0.05
    range --live --precision 2 --status "foglightness: fog color lightness (0-1, HSL)" "fog lightness" foglightness 0 1 0.05
    blank
    values --live --status "gl_dynamic: 0=off, 1=all dynamic lights, 2=only switchable lights" "dynamic lights" gl_dynamic no yes "only switchable"
    values --live --status "gl_shadows: 0=off, 1=basic hard shadows, 2=fade (softer shadow mode)" "shadows" gl_shadows off basic fade
    toggle --live --status "cl_noglow: disable entity glow effects" "no glow" cl_noglow
    toggle --live --status "gl_polyblend: palette blend effect (damage flash, underwater tint)" "poly blend" gl_polyblend
    toggle --live --status "gl_coloredlightmaps: use colored lightmaps" "colored lightmaps" gl_coloredlightmaps
    range --live --precision 1 --status "gl_brightness: global brightness offset" "brightness" gl_brightness 0 1 0.1
    range --live --precision 0 --status "gl_celshading: cel shading line width (0=off)" "cel shading" gl_celshading 0 10 1
    blank
    values --live --status "gl_bloom: bloom quality / iterations (0=off, 1-8)" "bloom" gl_bloom off 1 2 3 4 5 6 7 8
    range --live --precision 2 --status "gl_bloom_strength: bloom contribution to final image (1.0=default)" "bloom strength" gl_bloom_strength 0 3 0.1
    range --live --precision 2 --status "gl_bloom_threshold: suppress dim bloom (0=all passes, higher=brighter only)" "bloom threshold" gl_bloom_threshold 0 1 0.05
    range --live --precision 1 --status "gl_bloom_sigma: bloom blur softness / radius (4=default)" "bloom sigma" gl_bloom_sigma 1 12 0.5
    range --live --precision 2 --status "gl_glowmap_intensity: glowmap emissive brightness (0.75=default)" "glowmap intensity" gl_glowmap_intensity 0 2 0.1
    blank
    values --live --status "gl_post_profile: color grading preset" "grading profile" gl_post_profile off neutral warm arena cinematic
    range --live --precision 2 --status "gl_post_contrast: contrast multiplier (1.0=default)" "contrast" gl_post_contrast 0.5 2 0.05
    range --live --precision 2 --status "gl_post_vibrance: selective saturation boost (0=default)" "vibrance" gl_post_vibrance -1 1 0.05
    range --live --precision 2 --status "gl_post_temperature: warm/cool shift (0=neutral)" "temperature" gl_post_temperature -1 1 0.05
    blank
    range --live --precision 1 --status "gl_sharpen: sharpen/clarity strength (0=off)" "sharpen" gl_sharpen 0 10 0.5
    blank
    action --align --status "Print visual FX status" "visual fx info..." gl_visual_fx_info
end

begin q2prox_sound
    title "Q2PRO-X / Sound"
    style --no-compact
    values --live --status "s_enable: OpenAL is required for al_profile, HRTF, and room acoustics" "sound engine" s_enable "no sound" "software (DMA)" "OpenAL"
    values --live --status "al_sound_profile: curated acoustics recipe (manual tweaks switch to custom; HRTF/resampler stay independent)" "sound profile" al_sound_profile custom competitive balanced immersive cinematic cathedral
    pairs --live --status "s_khz: requested output sample rate (actual rate depends on backend/device)" "output rate" s_khz 11 11 22 22 44 44 48 48 96 96
    pairs --live --status "s_sampleformat: precision preference (auto = backend default, float32 = higher headroom)" "sample format" s_sampleformat auto auto s16 s16 float32 float32
    values --live --status "al_profile: 0 = current Q2PRO-X OpenAL, 1 = classic R1Q2-like OpenAL" "OpenAL profile" al_profile "Q2PRO-X" "R1Q2-like"
    values --live --status "al_hrtf: 0 = force off, 1 = OpenAL runtime default, 2 = force on" "HRTF" al_hrtf off auto on
    pairs --live --status "al_resampler: OpenAL playback SRC quality" "OpenAL resampler" al_resampler default default cubic cubic bsinc12 bsinc12 bsinc24 bsinc24 point point linear linear
    pairs --live --status "s_resampler: DMA backend SRC quality (only for s_enable 1)" "DMA resampler" s_resampler legacy legacy linear linear cubic cubic
    toggle --live --status "al_reverb: enable room acoustics and EFX reverb" "reverberation support" al_reverb
    pairs --live --status "al_eax_preset: -1 = automatic room classifier, 0..6 = force a room type" "reverb preset" al_eax_preset auto -1 generic 0 small 1 medium 2 hall 3 corridor 4 outdoor 5 underwater 6
    range --live --status "al_eax_wet: world-source reverb send amount" "reverb wet" al_eax_wet 0 1 0.05
    range --live --status "al_eax_local_wet: first-person local-source reverb send amount" "local wet" al_eax_local_wet 0 1 0.05
    range --live --status "al_reverb_lerp_time: seconds to blend between automatic room presets" "lerp time" al_reverb_lerp_time 0 5 0.1
    toggle --live --status "al_eax_occlusion: lowpass blocked world sounds while keeping their reverb tail" "occlusion" al_eax_occlusion
    range --live --status "al_eax_explosion_wet: reverb send for explosion sounds" "explosion wet" al_eax_explosion_wet 0 1 0.05
    range --live --status "al_eax_explosion_decay: explosion tail length multiplier (1.0 = same as room)" "explosion decay" al_eax_explosion_decay 1 3 0.05
    range --live --status "al_eax_explosion_late: explosion late reverb strength multiplier" "explosion late" al_eax_explosion_late 1 2 0.05
    range --live --status "al_eax_transport_wet: reverb send for movers, hums, looping world sounds (0-1)" "transport wet" al_eax_transport_wet 0 1 0.05
    range --live --status "al_reverb_reflections: early reflections strength multiplier (1.0 = default)" "reflections" al_reverb_reflections 0 4 0.1
    range --live --status "al_reverb_late: late reverb tail strength multiplier (1.0 = default)" "late reverb" al_reverb_late 0 4 0.1
    range --live --status "al_reverb_decay: decay time multiplier (1.0 = default)" "decay" al_reverb_decay 0.1 50 0.5
    range --live --status "al_reverb_delay: reflections + late delay multiplier (1.0 = default)" "delay" al_reverb_delay 0.1 4 0.1
    range --live --status "al_reverb_hf: high-frequency brightness multiplier (1.0 = default)" "HF brightness" al_reverb_hf 0 4 0.1
    range --live --status "al_reverb_diffusion: diffusion / smoothness multiplier (1.0 = default)" "diffusion" al_reverb_diffusion 0 2 0.1
    toggle --live --status "al_eax_debug: print room classifier and routing diagnostics" "reverb debug" al_eax_debug
    blank
    toggle --live --status "s_mute_when_inactive: mute game audio when the client window is not active/focused (e.g. after Alt+Tab); restores automatically when focus returns. Does not modify s_volume." "mute when inactive" s_mute_when_inactive
    blank
    action --align --status "Print the current room preset, classifier data, and wet-state" "reverb info..." al_reverb_info
    action --align --status "Reload the active room preset immediately and cancel the current lerp" "reload current reverb..." al_reverb_reload
    action --align --status "Print available OpenAL resamplers from the runtime" "resampler list..." al_resampler_list
    action --align --status "Apply sound engine, HRTF, profile, and room-acoustics changes" "restart sound..." snd_restart
    action --align --status "Open the classic sound setup page" "legacy sound setup..." pushmenu sound
end

begin q2prox_binaural
    title "Q2PRO-X / Binaural"
    style --no-compact
    values --status "al_binaural_profile: curated headphone presets (manual tweaks switch to custom)" "binaural profile" al_binaural_profile custom default auto deep cinematic
    values --status "al_binaural: 0 = off, 1 = auto (runtime decides), 2 = on (force HRTF)" "binaural" al_binaural off auto on
    values --status "al_binaural_encoding: stereo output encoding (requires snd_restart)" "encoding" al_binaural_encoding auto basic hrtf uhj
    values --status "al_binaural_hrtf_mode: HRTF processing quality (requires snd_restart, app-local config)" "HRTF mode" al_binaural_hrtf_mode default full ambi1 ambi2 ambi3
    pairs --status "al_binaural_hrtf_size: HRTF filter length (0 = runtime default, requires snd_restart)" "HRTF filter size" al_binaural_hrtf_size default 0 32 32 64 64
    range --status "al_binaural_crossfeed: headphone crossfeed level 0-6 (0 = off, requires snd_restart)" "crossfeed" al_binaural_crossfeed 0 6 1
    blank
    action --align --status "Print current binaural runtime state and requested settings" "binaural info..." al_binaural_info
    action --align --status "Apply binaural and sound engine changes" "restart sound..." snd_restart
end

begin q2prox_scripts
    title "Q2PRO-X / Scripts"
    style --no-compact
    bind --status "+dropw: hold to make weapon binds drop instead of use (q2pro-m feature)" "weapon drop modifier" +dropw
    bind --status "followip: connect to the last IP shown in console" "follow console IP" followip
    bind --status "aadump: dump scoreboard to console as ASCII art" "score dump (console)" aadump
    bind --status "aashot: dump scoreboard to file as ASCII art" "score dump (file)" aashot
    bind --status "ready: signal ready state to server" "ready" ready
    bind --status "unready: signal not-ready state to server" "unready" unready
    bind --status "vote yes: cast a positive vote" "vote yes" "vote yes"
    bind --status "vote no: cast a negative vote" "vote no" "vote no"
    bind --status "screenshot: take a screenshot" "screenshot" screenshot
    blank
    action --align --status "Print list of available console macros" "list macros..." macrolist
end

begin q2prox_modhelp
    title "Q2PRO-X / Mod Overlay"
    style --no-compact
    range --live --precision 2 --status "cl_modhelp_alpha: overlay background opacity" "opacity" cl_modhelp_alpha 0 1 0.05
    range --live --precision 1 --status "cl_modhelp_scale: text scale multiplier" "text scale" cl_modhelp_scale 0.5 2 0.1
    toggle --live --status "cl_modhelp_compact: use compact line spacing" "compact mode" cl_modhelp_compact
    toggle --live --status "cl_modhelp_fullscreen: expand overlay to fill screen" "fullscreen" cl_modhelp_fullscreen
    toggle --live --status "cl_modhelp_show_aliases: show command aliases" "show aliases" cl_modhelp_show_aliases
    blank
    toggle --live --status "cl_modhelp_show_general: show general commands page" "show general" cl_modhelp_show_general
    toggle --live --status "cl_modhelp_show_spectator: show spectator commands page" "show spectator" cl_modhelp_show_spectator
    toggle --live --status "cl_modhelp_show_team: show team/captain commands page" "show team" cl_modhelp_show_team
    toggle --live --status "cl_modhelp_show_stats: show stats commands page" "show stats" cl_modhelp_show_stats
    toggle --live --status "cl_modhelp_show_voting: show voting commands page" "show voting" cl_modhelp_show_voting
    toggle --live --status "cl_modhelp_show_admin: show admin commands page" "show admin" cl_modhelp_show_admin
    blank
    values --live --status "cl_modhelp_role: override role detection (0=auto)" "overlay role" cl_modhelp_role auto player spectator caster captain admin
    values --live --status "cl_modhelp_unavailable: how to display unavailable rows (0=show, 1=gray, 2=hide)" "unavailable rows" cl_modhelp_unavailable show gray hide
    toggle --live --status "cl_modhelp_confirm_dangerous: confirm before executing dangerous commands" "confirm dangerous" cl_modhelp_confirm_dangerous
    toggle --live --status "cl_modhelp_prefer_context_page: auto-select page by role when overlay opens" "prefer context page" cl_modhelp_prefer_context_page
    blank
    toggle --live --status "cl_modhelp_show_badges: show role/danger badges on selected row" "show row badges" cl_modhelp_show_badges
    toggle --live --status "cl_modhelp_keep_page: remember last page between close/reopen" "keep last page" cl_modhelp_keep_page
    toggle --live --status "cl_modhelp_show_pinned: show pinned commands page first on open" "show pinned first" cl_modhelp_show_pinned
    toggle --live --status "cl_modhelp_use_local: load q2pro.modhelp.local overrides" "use local overrides" cl_modhelp_use_local
    blank
    action --align --status "Toggle mod overlay on/off (bind modhelp_toggle to a key)" "toggle overlay..." modhelp_toggle
    bind --status "modhelp_toggle: toggle the mod command overlay" "overlay toggle key" modhelp_toggle
    bind --status "modhelp_search: open search mode in overlay" "search key" modhelp_search
end

begin q2prox_vis
    title "Q2PRO-X / Visibility"
    style --no-compact
    toggle --live --status "cl_vis_enable: master switch for all visibility highlighting" "enable highlighting" cl_vis_enable
    toggle --live --status "cl_vis_singleplayer: allow highlighting in single-player" "single-player" cl_vis_singleplayer
    toggle --live --status "cl_vis_items: enable item/pickup highlighting" "item highlighting" cl_vis_items
    values --live --status "cl_vis_items_style: 0=off, 1=shell, 2=tint, 3=shell+tint" "item style" cl_vis_items_style off shell tint "shell+tint"
    range --live --precision 2 --status "cl_vis_items_alpha: tint overlay opacity" "tint alpha" cl_vis_items_alpha 0.05 1 0.05
    range --live --precision 2 --status "cl_vis_items_shell_alpha: shell overlay opacity" "shell alpha" cl_vis_items_shell_alpha 0.05 1 0.05
    range --live --precision 2 --status "cl_vis_items_shell_scale: shell thickness (clamped to 0.1 in deathmatch > 1)" "shell thickness" cl_vis_items_shell_scale 0.01 4 0.01
    range --live --precision 2 --status "cl_vis_items_brightness: global highlight intensity (1.0 = default, 10.0 = max)" "item brightness" cl_vis_items_brightness 0 10 0.05
    range --live --precision 2 --status "cl_vis_items_scale: item model size (>1.0 clamped in multiplayer for safety)" "item scale" cl_vis_items_scale 0.1 5 0.05
    blank
    toggle --live --status "cl_vis_weapons: master switch for weapon pickup highlighting" "weapon highlighting" cl_vis_weapons
    range --live --precision 2 --status "cl_vis_weapons_scale: weapon model size (>1.0 clamped in multiplayer for safety)" "weapon scale" cl_vis_weapons_scale 0.1 5 0.05
    blank
    toggle --live --status "cl_vis_players: highlight other player models" "player highlighting" cl_vis_players
    values --live --status "cl_vis_players_mode: off/all/FFA/duel/auto/team (auto=team>duel>fallback)" "player mode" cl_vis_players_mode off all "random FFA" duel auto team
    values --live --status "cl_vis_players_style: 0=off, 1=shell, 2=tint, 3=shell+tint" "player style" cl_vis_players_style off shell tint "shell+tint"
    range --live --precision 2 --status "cl_vis_players_alpha: player tint opacity" "player tint alpha" cl_vis_players_alpha 0.05 1 0.05
    range --live --precision 2 --status "cl_vis_players_shell_alpha: player shell opacity" "player shell alpha" cl_vis_players_shell_alpha 0.05 1 0.05
    range --live --precision 3 --status "cl_vis_players_shell_scale: player shell contour (0=thinnest, 0.05=max)" "player shell thickness" cl_vis_players_shell_scale 0 0.05 0.005
    range --live --precision 2 --status "cl_vis_players_brightness: player highlight intensity" "player brightness" cl_vis_players_brightness 0 10 0.05
    toggle --live --status "cl_vis_players_self: highlight your own player model" "highlight self" cl_vis_players_self
    values --live --status "cl_vis_players_auto_fallback: fallback mode when auto can't confirm duel" "auto fallback" cl_vis_players_auto_fallback all "random FFA"
    range --live --precision 0 --status "cl_vis_players_duel_hold_ms: ms to confirm stable duel (100-3000)" "duel hold ms" cl_vis_players_duel_hold_ms 100 3000 100
    values --live --status "cl_vis_players_team_source: team detection source (off/auto/opentdm)" "team source" cl_vis_players_team_source off auto opentdm
    values --live --status "cl_vis_players_team_fallback: fallback when team truth is weak" "team fallback" cl_vis_players_team_fallback all "random FFA" duel
    range --live --precision 0 --status "cl_vis_players_team_hold_ms: ms to confirm stable team assignment" "team hold ms" cl_vis_players_team_hold_ms 100 3000 100
    pairs --live --status "cl_vis_players_team_friendly_color: teammate highlight color" "friendly color" cl_vis_players_team_friendly_color cyan "#33ccff" blue "#3366ff" green "#33ff66" lime "#66ff66" yellow "#ffff33" white "#ffffff"
    pairs --live --status "cl_vis_players_team_enemy_color: enemy highlight color" "enemy color" cl_vis_players_team_enemy_color red "#ff4444" orange "#ff6633" magenta "#ff33ff" yellow "#ffff33" white "#ffffff" cyan "#33ccff"
    blank
    action --status "Per-class enable toggles for pickups (health, armor, ammo, powerups, keys)" "item toggles..." pushmenu q2prox_vis_toggles
    action --status "Per-class color presets for pickups" "item colors..." pushmenu q2prox_vis_colors
    action --status "Per-weapon enable toggles" "weapon toggles..." pushmenu q2prox_vis_weapon_toggles
    action --status "Per-weapon color presets" "weapon colors..." pushmenu q2prox_vis_weapon_colors
    blank
    action --align --status "Print item classification and highlight status" "vis items info..." cl_vis_items_info
end

begin q2prox_vis_toggles
    title "Q2PRO-X / Vis Toggles"
    style --no-compact
    toggle --live --status "cl_vis_health_small: highlight stimpack" "health small" cl_vis_health_small
    toggle --live --status "cl_vis_health_medium: highlight medium health" "health medium" cl_vis_health_medium
    toggle --live --status "cl_vis_health_large: highlight large health" "health large" cl_vis_health_large
    toggle --live --status "cl_vis_health_mega: highlight mega health" "health mega" cl_vis_health_mega
    toggle --live --status "cl_vis_armor_shard: highlight armor shard" "armor shard" cl_vis_armor_shard
    toggle --live --status "cl_vis_armor_jacket: highlight jacket armor" "armor jacket" cl_vis_armor_jacket
    toggle --live --status "cl_vis_armor_combat: highlight combat armor" "armor combat" cl_vis_armor_combat
    toggle --live --status "cl_vis_armor_body: highlight body armor" "armor body" cl_vis_armor_body
    toggle --live --status "cl_vis_armor_screen: highlight power screen" "armor screen" cl_vis_armor_screen
    toggle --live --status "cl_vis_armor_shield: highlight power shield" "armor shield" cl_vis_armor_shield
    toggle --live --status "cl_vis_ammo: highlight ammo pickups" "ammo" cl_vis_ammo
    toggle --live --status "cl_vis_powerups: highlight powerups (quad, invul, etc)" "powerups" cl_vis_powerups
    toggle --live --status "cl_vis_keys: highlight keys" "keys" cl_vis_keys
end

begin q2prox_vis_colors
    title "Q2PRO-X / Vis Colors"
    style --no-compact
    pairs --live --status "cl_vis_health_small_color: stimpack highlight color" "health small" cl_vis_health_small_color green "#66ff66" lime "#33ff33" cyan "#66ffff" yellow "#ffff33" white "#ffffff"
    pairs --live --status "cl_vis_health_medium_color: medium health highlight color" "health medium" cl_vis_health_medium_color green "#33ff33" lime "#00ff00" cyan "#33ffff" yellow "#ffcc33" white "#ffffff"
    pairs --live --status "cl_vis_health_large_color: large health highlight color" "health large" cl_vis_health_large_color green "#00ff00" lime "#33ff33" cyan "#00ffff" yellow "#ffcc33" white "#ffffff"
    pairs --live --status "cl_vis_health_mega_color: mega health highlight color" "health mega" cl_vis_health_mega_color magenta "#ff33ff" red "#ff3333" cyan "#33ffff" blue "#3399ff" white "#ffffff"
    pairs --live --status "cl_vis_armor_shard_color: armor shard highlight color" "armor shard" cl_vis_armor_shard_color cyan "#66ffff" green "#66ff66" blue "#6699ff" white "#ffffff"
    pairs --live --status "cl_vis_armor_jacket_color: jacket armor highlight color" "armor jacket" cl_vis_armor_jacket_color green "#66ff66" lime "#33ff33" cyan "#66ffff" yellow "#ffcc33" white "#ffffff"
    pairs --live --status "cl_vis_armor_combat_color: combat armor highlight color" "armor combat" cl_vis_armor_combat_color yellow "#ffd633" orange "#ff9933" green "#66ff66" white "#ffffff"
    pairs --live --status "cl_vis_armor_body_color: body armor highlight color" "armor body" cl_vis_armor_body_color red "#ff3333" orange "#ff6633" magenta "#ff33ff" yellow "#ffcc33" white "#ffffff"
    pairs --live --status "cl_vis_armor_screen_color: power screen highlight color" "armor screen" cl_vis_armor_screen_color cyan "#66ccff" blue "#3399ff" green "#66ff66" white "#ffffff"
    pairs --live --status "cl_vis_armor_shield_color: power shield highlight color" "armor shield" cl_vis_armor_shield_color blue "#3399ff" cyan "#66ccff" magenta "#ff33ff" white "#ffffff"
    pairs --live --status "cl_vis_ammo_color: ammo pickup highlight color" "ammo" cl_vis_ammo_color white "#ffffff" cyan "#66ffff" green "#66ff66" yellow "#ffcc33"
    pairs --live --status "cl_vis_powerups_color: powerup highlight color" "powerups" cl_vis_powerups_color blue "#3399ff" cyan "#33ffff" magenta "#ff33ff" red "#ff3333" white "#ffffff"
    pairs --live --status "cl_vis_keys_color: key highlight color" "keys" cl_vis_keys_color magenta "#ff66cc" red "#ff3333" cyan "#66ffff" yellow "#ffcc33" white "#ffffff"
end

begin q2prox_vis_weapon_toggles
    title "Q2PRO-X / Weapon Toggles"
    style --no-compact
    toggle --live --status "cl_vis_weapon_shotgun: highlight shotgun pickup" "shotgun" cl_vis_weapon_shotgun
    toggle --live --status "cl_vis_weapon_sshotgun: highlight super shotgun pickup" "super shotgun" cl_vis_weapon_sshotgun
    toggle --live --status "cl_vis_weapon_machinegun: highlight machinegun pickup" "machinegun" cl_vis_weapon_machinegun
    toggle --live --status "cl_vis_weapon_chaingun: highlight chaingun pickup" "chaingun" cl_vis_weapon_chaingun
    toggle --live --status "cl_vis_weapon_grenade: highlight grenade launcher pickup" "grenade launcher" cl_vis_weapon_grenade
    toggle --live --status "cl_vis_weapon_rocket: highlight rocket launcher pickup" "rocket launcher" cl_vis_weapon_rocket
    toggle --live --status "cl_vis_weapon_hyperblaster: highlight hyperblaster pickup" "hyperblaster" cl_vis_weapon_hyperblaster
    toggle --live --status "cl_vis_weapon_railgun: highlight railgun pickup" "railgun" cl_vis_weapon_railgun
    toggle --live --status "cl_vis_weapon_bfg: highlight BFG10K pickup" "BFG10K" cl_vis_weapon_bfg
end

begin q2prox_vis_weapon_colors
    title "Q2PRO-X / Weapon Colors"
    style --no-compact
    pairs --live --status "cl_vis_weapon_shotgun_color: shotgun highlight color" "shotgun" cl_vis_weapon_shotgun_color grey "#999999" white "#ffffff" yellow "#ffcc33" green "#66ff66"
    pairs --live --status "cl_vis_weapon_sshotgun_color: super shotgun highlight color" "super shotgun" cl_vis_weapon_sshotgun_color grey "#999999" white "#ffffff" yellow "#ffcc33" green "#66ff66"
    pairs --live --status "cl_vis_weapon_machinegun_color: machinegun highlight color" "machinegun" cl_vis_weapon_machinegun_color brown "#cc9933" yellow "#ffcc33" orange "#ff9933" white "#ffffff"
    pairs --live --status "cl_vis_weapon_chaingun_color: chaingun highlight color" "chaingun" cl_vis_weapon_chaingun_color brown "#cc9933" yellow "#ffcc33" orange "#ff9933" white "#ffffff"
    pairs --live --status "cl_vis_weapon_grenade_color: grenade launcher highlight color" "grenade launcher" cl_vis_weapon_grenade_color "dark red" "#993333" red "#ff3333" orange "#ff6633" white "#ffffff"
    pairs --live --status "cl_vis_weapon_rocket_color: rocket launcher highlight color" "rocket launcher" cl_vis_weapon_rocket_color red "#ff3333" orange "#ff6633" yellow "#ffcc33" white "#ffffff"
    pairs --live --status "cl_vis_weapon_hyperblaster_color: hyperblaster highlight color" "hyperblaster" cl_vis_weapon_hyperblaster_color "green-yellow" "#99cc33" green "#66ff66" yellow "#ffcc33" cyan "#66ffff" white "#ffffff"
    pairs --live --status "cl_vis_weapon_railgun_color: railgun highlight color" "railgun" cl_vis_weapon_railgun_color blue "#3366ff" cyan "#33ccff" magenta "#ff33ff" white "#ffffff"
    pairs --live --status "cl_vis_weapon_bfg_color: BFG10K highlight color" "BFG10K" cl_vis_weapon_bfg_color "green-blue" "#33cc99" green "#33ff66" cyan "#33ffff" blue "#3399ff" white "#ffffff"
end

begin q2prox_weaponvol
    title "Q2PRO-X / Sound Volumes"
    style --no-compact
    range --live --format "%d%%" --status "s_weapon_blaster_volume: 50 = default, 0 = mute, 100 = 2x louder" "blaster" s_weapon_blaster_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_shotgun_volume: 50 = default, 0 = mute, 100 = 2x louder" "shotgun" s_weapon_shotgun_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_supershotgun_volume: 50 = default, 0 = mute, 100 = 2x louder" "super shotgun" s_weapon_supershotgun_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_machinegun_volume: 50 = default, 0 = mute, 100 = 2x louder" "machinegun" s_weapon_machinegun_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_chaingun_volume: 50 = default, 0 = mute, 100 = 2x louder" "chaingun" s_weapon_chaingun_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_handgrenade_volume: 50 = default, 0 = mute, 100 = 2x louder" "hand grenades" s_weapon_handgrenade_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_grenadelauncher_volume: 50 = default, 0 = mute, 100 = 2x louder" "grenade launcher" s_weapon_grenadelauncher_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_rocketlauncher_volume: 50 = default, 0 = mute, 100 = 2x louder" "rocket launcher" s_weapon_rocketlauncher_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_hyperblaster_volume: 50 = default, 0 = mute, 100 = 2x louder" "hyperblaster" s_weapon_hyperblaster_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_railgun_volume: 50 = default, 0 = mute, 100 = 2x louder" "railgun" s_weapon_railgun_volume 0 100 5
    range --live --format "%d%%" --status "s_weapon_bfg_volume: 50 = default, 0 = mute, 100 = 2x louder" "BFG10K" s_weapon_bfg_volume 0 100 5
    blank
    range --live --format "%d%%" --status "s_player_volume: player movement sounds (jump, land, fall, steps). 50 = default" "player sounds" s_player_volume 0 100 5
    range --live --format "%d%%" --status "s_voice_volume: player voice (pain, death, taunts). 50 = default" "voice / pain" s_voice_volume 0 100 5
    range --live --format "%d%%" --status "s_pickup_volume: item pickup sounds (health, armor, ammo, weapons). 50 = default" "item pickups" s_pickup_volume 0 100 5
    range --live --format "%d%%" --status "s_environment_volume: world sounds (doors, glass, platforms, debris). 50 = default" "environment" s_environment_volume 0 100 5
    range --live --format "%d%%" --status "s_monster_volume: monster/enemy sounds (voice, weapons, movement). 50 = default" "monsters" s_monster_volume 0 100 5
    range --live --format "%d%%" --status "s_announcer_volume: game announcer (computer updated, secrets). 50 = default" "announcer" s_announcer_volume 0 100 5
    range --live --format "%d%%" --status "s_interface_volume: menu navigation and UI sounds. 50 = default" "menu / UI" s_interface_volume 0 100 5
    range --live --format "%d%%" --status "s_other_volume: all other unclassified sounds. 50 = default" "other / misc" s_other_volume 0 100 5
    range --live --format "%d%%" --status "s_ambient_volume: ambient/world loop sounds (movers, hums, teleports). 50 = default" "ambient loops" s_ambient_volume 0 100 5
    blank
    action --align --refresh --status "Mute all sounds" "all off" "set s_weapon_blaster_volume 0; set s_weapon_shotgun_volume 0; set s_weapon_supershotgun_volume 0; set s_weapon_machinegun_volume 0; set s_weapon_chaingun_volume 0; set s_weapon_handgrenade_volume 0; set s_weapon_grenadelauncher_volume 0; set s_weapon_rocketlauncher_volume 0; set s_weapon_hyperblaster_volume 0; set s_weapon_railgun_volume 0; set s_weapon_bfg_volume 0; set s_player_volume 0; set s_voice_volume 0; set s_pickup_volume 0; set s_environment_volume 0; set s_monster_volume 0; set s_announcer_volume 0; set s_interface_volume 0; set s_other_volume 0; set s_ambient_volume 0"
    action --align --refresh --status "Restore all volumes to default (50)" "restore defaults" "set s_weapon_blaster_volume 50; set s_weapon_shotgun_volume 50; set s_weapon_supershotgun_volume 50; set s_weapon_machinegun_volume 50; set s_weapon_chaingun_volume 50; set s_weapon_handgrenade_volume 50; set s_weapon_grenadelauncher_volume 50; set s_weapon_rocketlauncher_volume 50; set s_weapon_hyperblaster_volume 50; set s_weapon_railgun_volume 50; set s_weapon_bfg_volume 50; set s_player_volume 50; set s_voice_volume 50; set s_pickup_volume 50; set s_environment_volume 50; set s_monster_volume 50; set s_announcer_volume 50; set s_interface_volume 50; set s_other_volume 50; set s_ambient_volume 50"
end

begin q2prox_serverbrowser
    title "Q2PRO-X / Server Browser"
    style --no-compact
    values --live --status "cl_serverbrowser_ui: 0 = classic legacy menu, 1 = modern overlay" "browser mode" cl_serverbrowser_ui legacy modern
    range --live --precision 2 --status "cl_serverbrowser_alpha: overlay background opacity" "opacity" cl_serverbrowser_alpha 0 1 0.05
    range --live --precision 1 --status "cl_serverbrowser_scale: text scale multiplier" "text scale" cl_serverbrowser_scale 0.5 2 0.1
    toggle --live --status "cl_serverbrowser_compact: use compact line spacing" "compact mode" cl_serverbrowser_compact
    toggle --live --status "cl_serverbrowser_fullscreen: expand overlay to fill screen" "fullscreen" cl_serverbrowser_fullscreen
    toggle --live --status "cl_serverbrowser_pillarbox_workspace: allow the server browser to be dragged into the pillarbox side bars (aspect-fit free area). Mouse clicks outside the browser window still close it as before." "pillarbox free area" cl_serverbrowser_pillarbox_workspace
    toggle --live --status "cl_serverbrowser_show_details: show details pane on right side" "show details" cl_serverbrowser_show_details
    toggle --live --status "cl_serverbrowser_show_badges: show status badges" "show badges" cl_serverbrowser_show_badges
    toggle --live --status "cl_serverbrowser_row_colors: alternate row colors and ping-based coloring" "row colors" cl_serverbrowser_row_colors
    blank
    toggle --live --status "cl_serverbrowser_hide_empty: hide servers with no players" "hide empty" cl_serverbrowser_hide_empty
    toggle --live --status "cl_serverbrowser_hide_full: hide full servers" "hide full" cl_serverbrowser_hide_full
    toggle --live --status "cl_serverbrowser_only_players: only show servers with players" "only with players" cl_serverbrowser_only_players
    range --live --precision 0 --status "cl_serverbrowser_max_ping: max ping filter (0 = no limit)" "max ping" cl_serverbrowser_max_ping 0 999 50
    toggle --live --status "cl_serverbrowser_show_passworded: show password-protected servers" "show passworded" cl_serverbrowser_show_passworded
    toggle --live --status "cl_serverbrowser_show_down: show unreachable/down servers" "show down" cl_serverbrowser_show_down
    blank
    values --live --status "cl_serverbrowser_default_source: default server source preset" "default source" cl_serverbrowser_default_source "q2servers.com" favorites LAN custom
    field --width 32 --status "cl_serverbrowser_custom_source: URI for Custom source (e.g. +http://example.com/?raw=2)" "custom source" cl_serverbrowser_custom_source
    blank
    action --align --status "Open the modern server browser overlay" "open server browser..." serverbrowser_open_modern
    action --align --status "Open the classic legacy server browser menu" "open legacy browser..." serverbrowser_open_legacy
    bind --status "serverbrowser_toggle: toggle the server browser overlay" "toggle key" serverbrowser_toggle
end

begin q2prox_cvarbrowser
    title "Q2PRO-X / Cvar Browser"
    style --no-compact
    range --live --precision 2 --status "cl_cvar_browser_alpha: browser background opacity (independent from scr_alpha)" "opacity" cl_cvar_browser_alpha 0 1 0.05
    values --live --status "cl_cvar_browser_lang: 0 = English, 1 = Russian" "browser language" cl_cvar_browser_lang English Russian
    range --live --precision 2 --status "cl_cvar_browser_scale: browser-local text and chrome scale (independent from scr_scale)" "text scale" cl_cvar_browser_scale 0.5 2 0.05
    blank
    action --align --status "Open the modern cvar reference browser overlay" "open cvar browser..." cvar_help
    bind --status "cvar_browser_toggle: toggle the Q2PRO-X cvar reference overlay" "toggle key" cvar_browser_toggle
end
