/** ****************************************************************************** * This file is part of the TouchGFX 4.10.0 distribution. * * @attention * * Copyright (c) 2018 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */#ifndefGAME_2048_VIEW_HPP#defineGAME_2048_VIEW_HPP#include<gui/common/DemoView.hpp>#include<gui/game2048_screen/Game2048Presenter.hpp>#include<touchgfx/widgets/Image.hpp>#include<touchgfx/widgets/TextAreaWithWildcard.hpp>#include<touchgfx/widgets/Box.hpp>#include<touchgfx/widgets/Button.hpp>#include<touchgfx/widgets/ToggleButton.hpp>#include<touchgfx/mixins/MoveAnimator.hpp>#include<touchgfx/mixins/FadeAnimator.hpp>#include<gui/game2048_screen/GameBoard.hpp>#include<touchgfx/mixins/FadeAnimator.hpp>#include<touchgfx/mixins/MoveAnimator.hpp>#include<gui/common/SwipeContainer.hpp>#include<touchgfx/containers/ListLayout.hpp>14 includesclassGame2048View:publicDemoView<Game2048Presenter>{public:Game2048View();virtual~Game2048View();virtualvoidsetupScreen();virtualvoidtearDownScreen();virtualvoidscreenSaverMinorTick();public:private:staticconstintNUMBER_OF_INSTRUCTIONS=3;Imagebackground;GameBoardgameBoard;intcurrentScore;TextAreaWithOneWildcardscoreTxt;Unicode::UnicodeCharscoreTxtbuf[10];FadeAnimator<MoveAnimator<TextAreaWithOneWildcard>>deltaScoreTxt;Unicode::UnicodeChardeltaScoreTxtbuf[10];ButtonnewGameButton;ToggleButtonautoPlayButton;ButtonhowToPlayButton;Boxoverlay;ImagepopUp;SwipeContainerhowToPlayInstructionContainer;ContainerhowToPlayInstructionExtraSpaceContainer[NUMBER_OF_INSTRUCTIONS];ImagehowToPlayInstruction[NUMBER_OF_INSTRUCTIONS];ButtoncloseHowToPlayButton;ImageendGameStatus;Callback<Game2048View,constGameBoard&>moveCompletedCallback;Callback<Game2048View,constGameBoard&>gameWonCallback;Callback<Game2048View,constGameBoard&>gameLostCallback;Callback<Game2048View,constAbstractButton&>buttonPressedCallback;voidmoveCompletedHandler(constGameBoard&gb);voidgameWonHandler(constGameBoard&gb);voidgameLostHandler(constGameBoard&gb);voidbuttonPressedHandler(constAbstractButton&button);voidupdateScoreText();voidshowDeltaScoreText(intdeltaScore);voidshowHowToPlayPopUp(boolvisible);voidstartNewGame();private:...};/* ... */#endif// GAME_2048_VIEW_HPP