module

Obsctl::TUI::MixerLayout

Where the vertical mixer puts its channel strips.

Shared by the widget and the hit test, the same way the dashboard layout is: the strips are a pure function of the area, the input count and the cursor, so a click can be resolved by recomputing them rather than by remembering where the last frame drew them.

Constants

CONTENT_WIDTH = METER_WIDTH + 2

Meter, a blank column, then the fader.

GAP = 1
METER_WIDTH = 3
STRIP_WIDTH = 8

Instance methods

capacity(area : CryTUI::Rect) : Int32

Strips that fit side by side. Always at least one, so a panel too narrow for a whole strip still shows the selected channel clipped rather than nothing at all.

Source
columns(strip : CryTUI::Rect) : MixerColumns
Source
index_at(count : Int32, cursor : Int32, area : CryTUI::Rect, column : Int32) : Int32 | Nil

The channel under a column, or nil for the gutter between strips.

Source
inner(area : CryTUI::Rect) : CryTUI::Rect

Panels are drawn inside a one-cell border on every side.

Source
offset(count : Int32, cursor : Int32, area : CryTUI::Rect) : Int32

The first channel drawn. Derived from the cursor rather than stored, so the widget and the hit test cannot disagree about where the strips are.

Source
rows(area : CryTUI::Rect) : MixerRows

Rows are given up from the bottom as the panel shrinks: the dB readout goes first, then the gain readout, then the mute badge.

Source
stride
Source
strips(count : Int32, cursor : Int32, area : CryTUI::Rect) : Array(Tuple(Int32, CryTUI::Rect))

{channel index, strip rectangle} for every strip on screen, in draw order. A strip that would not fit whole is left out rather than drawn cut in half -- except on a panel too narrow for even one, where the selected channel is clipped so something is still shown.

Source