Merge pull request #608 from eshifri/eshifri/delayIcons
Implements showing of delay/slow icons on the mixes page
This commit is contained in:
@@ -102,8 +102,8 @@ extern BitmapBuffer * mixerSetupLabelIcon;
|
||||
extern BitmapBuffer * mixerSetupFlightmodeIcon;
|
||||
extern BitmapBuffer * mixerSetupCurveIcon;
|
||||
extern BitmapBuffer * mixerSetupSwitchIcon;
|
||||
//extern BitmapBuffer * mixerSetupDelayIcon;
|
||||
//extern BitmapBuffer * mixerSetupSlowIcon;
|
||||
//extern BitmapBuffer * mixerSetupDelaySlowIcon;
|
||||
extern BitmapBuffer * mixerSetupDelayIcon;
|
||||
extern BitmapBuffer * mixerSetupSlowIcon;
|
||||
extern BitmapBuffer * mixerSetupDelaySlowIcon;
|
||||
|
||||
#endif // _BITMAPS_H_
|
||||
|
||||
@@ -286,6 +286,15 @@ class MixLineButton : public CommonInputOrMixButton
|
||||
if (line.flightModes) {
|
||||
drawFlightModes(dc, line.flightModes, textColor);
|
||||
}
|
||||
|
||||
// Put this icon on the first line, since we jave more space there
|
||||
uint8_t delayslow = 0;
|
||||
if (line.speedDown || line.speedUp) delayslow = 1;
|
||||
if (line.delayUp || line.delayDown) delayslow += 2;
|
||||
if (delayslow) {
|
||||
BitmapBuffer *delayslowbmp[] = {mixerSetupSlowIcon, mixerSetupDelayIcon, mixerSetupDelaySlowIcon};
|
||||
dc->drawMask(width() - 16, FIELD_PADDING_TOP, delayslowbmp[delayslow - 1], textColor);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -296,14 +296,14 @@ class Theme480: public OpenTxTheme
|
||||
delete mixerSetupFlightmodeIcon;
|
||||
mixerSetupFlightmodeIcon = BitmapBuffer::load8bitMask(mask_textline_fm);
|
||||
|
||||
// delete mixerSetupSlowIcon;
|
||||
// mixerSetupSlowIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_slow.png"));
|
||||
//
|
||||
// delete mixerSetupDelayIcon;
|
||||
// mixerSetupDelayIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_delay.png"));
|
||||
//
|
||||
// delete mixerSetupDelaySlowIcon;
|
||||
// mixerSetupDelaySlowIcon = BitmapBuffer::loadMask(getFilePath("mask_textline_delayslow.png"));
|
||||
delete mixerSetupSlowIcon;
|
||||
mixerSetupSlowIcon = BitmapBuffer::load8bitMask(mask_textline_slow);
|
||||
|
||||
delete mixerSetupDelayIcon;
|
||||
mixerSetupDelayIcon = BitmapBuffer::load8bitMask(mask_textline_delay);
|
||||
|
||||
delete mixerSetupDelaySlowIcon;
|
||||
mixerSetupDelaySlowIcon = BitmapBuffer::load8bitMask(mask_textline_delayslow);
|
||||
}
|
||||
|
||||
void load() const override
|
||||
|
||||
Reference in New Issue
Block a user