You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb wouter.burgers #rnx ### SourceControl - Remove link to "InputCore" as it is not used - Only include slate and rendering modules if the target we are building for uses slate. - Define SOURCE_CONTROL_WITH_SLATE as 0 if the target we are building for does not use slate. - When SOURCE_CONTROL_WITH_SLATE is zero the following will be applied: -- FRevisionControlStyleManager will not be compiled as it only makes sense if slate is enabled. -- The monitoring aspect of FSourceControlFileStatusMonitor will be disabled as we cannot be notified of user interactions. -- FScopedSourceControlProgress will compile but essentially do nothing. -- The ::GetIcon method of ISourceControlState will no longer be compiled as it returns a FSlateIcon by value. [CL 29516345 by paul chipchase in ue5-main branch]
65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#if SOURCE_CONTROL_WITH_SLATE
|
|
|
|
#include "Styling/SlateStyle.h"
|
|
|
|
/**
|
|
* The style manager that is used to access the currently active revision control style.
|
|
* Use FRevisionControlStyleManager::Get() to access and use any revision control icons/styles
|
|
*/
|
|
class SOURCECONTROL_API FRevisionControlStyleManager
|
|
{
|
|
public:
|
|
|
|
/** reloads textures used by slate renderer */
|
|
static void ReloadTextures();
|
|
|
|
/** @return The current revision control style being used */
|
|
static const ISlateStyle& Get();
|
|
|
|
/** @return The name of the current revision control style being used */
|
|
static FName GetStyleSetName();
|
|
|
|
/** Set the active revision control style to the input style name */
|
|
static void SetActiveRevisionControlStyle(FName InNewActiveRevisionControlStyleName);
|
|
|
|
/** Set the active revision control style to the default style */
|
|
static void ResetToDefaultRevisionControlStyle();
|
|
|
|
private:
|
|
|
|
// The default revision control style instance
|
|
static TSharedPtr< class ISlateStyle > DefaultRevisionControlStyleInstance;
|
|
|
|
// The currently active revision control style
|
|
static FName CurrentRevisionControlStyleName;
|
|
};
|
|
|
|
/**
|
|
* The default revision control style the editor ships with. Inherit from this to create a custom revision controls style
|
|
* Use FRevisionControlStyleManager::SetActiveRevisionControlStyle to change the currently active revision control style
|
|
* Edit the defaults in the constructor here to change any revision control icons in the editor
|
|
*/
|
|
class FDefaultRevisionControlStyle : public FSlateStyleSet
|
|
{
|
|
public:
|
|
|
|
FDefaultRevisionControlStyle();
|
|
virtual ~FDefaultRevisionControlStyle() override;
|
|
|
|
virtual const FName& GetStyleSetName() const override;
|
|
|
|
protected:
|
|
|
|
/** The specific color we use for all the "Branched" icons */
|
|
FLinearColor BranchedColor;
|
|
|
|
private:
|
|
static FName StyleName;
|
|
};
|
|
|
|
#endif //SOURCE_CONTROL_WITH_SLATE
|