/*********************************************************************************/
/********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/
/*********************************************************************************/
#include <gui_generated/runpage_screen/RunPageViewBase.hpp>
#include "BitmapDatabase.hpp"
#include <texts/TextKeysAndLanguages.hpp>
#include <touchgfx/Color.hpp>

RunPageViewBase::RunPageViewBase() :
    buttonCallback(this, &RunPageViewBase::buttonCallbackHandler)
{

    StartPage.setBitmap(touchgfx::Bitmap(BITMAP_SFONDO_ID));
    StartPage.setPosition(0, 0, 480, 272);
    StartPage.setOffset(0, 0);

    textArea1.setXY(51, 12);
    textArea1.setColor(touchgfx::Color::getColorFrom24BitRGB(0, 0, 0));
    textArea1.setLinespacing(0);
    textArea1.setTypedText(touchgfx::TypedText(T_SINGLEUSEID6));

    buttonWithLabel1.setXY(155, 212);
    buttonWithLabel1.setBitmaps(touchgfx::Bitmap(BITMAP_BLUE_BUTTONS_ROUND_EDGE_SMALL_ID), touchgfx::Bitmap(BITMAP_BLUE_BUTTONS_ROUND_EDGE_SMALL_PRESSED_ID));
    buttonWithLabel1.setLabelText(touchgfx::TypedText(T_SINGLEUSEID7));
    buttonWithLabel1.setLabelColor(touchgfx::Color::getColorFrom24BitRGB(255, 255, 255));
    buttonWithLabel1.setLabelColorPressed(touchgfx::Color::getColorFrom24BitRGB(255, 255, 255));
    buttonWithLabel1.setAction(buttonCallback);

    add(StartPage);
    add(textArea1);
    add(buttonWithLabel1);
}

void RunPageViewBase::setupScreen()
{

}

void RunPageViewBase::buttonCallbackHandler(const touchgfx::AbstractButton& src)
{
    if (&src == &buttonWithLabel1)
    {
        //Interaction1
        //When buttonWithLabel1 clicked change screen to MainPage
        //Go to MainPage with no screen transition
        application().gotoMainPageScreenNoTransition();
    }
}
