@@ -13,6 +13,8 @@ using namespace mooncake;
1313using namespace smooth_ui_toolkit ;
1414using namespace smooth_ui_toolkit ::lvgl_cpp;
1515
16+ #define FIRMWARE_VERSION " V0.2"
17+
1618AppStartupAnim::AppStartupAnim ()
1719{
1820 // 配置 App 信息
@@ -43,6 +45,12 @@ void AppStartupAnim::onOpen()
4345 _logo_5->setSrc (&logo_5);
4446 _logo_5->setPos (700 , 308 );
4547
48+ _label_version = std::make_unique<Label>(lv_screen_active ());
49+ _label_version->setTextColor (lv_color_hex (0xCCCCCC ));
50+ _label_version->setTextFont (&lv_font_montserrat_24);
51+ _label_version->align (LV_ALIGN_CENTER, 580 , 320 );
52+ _label_version->setText (FIRMWARE_VERSION);
53+
4654 _anim_logo_tab_y.pause ();
4755 _anim_logo_tab_y.teleport (785 );
4856 _anim_logo_tab_y.springOptions ().visualDuration = 0.6 ;
@@ -90,6 +98,7 @@ void AppStartupAnim::onRunning()
9098 }
9199 if (!_is_sfx_played) {
92100 if (_anim_logo_5_x.directValue () < 90 ) {
101+ GetHAL ()->setSpeakerVolume (80 );
93102 GetHAL ()->playStartupSfx ();
94103 _is_sfx_played = true ;
95104 }
@@ -118,4 +127,7 @@ void AppStartupAnim::onClose()
118127
119128 _logo_tab.reset ();
120129 _logo_5.reset ();
130+ _label_version.reset ();
131+
132+ GetHAL ()->setSpeakerVolume (60 );
121133}
0 commit comments