Changes between Version 57 and Version 58 of Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook


Ignore:
Timestamp:
04/04/25 12:55:54 (2 weeks ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook

    v57 v58  
    182182}}}
    183183
     184Modify this function for new style display such as:
     185
     186{{{#!c++
     187void CWeighingScreen::ShowGTN(void)
     188{
     189#if ARM64
     190    SetCurColor(COLOR_INFO);
     191    SetBkColor(nColorWhite);
     192    fontBigLabel.DisplayTextCairo(rectWtLbl_[WT_INDEX_GROSS], LANG(STR_GROSS_LABEL));
     193
     194    if(curScale >= 0 && GetWtMode(curScale) == wtmode_net) {
     195        fontBigLabel.DisplayTextCairo(rectWtLbl_[WT_INDEX_TARE], LANG(STR_TARE_LABEL));
     196        fontBigLabel.DisplayTextCairo(rectWtLbl_[WT_INDEX_NET], LANG(STR_NET_LABEL));
     197    }
     198#else
     199    SetCurColor(nColorGreen);
     200    SetBkColor(nColorBlack);
     201    DisplayText(GROSS_LBL_X, GROSS_LBL_Y, LANG(STR_GROSS_LABEL), 0, BIG_FONT);
     202
     203    if(curScale >= 0 && GetWtMode(curScale) == wtmode_net) {
     204        DisplayText(TARE_LBL_X, TARE_WT_Y, LANG(STR_TARE_LABEL), 0, BIG_FONT);
     205        DisplayText(NET_LBL_X, NET_WT_Y, LANG(STR_NET_LABEL), 0, BIG_FONT);
     206    }
     207#endif
     208}
     209}}}
     210
     211Add the following header include to the main cpp file
     212{{{#!c++
     213#include "wght_screen.h"
     214}}}
     215
     216Add an instance of the CWeighingScreen above all the functions such as:
     217{{{#!c++
     218CWeighingScreen weightScreen;
     219}}}
     220
     221Modify all the references to the Show//XXXX// show as ShowGTN() to add the weightScreen instance such as:
     222{{{#!c++
     223weightScreen.ShowGTN();
     224}}}
     225
     226
    1842276. Find the InitLCD function call and change as follows:
    185228
     
    233276}
    234277}}}
     278
     279Modify this function for the new style display such as:
     280
    235281
    2362826. Search for all menu and inputs forms such as search for "FORM_INIT" make appropriate changes to use new style FORM_ADD_INPUT2 instead of FORM_ADD_INPUT and FORM_ADD_BUTTON2 instead of FORM_ADD_BUTTON such as: