[WIP] SDC screen
This hasn't really been tested yet and sometimes looks weird.
This commit is contained in:
@ -19,6 +19,8 @@
|
||||
#include <gui/debugview_screen/DebugViewPresenter.hpp>
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigView.hpp>
|
||||
#include <gui/vehicleconfig_screen/VehicleConfigPresenter.hpp>
|
||||
#include <gui/sdc_screen/SDCView.hpp>
|
||||
#include <gui/sdc_screen/SDCPresenter.hpp>
|
||||
|
||||
using namespace touchgfx;
|
||||
|
||||
@ -102,3 +104,16 @@ void FrontendApplicationBase::gotoVehicleConfigScreenNoTransitionImpl()
|
||||
{
|
||||
touchgfx::makeTransition<VehicleConfigView, VehicleConfigPresenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
|
||||
}
|
||||
|
||||
// SDC
|
||||
|
||||
void FrontendApplicationBase::gotoSDCScreenNoTransition()
|
||||
{
|
||||
transitionCallback = touchgfx::Callback<FrontendApplicationBase>(this, &FrontendApplicationBase::gotoSDCScreenNoTransitionImpl);
|
||||
pendingScreenTransitionCallback = &transitionCallback;
|
||||
}
|
||||
|
||||
void FrontendApplicationBase::gotoSDCScreenNoTransitionImpl()
|
||||
{
|
||||
touchgfx::makeTransition<SDCView, SDCPresenter, touchgfx::NoTransition, Model >(¤tScreen, ¤tPresenter, frontendHeap, ¤tTransition, &model);
|
||||
}
|
||||
|
||||
@ -135,4 +135,13 @@ void MissionSelectViewBase::handleKeyEvent(uint8_t key)
|
||||
application().gotoVehicleConfigScreenNoTransition();
|
||||
|
||||
}
|
||||
|
||||
if(250 == key)
|
||||
{
|
||||
//DummyChangeSDCView
|
||||
//When hardware button 250 clicked change screen to SDC
|
||||
//Go to SDC with no screen transition
|
||||
application().gotoSDCScreenNoTransition();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
101
TouchGFX/generated/gui_generated/src/sdc_screen/SDCViewBase.cpp
Normal file
101
TouchGFX/generated/gui_generated/src/sdc_screen/SDCViewBase.cpp
Normal file
@ -0,0 +1,101 @@
|
||||
/*********************************************************************************/
|
||||
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
|
||||
/*********************************************************************************/
|
||||
#include <gui_generated/sdc_screen/SDCViewBase.hpp>
|
||||
#include <touchgfx/canvas_widget_renderer/CanvasWidgetRenderer.hpp>
|
||||
#include <touchgfx/Color.hpp>
|
||||
#include <texts/TextKeysAndLanguages.hpp>
|
||||
|
||||
SDCViewBase::SDCViewBase()
|
||||
{
|
||||
touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
|
||||
|
||||
__background.setPosition(0, 0, 480, 320);
|
||||
__background.setColor(touchgfx::Color::getColorFromRGB(0, 0, 0));
|
||||
add(__background);
|
||||
|
||||
pdu.setXY(15, 40);
|
||||
pdu.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
pdu.setLinespacing(0);
|
||||
pdu.setTypedText(touchgfx::TypedText(T___SINGLEUSE_YRU7));
|
||||
add(pdu);
|
||||
|
||||
inertia.setXY(128, 40);
|
||||
inertia.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
inertia.setLinespacing(0);
|
||||
inertia.setTypedText(touchgfx::TypedText(T___SINGLEUSE_43KA));
|
||||
add(inertia);
|
||||
|
||||
sdcl.setPosition(363, 217, 102, 72);
|
||||
sdcl.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
sdcl.setLinespacing(0);
|
||||
sdcl.setTypedText(touchgfx::TypedText(T___SINGLEUSE_QNHI));
|
||||
add(sdcl);
|
||||
|
||||
hvb.setXY(240, 241);
|
||||
hvb.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
hvb.setLinespacing(0);
|
||||
hvb.setTypedText(touchgfx::TypedText(T___SINGLEUSE_KI1B));
|
||||
add(hvb);
|
||||
|
||||
tsms.setXY(120, 265);
|
||||
tsms.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
tsms.setLinespacing(0);
|
||||
tsms.setTypedText(touchgfx::TypedText(T___SINGLEUSE_XC1X));
|
||||
add(tsms);
|
||||
|
||||
acc.setXY(15, 265);
|
||||
acc.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
acc.setLinespacing(0);
|
||||
acc.setTypedText(touchgfx::TypedText(T___SINGLEUSE_V38H));
|
||||
add(acc);
|
||||
|
||||
imd.setXY(291, 40);
|
||||
imd.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
imd.setLinespacing(0);
|
||||
imd.setTypedText(touchgfx::TypedText(T___SINGLEUSE_N50J));
|
||||
add(imd);
|
||||
|
||||
ams.setXY(404, 40);
|
||||
ams.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
ams.setLinespacing(0);
|
||||
ams.setTypedText(touchgfx::TypedText(T___SINGLEUSE_XFW7));
|
||||
add(ams);
|
||||
|
||||
line1.setPosition(15, 122, 450, 10);
|
||||
line1Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
line1.setPainter(line1Painter);
|
||||
line1.setStart(5, 5);
|
||||
line1.setEnd(450, 5);
|
||||
line1.setLineWidth(10);
|
||||
line1.setLineEndingStyle(touchgfx::Line::SQUARE_CAP_ENDING);
|
||||
add(line1);
|
||||
|
||||
line2.setPosition(15, 193, 450, 10);
|
||||
line2Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
line2.setPainter(line2Painter);
|
||||
line2.setStart(10, 5);
|
||||
line2.setEnd(450, 5);
|
||||
line2.setLineWidth(10);
|
||||
line2.setLineEndingStyle(touchgfx::Line::ROUND_CAP_ENDING);
|
||||
add(line2);
|
||||
|
||||
line3.setPosition(455, 122, 10, 81);
|
||||
line3Painter.setColor(touchgfx::Color::getColorFromRGB(255, 255, 255));
|
||||
line3.setPainter(line3Painter);
|
||||
line3.setStart(5, 5);
|
||||
line3.setEnd(5, 100);
|
||||
line3.setLineWidth(10);
|
||||
line3.setLineEndingStyle(touchgfx::Line::SQUARE_CAP_ENDING);
|
||||
add(line3);
|
||||
}
|
||||
|
||||
SDCViewBase::~SDCViewBase()
|
||||
{
|
||||
touchgfx::CanvasWidgetRenderer::resetBuffer();
|
||||
}
|
||||
|
||||
void SDCViewBase::setupScreen()
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user