mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-28 16:59:47 -05:00
Extract VGAGainField.
This commit is contained in:
parent
e85503cd81
commit
3e8b097588
@ -117,12 +117,8 @@ private:
|
||||
{ 15 * 8, 0 * 16 }
|
||||
};
|
||||
|
||||
NumberField field_vga {
|
||||
{ 18 * 8, 0 * 16},
|
||||
2,
|
||||
{ max2837::vga::gain_db_range.minimum, max2837::vga::gain_db_range.maximum },
|
||||
max2837::vga::gain_db_step,
|
||||
' ',
|
||||
VGAGainField field_vga {
|
||||
{ 18 * 8, 0 * 16 }
|
||||
};
|
||||
|
||||
OptionsField options_modulation {
|
||||
|
@ -318,4 +318,24 @@ void LNAGainField::on_focus() {
|
||||
}
|
||||
}
|
||||
|
||||
/* VGAGainField **********************************************************/
|
||||
|
||||
VGAGainField::VGAGainField(
|
||||
Point parent_pos
|
||||
) : NumberField {
|
||||
parent_pos, 2,
|
||||
{ max2837::vga::gain_db_range.minimum, max2837::vga::gain_db_range.maximum },
|
||||
max2837::vga::gain_db_step,
|
||||
' ',
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
void VGAGainField::on_focus() {
|
||||
//Widget::on_focus();
|
||||
if( on_show_options ) {
|
||||
on_show_options();
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
||||
|
@ -315,6 +315,15 @@ public:
|
||||
void on_focus() override;
|
||||
};
|
||||
|
||||
class VGAGainField : public NumberField {
|
||||
public:
|
||||
std::function<void(void)> on_show_options;
|
||||
|
||||
VGAGainField(Point parent_pos);
|
||||
|
||||
void on_focus() override;
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif/*__UI_RECEIVER_H__*/
|
||||
|
Loading…
Reference in New Issue
Block a user