WwiseBrowserViewCommands.h 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 "Framework/Commands/Commands.h"
  18. #include "AkAudioStyle.h"
  19. #define LOCTEXT_NAMESPACE "WwiseBrowserViewCommands"
  20. class FWwiseBrowserViewCommands : public TCommands<FWwiseBrowserViewCommands>
  21. {
  22. public:
  23. /** FWwiseBrowserViewCommands Constructor */
  24. FWwiseBrowserViewCommands() : TCommands<FWwiseBrowserViewCommands>
  25. (
  26. "WwiseBrowserViewCommand", // Context name for fast lookup
  27. NSLOCTEXT("Contexts", "WwiseBrowserViewCommand", "Wwise Browser Command"), // Localized context name for displaying
  28. NAME_None, // Parent
  29. FAkAudioStyle::GetStyleSetName() // Icon Style Set
  30. )
  31. {
  32. }
  33. /**
  34. * Initialize the commands
  35. */
  36. virtual void RegisterCommands() override
  37. {
  38. UI_COMMAND(RequestPlayWwiseItem, "Play/Stop", "Plays or stops the selected items.", EUserInterfaceActionType::Button, FInputChord(EKeys::SpaceBar));
  39. UI_COMMAND(RequestStopAllWwiseItem, "Stop All", "Stop all playing events", EUserInterfaceActionType::Button, FInputChord());
  40. UI_COMMAND(RequestExploreWwiseItem, "Show in Folder", "Finds this item on disk.", EUserInterfaceActionType::Button, FInputChord());
  41. UI_COMMAND(RequestFindInProjectExplorerWwiseItem, "Find in the Wwise Project Explorer", "Finds the specified object in the Project Explorer (Sync Group 1).", EUserInterfaceActionType::Button, FInputChord(EModifierKey::Control | EModifierKey::Shift, EKeys::One));
  42. UI_COMMAND(RequestFindInContentBrowser, "Find in Content Browser ", "Locates the corresponding item inside the Content Browser", EUserInterfaceActionType::Button, FInputChord());
  43. UI_COMMAND(RequestRefreshWwiseBrowser, "Refresh All", "Populates the Wwise Browser.", EUserInterfaceActionType::Button, FInputChord(EKeys::F5));
  44. UI_COMMAND(RequestImportWwiseItem, "Import Selected Assets", "Imports the selected assets from the Wwise Browser.", EUserInterfaceActionType::Button, FInputChord());
  45. UI_COMMAND(RequestReconcileWwiseItem, "Reconcile Selected Assets", "Reconcile the selected assets from the Wwise Browser.", EUserInterfaceActionType::Button, FInputChord());
  46. }
  47. public:
  48. /** Requests a play action on a Wwise items */
  49. TSharedPtr< FUICommandInfo > RequestPlayWwiseItem;
  50. /** Requests a stop playing on all Wwise items */
  51. TSharedPtr< FUICommandInfo > RequestStopAllWwiseItem;
  52. /** Requests an explore action on the Item (locates its workunit in the file browser) */
  53. TSharedPtr< FUICommandInfo > RequestExploreWwiseItem;
  54. /** Requests a Find in the Wwise Project Explorer action on the Item */
  55. TSharedPtr< FUICommandInfo > RequestFindInProjectExplorerWwiseItem;
  56. /** Requests a refresh on the Wwise Browser */
  57. TSharedPtr< FUICommandInfo > RequestRefreshWwiseBrowser;
  58. /** Requests a Find in Content Browser action on the Item */
  59. TSharedPtr< FUICommandInfo > RequestFindInContentBrowser;
  60. /** Imports the selected asset into the project's Contents */
  61. TSharedPtr< FUICommandInfo > RequestImportWwiseItem;
  62. /** Reconciles the selected asset */
  63. TSharedPtr< FUICommandInfo > RequestReconcileWwiseItem;
  64. };
  65. #undef LOCTEXT_NAMESPACE