From 0512bd9a18c570e3f0aff984e375bd0558d82eb6 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Mon, 24 Jul 2023 00:41:10 -0500 Subject: [PATCH] VideoCommon: add graphics mod editor events --- .../GraphicsModEditor/EditorEvents.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Source/Core/VideoCommon/GraphicsModEditor/EditorEvents.h diff --git a/Source/Core/VideoCommon/GraphicsModEditor/EditorEvents.h b/Source/Core/VideoCommon/GraphicsModEditor/EditorEvents.h new file mode 100644 index 0000000000..e71b4335e3 --- /dev/null +++ b/Source/Core/VideoCommon/GraphicsModEditor/EditorEvents.h @@ -0,0 +1,30 @@ +// Copyright 2023 Dolphin Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +#include "Common/HookableEvent.h" +#include "VideoCommon/Assets/CustomAssetLibrary.h" +#include "VideoCommon/GraphicsModEditor/EditorTypes.h" + +namespace GraphicsModEditor::EditorEvents +{ +// Event called when a target or action is selected +using ItemsSelectedEvent = Common::HookableEvent<"ItemsSelected", std::set>; + +// Event called when a change that can be saved occurs +using ChangeOccurredEvent = Common::HookableEvent<"ChangeOccurred">; + +// Event called when an asset should reload, the event provides the asset id +// for use in the loader +// Will also trigger the above ChangeOccurred event +using AssetReloadEvent = + Common::HookableEvent<"AssetReload", VideoCommon::CustomAssetLibrary::AssetID>; + +// Event called when requesting an asset in the asset browser +using JumpToAssetInBrowserEvent = + Common::HookableEvent<"JumpToAssetInBrowser", VideoCommon::CustomAssetLibrary::AssetID>; + +} // namespace GraphicsModEditor::EditorEvents