Added swipe left to show music controls and a green $ to the prompt in terminal watch face
This commit is contained in:
parent
d56fefb4e9
commit
5519cd35a9
@ -322,6 +322,9 @@ void DisplayApp::Refresh() {
|
|||||||
case TouchEvents::SwipeRight:
|
case TouchEvents::SwipeRight:
|
||||||
LoadNewScreen(Apps::QuickSettings, DisplayApp::FullRefreshDirections::RightAnim);
|
LoadNewScreen(Apps::QuickSettings, DisplayApp::FullRefreshDirections::RightAnim);
|
||||||
break;
|
break;
|
||||||
|
case TouchEvents::SwipeLeft:
|
||||||
|
LoadNewScreen(Apps::Music, DisplayApp::FullRefreshDirections::LeftAnim);
|
||||||
|
break;
|
||||||
case TouchEvents::DoubleTap:
|
case TouchEvents::DoubleTap:
|
||||||
PushMessageToSystemTask(System::Messages::GoToSleep);
|
PushMessageToSystemTask(System::Messages::GoToSleep);
|
||||||
break;
|
break;
|
||||||
|
@ -10,8 +10,11 @@
|
|||||||
#include "components/motion/MotionController.h"
|
#include "components/motion/MotionController.h"
|
||||||
#include "components/settings/Settings.h"
|
#include "components/settings/Settings.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
|
|
||||||
WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
|
WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
@ -43,12 +46,14 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
|
|||||||
lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -40);
|
lv_obj_align(label_date, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -40);
|
||||||
|
|
||||||
label_prompt_1 = lv_label_create(lv_scr_act(), nullptr);
|
label_prompt_1 = lv_label_create(lv_scr_act(), nullptr);
|
||||||
|
lv_label_set_recolor(label_prompt_1, true);
|
||||||
lv_obj_align(label_prompt_1, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -80);
|
lv_obj_align(label_prompt_1, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, -80);
|
||||||
lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now");
|
lv_label_set_text_static(label_prompt_1, "user@watch:~ #00ff00 $# now");
|
||||||
|
|
||||||
label_prompt_2 = lv_label_create(lv_scr_act(), nullptr);
|
label_prompt_2 = lv_label_create(lv_scr_act(), nullptr);
|
||||||
|
lv_label_set_recolor(label_prompt_1, true);
|
||||||
lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60);
|
lv_obj_align(label_prompt_2, lv_scr_act(), LV_ALIGN_IN_LEFT_MID, 0, 60);
|
||||||
lv_label_set_text_static(label_prompt_2, "user@watch:~ $");
|
lv_label_set_text_static(label_prompt_2, "user@watch:~ #00ff00 $#");
|
||||||
|
|
||||||
label_time = lv_label_create(lv_scr_act(), nullptr);
|
label_time = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_label_set_recolor(label_time, true);
|
lv_label_set_recolor(label_time, true);
|
||||||
@ -143,6 +148,8 @@ void WatchFaceTerminal::Refresh() {
|
|||||||
lv_label_set_text_static(heartbeatValue, "[L_HR]#ee3311 ---#");
|
lv_label_set_text_static(heartbeatValue, "[L_HR]#ee3311 ---#");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
stepCount = motionController.NbSteps();
|
stepCount = motionController.NbSteps();
|
||||||
if (stepCount.IsUpdated()) {
|
if (stepCount.IsUpdated()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user