// Copyright (c) Microsoft Corporation. 
// Licensed under the MIT license.

#include "SimplygonEditorCommands.h"
#include "SimplygonStyle.h"

#define LOCTEXT_NAMESPACE "SimplygonCommands"

FSimplygonEditorCommands::FSimplygonEditorCommands()
	: TCommands<FSimplygonEditorCommands>(
		TEXT("Simplygon"), // Context name for fast lookup
		NSLOCTEXT("Simplygon", "Simplygon", "Simplygon"), // Localized context name for displaying
		NAME_None, // Parent
		FSimplygonStyle::GetStyleSetName() // Icon Style Set
		)
{
}

void FSimplygonEditorCommands::RegisterCommands()
{
	
	UI_COMMAND(EnableSimplygonMeshReduction, "Set Simplygon as Default", "Make Simplygon the default interface to use for Proxy, Skeletal and Mesh reduction.", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AddClippingPlanesVisualizer, "Clipping Planes", "Spawn an actor to visualize/add clipping planes for use.", EUserInterfaceActionType::Button, FInputGesture());
	UI_COMMAND(AddNavMeshSamplesVisualizer, "NavMesh Samples", "Spawn an actor to visualize/generate visibility sampling points from NavMesh data.", EUserInterfaceActionType::Button, FInputGesture());
#ifdef DUMP_RPMALLOC_STATS
	UI_COMMAND(DumpMemoryStats, "Dump RPMalloc Memory Stats", "Dump stats from rpmalloc if memory tracking is enabled along with file path via SIMPLYGON_9_FLAGS environment flag.", EUserInterfaceActionType::Button, FInputGesture());
#endif
#ifdef IMPOSTER_BAKER
	UI_COMMAND(BakeImpostors, "Bake Impostor", "Bake Impostor from Imposter Generator Helper Actors", EUserInterfaceActionType::Button, FInputGesture());
#endif
	UI_COMMAND(OpenPluginSettings, "Plugin Settings", "Open plugin settings", EUserInterfaceActionType::Button, FInputGesture());

	//NOTE: A Description of NONE is currently used to generate no action for the command see SimplygonEditorModule for SetCanProduceActionForCommand
	UI_COMMAND(SimplygonPluginVersion, "Plugin Version", "NONE", EUserInterfaceActionType::None, FInputGesture());

}

#undef LOCTEXT_NAMESPACE
