Add AMI screen

This commit is contained in:
2023-03-07 22:35:12 +01:00
parent d26339e265
commit 81b7a23a34
43 changed files with 1447 additions and 45 deletions

View File

@ -0,0 +1,40 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <gui_generated/ami_screen/AMIViewBase.hpp>
#include <touchgfx/Color.hpp>
#include <images/BitmapDatabase.hpp>
#include <texts/TextKeysAndLanguages.hpp>
AMIViewBase::AMIViewBase()
{
__background.setPosition(0, 0, 480, 320);
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
add(__background);
logo.setXY(160, 263);
logo.setBitmap(touchgfx::Bitmap(BITMAP_LOGO_DV_SMALL_WHITE_ID));
add(logo);
title.setXY(42, 20);
title.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
title.setLinespacing(0);
title.setTypedText(touchgfx::TypedText(T___SINGLEUSE_SDGP));
add(title);
currentMission.setPosition(0, 130, 480, 49);
currentMission.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
currentMission.setLinespacing(0);
currentMission.setTypedText(touchgfx::TypedText(T_INVALID_HUGE));
add(currentMission);
}
AMIViewBase::~AMIViewBase()
{
}
void AMIViewBase::setupScreen()
{
}

View File

@ -11,6 +11,8 @@
#include <platform/driver/lcd/LCD16bpp.hpp>
#include <gui/missionselect_screen/MissionSelectView.hpp>
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
#include <gui/ami_screen/AMIView.hpp>
#include <gui/ami_screen/AMIPresenter.hpp>
using namespace touchgfx;
@ -41,3 +43,16 @@ void FrontendApplicationBase::gotoMissionSelectScreenNoTransitionImpl()
{
touchgfx::makeTransition<MissionSelectView, MissionSelectPresenter, touchgfx::NoTransition, Model >(&currentScreen, &currentPresenter, frontendHeap, &currentTransition, &model);
}
// AMI
void FrontendApplicationBase::gotoAMIScreenNoTransition()
{
transitionCallback = touchgfx::Callback<FrontendApplicationBase>(this, &FrontendApplication::gotoAMIScreenNoTransitionImpl);
pendingScreenTransitionCallback = &transitionCallback;
}
void FrontendApplicationBase::gotoAMIScreenNoTransitionImpl()
{
touchgfx::makeTransition<AMIView, AMIPresenter, touchgfx::NoTransition, Model >(&currentScreen, &currentPresenter, frontendHeap, &currentTransition, &model);
}

View File

@ -38,7 +38,8 @@ MissionSelectViewBase::MissionSelectViewBase()
missionList.add(manual);
lastLine.setPosition(0, 210, 480, 2);
lastLine.setWidth(480);
lastLine.setHeight(2);
lastLinePainter.setColor(touchgfx::Color::getColorFromRGB(170, 170, 170));
lastLine.setPainter(lastLinePainter);
lastLine.setStart(0, 0);
@ -89,4 +90,22 @@ void MissionSelectViewBase::handleKeyEvent(uint8_t key)
decMission();
}
if(6 == key)
{
//ConfirmMission
//When hardware button 6 clicked call virtual function
//Call confirmMission
confirmMission();
}
if(254 == key)
{
//DummyChange
//When hardware button 254 clicked change screen to AMI
//Go to AMI with no screen transition
application().gotoAMIScreenNoTransition();
}
}