2019-12-26 15:33:43 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
2019-06-04 15:42:48 -04:00
2019-10-01 20:41:42 -04:00
# include "Tools/StandardToolModeCommands.h"
2022-05-09 13:12:28 -04:00
# include "Styling/AppStyle.h"
2019-06-04 15:42:48 -04:00
# define LOCTEXT_NAMESPACE "StandardToolModeCommands"
FStandardToolModeCommands : : FStandardToolModeCommands ( ) :
TCommands < FStandardToolModeCommands > (
" StandardToolCommands " , // Context name for fast lookup
NSLOCTEXT ( " Contexts " , " StandardToolCommands " , " Standard Tool Commands " ) , // Localized context name for displaying
NAME_None , // Parent
2022-05-09 13:12:28 -04:00
FAppStyle : : GetAppStyleSetName ( ) // Icon Style Set
2019-06-04 15:42:48 -04:00
)
{ }
void FStandardToolModeCommands : : RegisterCommands ( )
{
TSharedPtr < FUICommandInfo > IncreaseBrushSize ;
UI_COMMAND ( IncreaseBrushSize , " Increase Brush Size " , " Increases the size of the brush " , EUserInterfaceActionType : : Button , FInputChord ( EKeys : : RightBracket ) ) ;
Commands . Add ( EStandardToolModeCommands : : IncreaseBrushSize , IncreaseBrushSize ) ;
TSharedPtr < FUICommandInfo > DecreaseBrushSize ;
UI_COMMAND ( DecreaseBrushSize , " Decrease Brush Size " , " Decreases the size of the brush " , EUserInterfaceActionType : : Button , FInputChord ( EKeys : : LeftBracket ) ) ;
Commands . Add ( EStandardToolModeCommands : : DecreaseBrushSize , DecreaseBrushSize ) ;
2019-10-01 20:41:42 -04:00
TSharedPtr < FUICommandInfo > ToggleWireframe ;
UI_COMMAND ( ToggleWireframe , " Toggle Wireframe " , " Toggle Wireframe overlay on/off " , EUserInterfaceActionType : : Button , FInputChord ( EModifierKey : : Alt , EKeys : : W ) ) ;
Commands . Add ( EStandardToolModeCommands : : ToggleWireframe , ToggleWireframe ) ;
2019-06-04 15:42:48 -04:00
}
TSharedPtr < FUICommandInfo > FStandardToolModeCommands : : FindStandardCommand ( EStandardToolModeCommands Command ) const
{
const TSharedPtr < FUICommandInfo > * Found = Commands . Find ( Command ) ;
checkf ( Found ! = nullptr , TEXT ( " FStandardToolModeCommands::FindStandardCommand: standard command %d was not found! " ) , Command ) ;
return ( Found ! = nullptr ) ? * Found : nullptr ;
}
2019-06-18 16:41:05 -04:00
# undef LOCTEXT_NAMESPACE