mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-20 21:04:24 -04:00
Encoders, Nuoptix DTMF and RDS transmitters now use TransmitterView
Bigger buttons in AlphanumView, 3 pages Scary yellow stripes around TransmitterView
This commit is contained in:
parent
fc8279aa30
commit
c72b490d49
16 changed files with 180 additions and 184 deletions
|
@ -51,6 +51,24 @@ TXGainField::TXGainField(
|
|||
|
||||
/* TransmitterView *******************************************************/
|
||||
|
||||
void TransmitterView::paint(Painter& painter) {
|
||||
size_t c;
|
||||
Point pos = { 0, screen_pos().y() };
|
||||
|
||||
for (c = 0; c < 20; c++) {
|
||||
painter.draw_bitmap(
|
||||
pos,
|
||||
bitmap_stripes,
|
||||
ui::Color(191, 191, 0),
|
||||
ui::Color::black()
|
||||
);
|
||||
if (c != 9)
|
||||
pos += { 24, 0 };
|
||||
else
|
||||
pos = { 0, screen_pos().y() + 32 + 8 };
|
||||
}
|
||||
}
|
||||
|
||||
void TransmitterView::on_tuning_frequency_changed(rf::Frequency f) {
|
||||
receiver_model.set_tuning_frequency(f);
|
||||
}
|
||||
|
@ -82,7 +100,7 @@ void TransmitterView::focus() {
|
|||
TransmitterView::TransmitterView(
|
||||
const Coord y, const uint32_t frequency_step, const uint32_t bandwidth
|
||||
) {
|
||||
set_parent_rect({ 0 * 8, y, 30 * 8, 2 * 16 });
|
||||
set_parent_rect({ 0 * 8, y, 30 * 8, 6 * 8 });
|
||||
|
||||
add_children({
|
||||
&field_frequency,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue