From 5d0339da70f94e9dcdaceb0ffc6e3ecb3a9e0983 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Mon, 16 Dec 2024 15:02:49 +0800 Subject: [PATCH] =?utf8?q?=E7=A7=92=E8=A1=A8=E7=95=8C=E9=9D=A2=E4=BC=98?= =?utf8?q?=E5=8C=96=EF=BC=9A=E7=82=B9=E5=87=BB=E6=A0=87=E8=AE=B0=E6=8C=89?= =?utf8?q?=E9=92=AE=EF=BC=8C=E6=9C=80=E6=96=B0=E5=9C=88=E6=95=B0=E5=B0=86?= =?utf8?q?=E9=AB=98=E4=BA=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/fd230app/CMakeLists.txt | 2 + .../stopwatch/include/MainStopWatchView.h | 6 +- .../stopwatch/include/StopWatchAdapter.h | 47 ++++++++++ .../stopwatch/include/StopWatchItemView.h | 32 +++++++ .../stopwatch/src/MainStopWatchPresenter.cpp | 88 ++++++++++++------- .../stopwatch/src/MainStopWatchView.cpp | 56 ++++++++---- .../stopwatch/src/StopWatchAdapter.cpp | 83 +++++++++++++++++ .../stopwatch/src/StopWatchItemView.cpp | 74 ++++++++++++++++ 8 files changed, 336 insertions(+), 52 deletions(-) create mode 100644 code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchAdapter.h create mode 100644 code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchItemView.h create mode 100644 code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchAdapter.cpp create mode 100644 code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchItemView.cpp diff --git a/code/sdk/application/wearable/fd230app/CMakeLists.txt b/code/sdk/application/wearable/fd230app/CMakeLists.txt index a433804fa..2ecec40a7 100644 --- a/code/sdk/application/wearable/fd230app/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230app/CMakeLists.txt @@ -356,6 +356,8 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/MainStopWatchPresenter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/MainStopWatchView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/StopWatchModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/StopWatchAdapter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/StopWatchItemView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/StopWatchRecordCycleToLimitView.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/stopwatch/src/StopWatchRecordTimeToLimitView.cpp diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/MainStopWatchView.h b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/MainStopWatchView.h index ccae6dbf0..d58e2c62d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/MainStopWatchView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/MainStopWatchView.h @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-04 15:13:51 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-10-30 14:28:49 + * @LastEditTime: 2024-12-13 17:02:27 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/MainStopWatchView.h */ #ifndef MAIN_STOPWATCH_VIEW_H @@ -19,6 +19,7 @@ #include "components/text_adapter.h" #include "stopwatch/include/StopWatchRecordCycleToLimitView.h" #include "stopwatch/include/StopWatchRecordTimeToLimitView.h" +#include "stopwatch/include/StopWatchAdapter.h" /*秒表主视图*/ namespace OHOS { @@ -57,6 +58,7 @@ namespace OHOS UICheckBox *GetPlayOrPausecheckBox(void); void ChangeRecordTimeToLimitView(void); UIScrollView *GetScrollView(int16_t index); + StopWatchAdapter *GetStopWatchAdapter(void); private: void InitMainStopWatchView(void); void ClearAll(void); @@ -76,6 +78,8 @@ namespace OHOS UIList *list = nullptr; TextAdapter *listadapter = nullptr; List *listdata = nullptr; + + StopWatchAdapter *stopWatchAdapter{nullptr}; }; } // namespace OHOS #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchAdapter.h b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchAdapter.h new file mode 100644 index 000000000..8720b6901 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchAdapter.h @@ -0,0 +1,47 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-12-12 11:03:15 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-12-16 11:43:14 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchAdapter.h + */ + +#ifndef STOPWATCH_ADAPTER_H +#define STOPWATCH_ADAPTER_H + +#include "components/ui_list.h" +#include "components/ui_label.h" +#include "components/ui_label_ext.h" +#include "components/ui_view_group.h" +#include "components/ui_image_view.h" +#include "components/abstract_adapter.h" +#include +#include + +namespace OHOS +{ + typedef struct + { + std::string RecordCycleNumber; + std::string formattedTime; + std::string formattedDiff; + int curSelectItemViewIndex; + } StopWatchItem; + + class StopWatchAdapter : public AbstractAdapter + { + public: + explicit StopWatchAdapter(); + ~StopWatchAdapter() override; + uint16_t GetCount(void) override; + void ClearData(void); + void setSelectedIndex(int index); + UIView *GetView(UIView *inView, int16_t index) override; + void AddListItem(const StopWatchItem &item); + + private: + std::list listData; + int curSelectItemViewIndex{-1}; + }; +} +#endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchItemView.h b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchItemView.h new file mode 100644 index 000000000..9f5f11a60 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/include/StopWatchItemView.h @@ -0,0 +1,32 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-03-30 09:14:38 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-12-16 14:42:31 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h + */ + +#ifndef STOPWATCH_ITEM_VIEW_H +#define STOPWATCH_ITEM_VIEW_H + +#include "components/ui_label_ext.h" +#include "components/ui_view_group.h" +#include "stopwatch/include/StopWatchAdapter.h" +namespace OHOS +{ + class StopWatchItemView : public UIViewGroup + { + public: + explicit StopWatchItemView(); + ~StopWatchItemView() override; + void SetItemInfo(const StopWatchItem itemInfo); + void SetUpChild(); + void SetItemViewColor(bool flag); + + private: + UILabel RecordCycleNumber; + UILabel formattedTime; + UILabel formattedDiff; + }; +} +#endif diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchPresenter.cpp index 229cc5178..b0a1e509a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchPresenter.cpp @@ -219,18 +219,39 @@ namespace OHOS const char *formattedTime = MainStopWatchView::GetInstance()->GetShowTimelabel()->GetText(); char formattedDiff[64] = {0}; MillisecondsToTimeStr(timeDifference, formattedDiff); - char *PickerData = (char *)malloc(128); - if (lastRecordTime == 0) // 如果是第一次标记 - { - sprintf(PickerData, "%02d %s +%s", RecordCycleNumber, formattedTime, formattedTime); - } - else - { - sprintf(PickerData, "%02d %s +%s", RecordCycleNumber, formattedTime, formattedDiff); - } - m_listdata->PushFront(const_cast(PickerData)); - m_listadapter->SetData(m_listdata); - m_list->SetAdapter(m_listadapter); + // char *PickerData = (char *)malloc(128); + // if (lastRecordTime == 0) // 如果是第一次标记 + // { + // sprintf(PickerData, "%02d %s +%s", RecordCycleNumber, formattedTime, formattedTime); + // } + // else + // { + // sprintf(PickerData, "%02d %s +%s", RecordCycleNumber, formattedTime, formattedDiff); + // } + // m_listdata->PushFront(const_cast(PickerData)); + // m_listadapter->SetData(m_listdata); + // m_list->SetAdapter(m_listadapter); + // char PickerData[128]={0}; + // if (lastRecordTime == 0) // 如果是第一次标记 + // { + // sprintf(PickerData, "%02d %s +%s", RecordCycleNumber, formattedTime, formattedTime); + // } + // else + // { + // sprintf(PickerData, "%02d %s +%s", RecordCycleNumber, formattedTime, formattedDiff); + // } + + StopWatchItem item = {"", "", "", 0}; + char buffer[3] = {0}; // 足够存放两位数字及字符串结束符'\0' + std::sprintf(buffer, "%02d", RecordCycleNumber); + item.RecordCycleNumber = buffer; + item.formattedTime = std::string(formattedTime);; + item.formattedDiff = "+" + std::string((lastRecordTime == 0) ? formattedTime : formattedDiff); //lastRecordTime == 0,如果是第一次标记 + item.curSelectItemViewIndex = RecordCycleNumber - 1; + + view_->GetStopWatchAdapter()->setSelectedIndex(RecordCycleNumber - 1); + view_->GetStopWatchAdapter()->AddListItem(item); + m_list->SetAdapter(view_->GetStopWatchAdapter()); m_list->SetStartIndex(RecordCycleNumber - 1); m_list->SetSelectPosition(RecordCycleNumber); m_list->RefreshList(); @@ -243,6 +264,9 @@ namespace OHOS StopWatchModel::GetInstance()->StopWatch_StopTimer(); // 停止定时器 mainStopWatchView->GetShowTimelabel()->SetText("00:00.00"); lastRecordTime = 0; + view_->GetStopWatchAdapter()->ClearData(); + m_list->SetAdapter(nullptr); + m_list->RefreshList(); m_button->SetViewId(ResetOrMarkButton_RESET1_VIEWID); m_button->SetImageSrc(ResetOrMarkButtonImg_Reset1, ResetOrMarkButtonImg_Reset1); @@ -258,26 +282,26 @@ namespace OHOS isStartMark = false; } - if (m_listdata != nullptr) - { - // 遍历列表,释放每个元素所占用的内存 - ListNode *node = m_listdata->Head(); - int cnt = 0; - while (node!= m_listdata->End()) - { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "%d",++cnt); - const char *p = node->data_; - free(const_cast(p)); - - node = m_listdata->Remove(node); - } - m_listdata->Clear(); - } - else - { - // Handle error or log the issue - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Error: m_listdata is nullptr"); - } + // if (m_listdata != nullptr) + // { + // // 遍历列表,释放每个元素所占用的内存 + // ListNode *node = m_listdata->Head(); + // int cnt = 0; + // while (node != m_listdata->End()) + // { + // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "%d", ++cnt); + // const char *p = node->data_; + // free(const_cast(p)); + + // node = m_listdata->Remove(node); + // } + // m_listdata->Clear(); + // } + // else + // { + // // Handle error or log the issue + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Error: m_listdata is nullptr"); + // } RecordCycleNumber = 0; } else if (strcmp(clickedViewId, CycleToLimitReturnButton_VIEWID) == 0) // 点击返回按钮 diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchView.cpp b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchView.cpp index d0bd49d8f..3a8f0fe65 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/MainStopWatchView.cpp @@ -65,6 +65,12 @@ namespace OHOS LineImage = nullptr; } + if (stopWatchAdapter != nullptr) + { + delete stopWatchAdapter; + stopWatchAdapter = nullptr; + } + if (list != nullptr) { list->ClearFocus(); @@ -235,14 +241,6 @@ namespace OHOS return; } group->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); - UIView::OnDragListener *draglistener = static_cast(MainStopWatchPresenter::GetInstance()); - if (draglistener == nullptr) - { - return; - } - group->SetOnDragListener(draglistener); - group->SetTouchable(true); - group->SetDraggable(true); /* ----------------------- scrollView[MAIN_STOPWATCH] ----------------------- */ if (scrollView[MAIN_STOPWATCH] == nullptr) { @@ -276,7 +274,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showTimelabel new fail!!"); return; } - showTimelabel->SetPosition(0, 160,466, 94); + showTimelabel->SetPosition(0, 160, 466, 94); showTimelabel->SetStyle(STYLE_TEXT_FONT, 84); showTimelabel->SetStyle(STYLE_LINE_HEIGHT, 94); showTimelabel->SetText("00:00.00"); @@ -294,6 +292,13 @@ namespace OHOS const char *imageimagesPath = "/user/res/stopwatch/STOPWATCH_LINE.bin"; LineImage->SetSrc(imageimagesPath); LineImage->SetVisible(false); + /* ---------------------------- stopWatchAdapter ---------------------------- */ + stopWatchAdapter = new StopWatchAdapter(); + if (stopWatchAdapter == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "stopWatchAdapter new fail!!"); + return; + } /* ---------------------------------- list ---------------------------------- */ list = new UIList(); if (list == nullptr) @@ -301,7 +306,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "list new fail!!"); return; } - list->SetPosition(56, 170, 360, 100); + list->SetPosition(56, 170, 360, 130); list->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000); list->SetReboundSize(30); list->SetThrowDrag(true); @@ -365,11 +370,9 @@ namespace OHOS MainStopWatchPresenter::GetInstance()->SetImage(LineImage); MainStopWatchPresenter::GetInstance()->SetList(list, listadapter, listdata); // Add the CallBack about events - UICheckBox::OnChangeListener *PlayOrPausecheckBoxChangeListener = static_cast(MainStopWatchPresenter::GetInstance()); - PlayOrPausecheckBox->SetOnChangeListener(PlayOrPausecheckBoxChangeListener); + PlayOrPausecheckBox->SetOnChangeListener(presenter_); PlayOrPausecheckBox->SetOnClickListener(presenter_); - UIView::OnClickListener *ResetOrMarkbuttonClick = static_cast(MainStopWatchPresenter::GetInstance()); - ResetOrMarkbutton->SetOnClickListener(ResetOrMarkbuttonClick); + ResetOrMarkbutton->SetOnClickListener(presenter_); } } @@ -394,13 +397,24 @@ namespace OHOS return scrollView[index]; } + StopWatchAdapter *MainStopWatchView::GetStopWatchAdapter(void) + { + return stopWatchAdapter; + } + void MainStopWatchView::OnStart() { View::OnStart(); + SetContainerView(new UIViewGroup()); + if (GetContainer() == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetContainerView fail!!"); + return; + } + container_->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); InitMainStopWatchView(); // 增加按键监听 - RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::MainStopWatchPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(presenter_); } void MainStopWatchView::OnSetUpView() @@ -414,8 +428,7 @@ namespace OHOS scrollView[MAIN_STOPWATCH]->Add(PlayOrPausecheckBox); scrollView[MAIN_STOPWATCH]->Add(ResetOrMarkbutton); group->Add(scrollView[MAIN_STOPWATCH]); - RootView::GetInstance()->Add(group); - container_ = group; + container_->Add(group); Draw(); } @@ -431,7 +444,12 @@ namespace OHOS View::OnStop(); RootView::GetInstance()->ClearOnKeyActListener(); - RootView::GetInstance()->RemoveAll(); + if (container_ != nullptr) + { + container_->RemoveAll(); + delete container_; + container_ = nullptr; + } return; } } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchAdapter.cpp b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchAdapter.cpp new file mode 100644 index 000000000..352b06c23 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchAdapter.cpp @@ -0,0 +1,83 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-12-12 11:07:26 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-12-16 11:43:35 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchAdapter.cpp + */ +#include "stopwatch/include/StopWatchAdapter.h" +#include "stopwatch/include/StopWatchItemView.h" +#include "wearable_log.h" +namespace OHOS +{ + StopWatchAdapter::StopWatchAdapter() {} + StopWatchAdapter::~StopWatchAdapter() + { + listData.clear(); + } + uint16_t StopWatchAdapter::GetCount(void) + { + return listData.size(); + } + + void StopWatchAdapter::ClearData(void) + { + listData.clear(); + curSelectItemViewIndex = -1; + } + + void StopWatchAdapter::setSelectedIndex(int index) + { + curSelectItemViewIndex = index; + } + + UIView *StopWatchAdapter::GetView(UIView *inView, int16_t index) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetView:%d", index); + if (listData.empty()) + { + return nullptr; + } + if (index < 0) + { + return nullptr; + } + size_t uindex = index; + if (uindex >= listData.size()) + { + return nullptr; + } + + std::list::iterator it = listData.begin(); + for (int i = 0; i < index; i++) + { + it++; + } + const StopWatchItem itemData = *it; + StopWatchItemView *item = nullptr; + if (inView == nullptr) + { + item = new StopWatchItemView(); + } + else + { + item = static_cast(inView); + } + item->SetViewIndex(index); + item->SetItemInfo(itemData); + if(curSelectItemViewIndex == itemData.curSelectItemViewIndex) + { + item->SetItemViewColor(true); + } + else + { + item->SetItemViewColor(false); + } + return item; + } + + void StopWatchAdapter::AddListItem(const StopWatchItem &item) + { + listData.push_front(item); + } +} \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchItemView.cpp b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchItemView.cpp new file mode 100644 index 000000000..c632d8c19 --- /dev/null +++ b/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchItemView.cpp @@ -0,0 +1,74 @@ +/* + * @Author: luozheng 1732036298@qq.com + * @Date: 2024-12-12 14:40:44 + * @LastEditors: luozheng 1732036298@qq.com + * @LastEditTime: 2024-12-16 11:40:34 + * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/stopwatch/src/StopWatchItemView.cpp + */ +#include "stopwatch/include/StopWatchItemView.h" +#include "wearable_log.h" +namespace OHOS +{ + StopWatchItemView::StopWatchItemView() + { + SetPosition(0, 0, 360, 42); + SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); + SetStyle(STYLE_BACKGROUND_OPA, 255); + SetUpChild(); + Add(&RecordCycleNumber); + Add(&formattedTime); + Add(&formattedDiff); + } + + StopWatchItemView::~StopWatchItemView() + { + RemoveAll(); + } + + void StopWatchItemView::SetItemInfo(const StopWatchItem itemInfo) + { + RecordCycleNumber.SetText(itemInfo.RecordCycleNumber.c_str()); + formattedTime.SetText(itemInfo.formattedTime.c_str()); + formattedDiff.SetText(itemInfo.formattedDiff.c_str()); + } + + void StopWatchItemView::SetUpChild() + { + RecordCycleNumber.SetPosition(0, 0, 80, 32); + RecordCycleNumber.SetStyle(STYLE_TEXT_FONT, 28); + RecordCycleNumber.SetStyle(STYLE_LINE_HEIGHT, 32); + RecordCycleNumber.SetLineBreakMode(UILabel::LINE_BREAK_CLIP); + RecordCycleNumber.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); + RecordCycleNumber.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 28); + + formattedTime.SetPosition(80, 0, 120, 32); + formattedTime.SetStyle(STYLE_TEXT_FONT, 28); + formattedTime.SetStyle(STYLE_LINE_HEIGHT, 32); + formattedTime.SetLineBreakMode(UILabel::LINE_BREAK_CLIP); + formattedTime.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); + formattedTime.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 28); + + formattedDiff.SetPosition(230, 0, 130, 32); + formattedDiff.SetStyle(STYLE_TEXT_FONT, 28); + formattedDiff.SetStyle(STYLE_LINE_HEIGHT, 32); + formattedDiff.SetLineBreakMode(UILabel::LINE_BREAK_CLIP); + formattedDiff.SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); + formattedDiff.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 28); + } + + void StopWatchItemView::SetItemViewColor(bool flag) + { + if (flag) + { + RecordCycleNumber.SetTextColor(Color::GetColorFromRGBA(0xff, 0x8a, 0x36, 0xff)); + formattedTime.SetTextColor(Color::GetColorFromRGBA(0xff, 0x8a, 0x36, 0xff)); + formattedDiff.SetTextColor(Color::GetColorFromRGBA(0xff, 0x8a, 0x36, 0xff)); + } + else + { + RecordCycleNumber.SetTextColor(Color::GetColorFromRGBA(0xaa, 0xaa, 0xaa, 0xff)); + formattedTime.SetTextColor(Color::GetColorFromRGBA(0xaa, 0xaa, 0xaa, 0xff)); + formattedDiff.SetTextColor(Color::GetColorFromRGBA(0xaa, 0xaa, 0xaa, 0xff)); + } + } +} \ No newline at end of file -- 2.17.1