Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ValueEdit

File: Rhapsodist/Core/Widgets/ValueEdit.js · Namespace: ValueEdit.

Overview

ValueEdit turns a plain panel into a numeric “value edit box”: a styled background, a centred knob showing text only, and two step buttons that nudge its value by stepSize.

Used for compact numeric controls like Coarse/Fine Tune and Transpose on the Instrument settings page (pnlCoarseTune, pnlFineTune, pnlTranspose in ShellLayout).

Usage

In practice you rarely call ValueEdit.create() directly: SettingsPanel detects and converts eligible child panels automatically. To add a new tuning-style setting, give it a panel containing a single ScriptSlider child, inside a panel already managed by SettingsPanel.

Called directly:

const pnlMyValueEdit = ValueEdit.create("pnlMyValueEdit", {});

Options

Every key in options is copied onto the panel’s data object.

Public API

FunctionDescriptionReturns
create(panelId: string, options: JSON)Builds the styled background, knob, and step buttons.ScriptObject

Broadcasters

BroadcasterDescription
panel.data.bcThe panel’s or its knob’s enabled property changes. Used internally to keep the step buttons’ enabled state in sync with the control they belong to.

Internal Reference

FunctionDescriptionReturns
createButtons(panel: ScriptObject)Builds the up/down step buttons and wires their mouse callbacks to nudge the knob’s value by its stepSize, clamped to the knob’s min/max.Array