-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added editor settings for foreground and background color, font, and …
…margin. #2
- Loading branch information
1 parent
8cc5519
commit 8da8625
Showing
5 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
Source/TextAssetEditor/Private/Shared/TextAssetEditorSettings.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. | ||
|
||
#include "TextAssetEditorSettings.h" | ||
|
||
#include "Misc/Paths.h" | ||
|
||
|
||
UTextAssetEditorSettings::UTextAssetEditorSettings() | ||
: BackgroundColor(FLinearColor::White) | ||
, ForegroundColor(FLinearColor::Black) | ||
, Font(FSlateFontInfo(FPaths::EngineContentDir() / TEXT("Slate/Fonts/DroidSansMono.ttf"), 10)) | ||
, Margin(4.0f) | ||
{ } |
40 changes: 40 additions & 0 deletions
40
Source/TextAssetEditor/Private/Shared/TextAssetEditorSettings.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "Fonts/SlateFontInfo.h" | ||
#include "Styling/SlateColor.h" | ||
#include "UObject/ObjectMacros.h" | ||
|
||
#include "TextAssetEditorSettings.generated.h" | ||
|
||
|
||
UCLASS(config=Editor) | ||
class TEXTASSETEDITOR_API UTextAssetEditorSettings | ||
: public UObject | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
|
||
/** Color of the TextAsset editor's background. */ | ||
UPROPERTY(config, EditAnywhere, Category=Appearance) | ||
FSlateColor BackgroundColor; | ||
|
||
/** Color of the TextAsset editor's text. */ | ||
UPROPERTY(config, EditAnywhere, Category=Appearance) | ||
FSlateColor ForegroundColor; | ||
|
||
/** The font to use in the TextAsset editor window. */ | ||
UPROPERTY(config, EditAnywhere, Category=Appearance) | ||
FSlateFontInfo Font; | ||
|
||
/** The margin around the TextAsset editor window (in pixels). */ | ||
UPROPERTY(config, EditAnywhere, Category=Appearance) | ||
float Margin; | ||
|
||
public: | ||
|
||
/** Default constructor. */ | ||
UTextAssetEditorSettings(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters