Create Mission Select screen

This commit is contained in:
2023-03-06 23:42:01 +01:00
parent 8a2bdc347c
commit 7476e09fed
76 changed files with 46727 additions and 414 deletions

View File

@ -17,19 +17,19 @@ public:
virtual void changeToStartScreen()
{
gotoscreenScreenNoTransition();
gotoMissionSelectScreenNoTransition();
}
// screen
void gotoscreenScreenNoTransition();
// MissionSelect
void gotoMissionSelectScreenNoTransition();
protected:
touchgfx::Callback<FrontendApplicationBase> transitionCallback;
FrontendHeap& frontendHeap;
Model& model;
// screen
void gotoscreenScreenNoTransitionImpl();
// MissionSelect
void gotoMissionSelectScreenNoTransitionImpl();
};
#endif // FRONTENDAPPLICATIONBASE_HPP

View File

@ -12,8 +12,8 @@
#include <gui/common/FrontendApplication.hpp>
#include <gui/model/Model.hpp>
#include <gui/screen_screen/screenView.hpp>
#include <gui/screen_screen/screenPresenter.hpp>
#include <gui/missionselect_screen/MissionSelectView.hpp>
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
/**
@ -36,7 +36,7 @@ public:
* A list of all view types. Must end with meta::Nil.
* @note All view types used in the application MUST be added to this list!
*/
typedef touchgfx::meta::TypeList< screenView,
typedef touchgfx::meta::TypeList< MissionSelectView,
touchgfx::meta::Nil
> GeneratedViewTypes;
@ -49,7 +49,7 @@ public:
* A list of all presenter types. Must end with meta::Nil.
* @note All presenter types used in the application MUST be added to this list!
*/
typedef touchgfx::meta::TypeList< screenPresenter,
typedef touchgfx::meta::TypeList< MissionSelectPresenter,
touchgfx::meta::Nil
> GeneratedPresenterTypes;
@ -73,7 +73,7 @@ public:
virtual void gotoStartScreen(FrontendApplication& app)
{
app.gotoscreenScreenNoTransition();
app.gotoMissionSelectScreenNoTransition();
}
protected:
FrontendHeapBase(touchgfx::AbstractPartition& presenters, touchgfx::AbstractPartition& views, touchgfx::AbstractPartition& transitions, FrontendApplication& app)

View File

@ -0,0 +1,38 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef MISSIONSELECTELEMENTBASE_HPP
#define MISSIONSELECTELEMENTBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/containers/Container.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/canvas/Line.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
class MissionSelectElementBase : public touchgfx::Container
{
public:
MissionSelectElementBase();
virtual ~MissionSelectElementBase();
virtual void initialize();
protected:
FrontendApplication& application() {
return *static_cast<FrontendApplication*>(touchgfx::Application::getInstance());
}
/*
* Member Declarations
*/
touchgfx::Box bg;
touchgfx::TextArea text;
touchgfx::Line line1;
touchgfx::PainterRGB565 line1Painter;
private:
};
#endif // MISSIONSELECTELEMENTBASE_HPP

View File

@ -1,22 +1,23 @@
/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#ifndef SCREENVIEWBASE_HPP
#define SCREENVIEWBASE_HPP
#ifndef MISSIONSELECTVIEWBASE_HPP
#define MISSIONSELECTVIEWBASE_HPP
#include <gui/common/FrontendApplication.hpp>
#include <mvp/View.hpp>
#include <gui/screen_screen/screenPresenter.hpp>
#include <gui/missionselect_screen/MissionSelectPresenter.hpp>
#include <touchgfx/widgets/Box.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/widgets/canvas/Circle.hpp>
#include <touchgfx/widgets/canvas/PainterRGB565.hpp>
#include <touchgfx/containers/ListLayout.hpp>
#include <gui/containers/MissionSelectElement.hpp>
#include <touchgfx/widgets/Image.hpp>
class screenViewBase : public touchgfx::View<screenPresenter>
class MissionSelectViewBase : public touchgfx::View<MissionSelectPresenter>
{
public:
screenViewBase();
virtual ~screenViewBase();
MissionSelectViewBase();
virtual ~MissionSelectViewBase();
virtual void setupScreen();
protected:
@ -28,9 +29,16 @@ protected:
* Member Declarations
*/
touchgfx::Box __background;
touchgfx::TextArea textArea1;
touchgfx::Circle circle1;
touchgfx::PainterRGB565 circle1Painter;
touchgfx::TextArea prompt;
touchgfx::ListLayout missionList;
MissionSelectElement accel;
MissionSelectElement skidpad;
MissionSelectElement autox;
MissionSelectElement trackdrive;
MissionSelectElement ebs;
MissionSelectElement inspection;
MissionSelectElement manual;
touchgfx::Image image1;
private:
@ -42,4 +50,4 @@ private:
};
#endif // SCREENVIEWBASE_HPP
#endif // MISSIONSELECTVIEWBASE_HPP