You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
CL 2404769 - Fortnite/Portal: FriendsAndChat - Added status icon to the online status button. Slightly refactored the handling of online states and display strings in the FriendsStatusViewModel. CL 2404824 - Fortnite/Portal: FriendsAndChat - Fix online status button getting stuck on Offline. [CL 2405805 by Chris Wood in Main branch]
41 lines
1.3 KiB
C++
41 lines
1.3 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
class FFriendsStatusViewModel
|
|
: public TSharedFromThis<FFriendsStatusViewModel>
|
|
{
|
|
public:
|
|
/** Struct that maps EOnlinePresenceStates to loc strings for display */
|
|
struct FOnlineState
|
|
{
|
|
/** Flag that determines which EOnlinePresenceStates are shown in the UI for the user to select */
|
|
bool bIsDisplayed;
|
|
|
|
/** The localized diaply text for this EOnlinePresenceStates */
|
|
FText DisplayText;
|
|
|
|
/** The state the which this struct refers */
|
|
EOnlinePresenceState::Type State;
|
|
|
|
FOnlineState(bool InIsDisplayed, FText InDisplayText, EOnlinePresenceState::Type InState)
|
|
: bIsDisplayed(InIsDisplayed)
|
|
, DisplayText(InDisplayText)
|
|
, State(InState)
|
|
{}
|
|
};
|
|
|
|
virtual ~FFriendsStatusViewModel() {}
|
|
virtual EOnlinePresenceState::Type GetOnlineStatus() const = 0;
|
|
virtual void SetOnlineStatus(EOnlinePresenceState::Type OnlineState) = 0;
|
|
virtual const TArray<FOnlineState>& GetStatusList() const = 0;
|
|
virtual FText GetStatusText() const = 0;
|
|
};
|
|
|
|
/**
|
|
* Creates the implementation for an FFriendsStatusViewModel.
|
|
*
|
|
* @return the newly created FFriendsStatusViewModel implementation.
|
|
*/
|
|
FACTORY(TSharedRef< FFriendsStatusViewModel >, FFriendsStatusViewModel,
|
|
const TSharedRef<class FFriendsAndChatManager>& FFriendsAndChatManager ); |