Fixed some masks/bitmaps
This commit is contained in:
@@ -216,13 +216,13 @@ class ComboChannelBar : public ChannelBar
|
||||
// Override icon
|
||||
#if defined(OVERRIDE_CHANNEL_FUNCTION)
|
||||
if (safetyCh[channel] != OVERRIDE_CHANNEL_UNDEFINED)
|
||||
dc->drawBitmap(0, 1, chanMonLockedBitmap);
|
||||
dc->drawMask(0, 1, chanMonLockedBitmap, DEFAULT_COLOR);
|
||||
#endif
|
||||
|
||||
// Channel reverted icon
|
||||
LimitData * ld = limitAddress(channel);
|
||||
if (ld && ld->revert) {
|
||||
lcd->drawBitmap(0, 20, chanMonInvertedBitmap);
|
||||
lcd->drawMask(0, 20, chanMonInvertedBitmap, DEFAULT_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -404,15 +404,26 @@ void ModelMixesPage::build(FormWindow * window, int8_t focusMixIndex)
|
||||
});
|
||||
return 0;
|
||||
});
|
||||
|
||||
StaticBitmap* bitmap = nullptr;
|
||||
if (count++ > 0) {
|
||||
bitmap = new StaticBitmap(
|
||||
window, {35, button->top() + (button->height() - 18) / 2, 25, 17},
|
||||
mixerMultiplexBitmap[mix->mltpx], DEFAULT_COLOR);
|
||||
}
|
||||
|
||||
button->setFocusHandler([=](bool focus) {
|
||||
if (focus) {
|
||||
txt->setBackgroundColor(FOCUS_BGCOLOR);
|
||||
txt->setTextFlags(FOCUS_COLOR | CENTERED);
|
||||
if (bitmap) bitmap->setMaskColor(FOCUS_COLOR);
|
||||
} else {
|
||||
txt->setBackgroundColor(FIELD_FRAME_COLOR);
|
||||
txt->setTextFlags(CENTERED);
|
||||
if (bitmap) bitmap->setMaskColor(DEFAULT_COLOR);
|
||||
}
|
||||
txt->invalidate();
|
||||
if (bitmap) bitmap->invalidate();
|
||||
});
|
||||
|
||||
if (focusMixIndex == mixIndex) {
|
||||
@@ -420,13 +431,12 @@ void ModelMixesPage::build(FormWindow * window, int8_t focusMixIndex)
|
||||
txt->setBackgroundColor(FOCUS_BGCOLOR);
|
||||
txt->setTextFlags(FOCUS_COLOR | CENTERED);
|
||||
txt->invalidate();
|
||||
if (bitmap) {
|
||||
bitmap->setMaskColor(FOCUS_COLOR);
|
||||
bitmap->invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
if (count++ > 0) {
|
||||
new StaticBitmap(
|
||||
window, {35, button->top() + (button->height() - 18) / 2, 25, 17},
|
||||
mixerMultiplexBitmap[mix->mltpx]);
|
||||
}
|
||||
|
||||
grid.spacer(button->height() - 1);
|
||||
++mixIndex;
|
||||
|
||||
@@ -257,41 +257,41 @@ class Theme480: public OpenTxTheme
|
||||
|
||||
// Channels monitor screen
|
||||
delete chanMonLockedBitmap;
|
||||
chanMonLockedBitmap = BitmapBuffer::loadMaskOnBackground(getFilePath("mask_monitor_lockch.png"), DEFAULT_COLOR, DEFAULT_BGCOLOR);
|
||||
chanMonLockedBitmap = BitmapBuffer::load8bitMask(mask_monitor_lockch);
|
||||
|
||||
delete chanMonInvertedBitmap;
|
||||
chanMonInvertedBitmap = BitmapBuffer::loadMaskOnBackground(getFilePath("mask_monitor_inver.png"), DEFAULT_COLOR, DEFAULT_BGCOLOR);
|
||||
chanMonInvertedBitmap = BitmapBuffer::load8bitMask(mask_monitor_inver);
|
||||
|
||||
// Mixer setup screen
|
||||
delete mixerSetupMixerBitmap;
|
||||
mixerSetupMixerBitmap = BitmapBuffer::loadMaskOnBackground("mask_sbar_mixer.png", MENU_COLOR, MENU_BGCOLOR);
|
||||
mixerSetupMixerBitmap = BitmapBuffer::load8bitMask(mask_sbar_mixer);
|
||||
|
||||
delete mixerSetupToBitmap;
|
||||
mixerSetupToBitmap = BitmapBuffer::loadMaskOnBackground("mask_sbar_to.png", MENU_COLOR, MENU_BGCOLOR);
|
||||
mixerSetupToBitmap = BitmapBuffer::load8bitMask(mask_sbar_to);
|
||||
|
||||
delete mixerSetupOutputBitmap;
|
||||
mixerSetupOutputBitmap = BitmapBuffer::loadMaskOnBackground("mask_sbar_output.png", MENU_COLOR, MENU_BGCOLOR);
|
||||
mixerSetupOutputBitmap = BitmapBuffer::load8bitMask(mask_sbar_output);
|
||||
|
||||
delete mixerSetupAddBitmap;
|
||||
mixerSetupAddBitmap = BitmapBuffer::loadMaskOnBackground(getFilePath("mask_mplex_add.png"), DEFAULT_COLOR, DEFAULT_BGCOLOR);
|
||||
mixerSetupAddBitmap = BitmapBuffer::load8bitMask(mask_mplex_add);
|
||||
|
||||
delete mixerSetupMultiBitmap;
|
||||
mixerSetupMultiBitmap = BitmapBuffer::loadMaskOnBackground(getFilePath("mask_mplex_multi.png"), DEFAULT_COLOR, DEFAULT_BGCOLOR);
|
||||
mixerSetupMultiBitmap = BitmapBuffer::load8bitMask(mask_mplex_multi);
|
||||
|
||||
delete mixerSetupReplaceBitmap;
|
||||
mixerSetupReplaceBitmap = BitmapBuffer::loadMaskOnBackground(getFilePath("mask_mplex_replace.png"), DEFAULT_COLOR, DEFAULT_BGCOLOR);
|
||||
mixerSetupReplaceBitmap = BitmapBuffer::load8bitMask(mask_mplex_replace);
|
||||
|
||||
delete mixerSetupLabelIcon;
|
||||
mixerSetupLabelIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_label.png"));
|
||||
mixerSetupLabelIcon = BitmapBuffer::load8bitMask(mask_textline_label);
|
||||
|
||||
delete mixerSetupCurveIcon;
|
||||
mixerSetupCurveIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_curve.png"));
|
||||
mixerSetupCurveIcon = BitmapBuffer::load8bitMask(mask_textline_curve);
|
||||
|
||||
delete mixerSetupSwitchIcon;
|
||||
mixerSetupSwitchIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_switch.png"));
|
||||
mixerSetupSwitchIcon = BitmapBuffer::load8bitMask(mask_textline_switch);
|
||||
|
||||
delete mixerSetupFlightmodeIcon;
|
||||
mixerSetupFlightmodeIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_fm.png"));
|
||||
mixerSetupFlightmodeIcon = BitmapBuffer::load8bitMask(mask_textline_fm);
|
||||
|
||||
// delete mixerSetupSlowIcon;
|
||||
// mixerSetupSlowIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_slow.png"));
|
||||
|
||||
Reference in New Issue
Block a user