Updated phone UI

This commit is contained in:
2026-06-03 21:42:24 +03:00
parent 07c323752a
commit f2fcd42edf
21 changed files with 531 additions and 17 deletions
@@ -0,0 +1,28 @@
// © 2025 Naked People Team. All Rights Reserved.
#include "PhoneStatusBar.h"
#include "CommonTextBlock.h"
#include "NakedDesire/Global/TimeOfDaySubsystem.h"
void UPhoneStatusBar::NativeTick(const FGeometry& MyGeometry, float InDeltaTime)
{
Super::NativeTick(MyGeometry, InDeltaTime);
if (!TimeText)
return;
const UWorld* World = GetWorld();
const UTimeOfDaySubsystem* Time = World ? World->GetSubsystem<UTimeOfDaySubsystem>() : nullptr;
if (!Time)
return;
// 24-hour HH:MM, refreshed only when the minute rolls so we aren't re-laying-out text every frame.
FString NewTime = FString::Printf(TEXT("%02d:%02d"), Time->GetHour(), Time->GetMinute());
if (NewTime == CachedTimeString)
return;
CachedTimeString = MoveTemp(NewTime);
TimeText->SetText(FText::FromString(CachedTimeString));
}