WaapiPickerViewCommands.h 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*******************************************************************************
  2. The content of this file includes portions of the proprietary AUDIOKINETIC Wwise
  3. Technology released in source code form as part of the game integration package.
  4. The content of this file may not be used without valid licenses to the
  5. AUDIOKINETIC Wwise Technology.
  6. Note that the use of the game engine is subject to the Unreal(R) Engine End User
  7. License Agreement at https://www.unrealengine.com/en-US/eula/unreal
  8. License Usage
  9. Licensees holding valid licenses to the AUDIOKINETIC Wwise Technology may use
  10. this file in accordance with the end user license agreement provided with the
  11. software or, alternatively, in accordance with the terms contained
  12. in a written agreement between you and Audiokinetic Inc.
  13. Copyright (c) 2023 Audiokinetic Inc.
  14. *******************************************************************************/
  15. #pragma once
  16. #include "CoreMinimal.h"
  17. #include "InputCoreTypes.h"
  18. #include "AkAudioStyle.h"
  19. #include "Framework/Commands/InputChord.h"
  20. #include "Framework/Commands/Commands.h"
  21. #define LOCTEXT_NAMESPACE "WaapiPickerViewCommands"
  22. /**
  23. * The set of commands supported by the WaapiPickerView
  24. */
  25. class AKAUDIO_API FWaapiPickerViewCommands : public TCommands<FWaapiPickerViewCommands>
  26. {
  27. public:
  28. /** FWaapiPickerViewCommands Constructor */
  29. FWaapiPickerViewCommands() : TCommands<FWaapiPickerViewCommands>
  30. (
  31. "WaapiPickerViewCommand", // Context name for fast lookup
  32. NSLOCTEXT("Contexts", "WaapiPickerViewCommand", "Waapi Picker Command"), // Localized context name for displaying
  33. NAME_None, // Parent
  34. FAkAudioStyle::GetStyleSetName() // Icon Style Set
  35. )
  36. {
  37. }
  38. /**
  39. * Initialize the commands
  40. */
  41. virtual void RegisterCommands() override
  42. {
  43. UI_COMMAND(RequestRenameWwiseItem, "Rename", "Renames the selected item.", EUserInterfaceActionType::Button, FInputChord(EKeys::F2));
  44. UI_COMMAND(RequestPlayWwiseItem, "Play/Stop", "Plays or stops the selected item.", EUserInterfaceActionType::Button, FInputChord(EKeys::SpaceBar));
  45. UI_COMMAND(RequestStopAllWwiseItem, "Stop All", "Stop all playing events", EUserInterfaceActionType::Button, FInputChord());
  46. UI_COMMAND(RequestDeleteWwiseItem, "Delete", "Deletes the selected item(s).", EUserInterfaceActionType::Button, FInputChord(EKeys::Delete));
  47. UI_COMMAND(RequestExploreWwiseItem, "Show in Folder", "Finds this item on disk.", EUserInterfaceActionType::Button, FInputChord());
  48. UI_COMMAND(RequestFindInProjectExplorerWwiseItem, "Find in the Project Explorer", "Finds the specified object in the Project Explorer (Sync Group 1).", EUserInterfaceActionType::Button, FInputChord(EModifierKey::Control | EModifierKey::Shift, EKeys::One));
  49. UI_COMMAND(RequestRefreshWaapiPicker, "Refresh All", "Populates the Waapi Picker.", EUserInterfaceActionType::Button, FInputChord(EKeys::F5));
  50. UI_COMMAND(RequestImportWwiseItem, "Import Selected Assets", "Imports the selected assets from the Waapi Picker.", EUserInterfaceActionType::Button, FInputChord());
  51. }
  52. public:
  53. /** Requests a rename on the Item */
  54. TSharedPtr< FUICommandInfo > RequestRenameWwiseItem;
  55. /** Requests a play action on a Wwise item */
  56. TSharedPtr< FUICommandInfo > RequestPlayWwiseItem;
  57. /** Requests a stop playing on all Wwise items */
  58. TSharedPtr< FUICommandInfo > RequestStopAllWwiseItem;
  59. /** Requests a delete action on a Wwise item(s) */
  60. TSharedPtr< FUICommandInfo > RequestDeleteWwiseItem;
  61. /** Requests an explore action on the Item */
  62. TSharedPtr< FUICommandInfo > RequestExploreWwiseItem;
  63. /** Requests a Find in the Project Explorer action on the Item */
  64. TSharedPtr< FUICommandInfo > RequestFindInProjectExplorerWwiseItem;
  65. /** Requests a refresh on the Waapi Picker */
  66. TSharedPtr< FUICommandInfo > RequestRefreshWaapiPicker;
  67. /** Imports the selected asset into the project's Contents */
  68. TSharedPtr< FUICommandInfo > RequestImportWwiseItem;
  69. };
  70. #undef LOCTEXT_NAMESPACE