Add AudioVolumeField -- cleanup (#1107)

* WIP Adding AudioVolumeField

* Fix build break

* Add Bernd to about

---------

Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
Kyle Reed 2023-06-04 12:56:46 -07:00 committed by GitHub
parent 7e8a139732
commit 28319652c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 91 additions and 186 deletions

View file

@ -381,4 +381,21 @@ void VGAGainField::on_focus() {
}
}
/* AudioVolumeField *******************************************************/
AudioVolumeField::AudioVolumeField(
Point parent_pos)
: NumberField{
parent_pos,
/* length */ 2,
/* range */ {0, 99},
/* step */ 1,
/* fill char */ ' '} {
set_value(receiver_model.normalized_headphone_volume());
on_change = [](int32_t v) {
receiver_model.set_normalized_headphone_volume(v);
};
}
} /* namespace ui */