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
{ | |
"name": "Lit", | |
"context": "CornellBox", | |
"id": "1367BFE5497BA28C35AAFBBCB6C661C0", | |
"commit": "3251525", | |
"width": 1920, | |
"height": 1080, | |
"rhi": "D3D11", | |
"platform": "Windows", | |
"featureLevel": "SM5", |
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
template< class T > | |
T* CreateWidget(UGameInstance* OwningGame, UClass* UserWidgetClass, TFunctionRef<void(T*)> PostNewModify) | |
{ | |
UUserWidget* NewWidget = NewObject<UUserWidget>(OwningGame, UserWidgetClass); | |
if ( ULocalPlayer* Player = OwningGame->GetFirstGamePlayer() ) | |
{ | |
NewWidget->SetPlayerContext(FLocalPlayerContext(Player)); | |
} |
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
void SolutionOpened() | |
{ | |
string slnFile = mdte.Solution.FullName; | |
string solutionDirectory = Path.GetDirectoryName(slnFile); | |
string pathfileName = Path.GetFileNameWithoutExtension(slnFile) + ".autoexp"; | |
string patchFile = Path.Combine(solutionDirectory, pathfileName); | |
if(File.Exists(patchFile)) | |
{ | |
string autoExpPatch = File.ReadAllText(patchFile); |
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
// Must hold a reference to the solution events object or the events wont | |
// fire, garbage collection related | |
msolutionEvents = mdte.Events.SolutionEvents; | |
msolutionEvents.Opened += SolutionOpened; | |
msolutionEvents.AfterClosing += SolutionAfterClosing; | |
// Most of the events you'll find useful are catagoried under | |
// DTE.Events... |
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
// --- Microsoft.VisualStudio.VSConstants.UICONTEXT_NoSolution | |
[ProvideAutoLoad("ADFC4E64-0397-11D1-9F4E-00A0C911004F")] | |
public sealed class AutoExpPatchPackage : Package | |
{ | |
//... | |
} |
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
[AutoExpand] TestStruct =x=<x,g>, y=<y,g>, z=<z,g> |
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
public sealed class MyPackage : Package | |
{ | |
private DTE mdte; | |
protected override void Initialize() | |
{ | |
// Your package is also a service container IServiceContainer | |
serviceContainer = this as IServiceContainer; | |
// The DTE object contains most of the goodies you'll want to play with | |
mdte = serviceContainer.GetService(typeof(SDTE))as DTE; |
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
SolidColorBrush current = SystemColors.HighlightBrush; | |
FieldInfo colorCacheField = typeof(SystemColors).GetField("_colorCache", | |
BindingFlags.Static | BindingFlags.NonPublic); | |
Color[] _colorCache = (Color[])colorCacheField.GetValue(typeof(SystemColors)); | |
_colorCache[14] = Color.FromArgb(0xFF, 0xFF, 0x00, 0x00); |
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
<local:Overlay> | |
<ListBox /> | |
<local:Overlay.OverlayContent> | |
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Loading!</TextBlock> | |
</local:Overlay.OverlayContent> | |
</local:Overlay> |
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
<Style TargetType="{x:Type local:Overlay}"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="{x:Type ContentControl}"> | |
<AdornerDecorator x:Name="PART_OverlayAdorner"> | |
<ContentPresenter/> | |
</AdornerDecorator> | |
</ControlTemplate> | |
</Setter.Value> | |
</Setter> |
NewerOlder