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