/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/EditorPlugins/Fmod/EditorPluginFmod/Actions/FmodActions.h
69 строк
2 KB
Jan Krassnigg
Map plugin options to all document menus
09 май 2025, 10:09
09 май 2025, 10:09
07e4377
Код
Авторство
О чём код?
#pragma once #include <EditorPluginFmod/EditorPluginFmodDLL.h> #include <Foundation/Configuration/CVar.h> #include <GuiFoundation/Action/BaseActions.h> #include <GuiFoundation/GuiFoundationDLL.h> class ezPreferences; class EZ_EDITORPLUGINFMOD_DLL ezFmodActions { public: static void RegisterActions(); static void UnregisterActions(); static void MapPluginMenuActions(ezStringView sMapping); static void MapMenuActions(ezStringView sMapping); static void MapToolbarActions(ezStringView sMapping); static ezActionDescriptorHandle s_hCategoryFmod; static ezActionDescriptorHandle s_hProjectSettings; static ezActionDescriptorHandle s_hMuteSound; static ezActionDescriptorHandle s_hMasterVolume; }; class EZ_EDITORPLUGINFMOD_DLL ezFmodAction : public ezButtonAction { EZ_ADD_DYNAMIC_REFLECTION(ezFmodAction, ezButtonAction); public: enum class ActionType { ProjectSettings, MuteSound, }; ezFmodAction(const ezActionContext& context, const char* szName, ActionType type); ~ezFmodAction(); virtual void Execute(const ezVariant& value) override; private: void OnPreferenceChange(ezPreferences* pref); ActionType m_Type; }; class EZ_EDITORPLUGINFMOD_DLL ezFmodSliderAction : public ezSliderAction { EZ_ADD_DYNAMIC_REFLECTION(ezFmodSliderAction, ezSliderAction); public: enum class ActionType { MasterVolume, }; ezFmodSliderAction(const ezActionContext& context, const char* szName, ActionType type); ~ezFmodSliderAction(); virtual void Execute(const ezVariant& value) override; private: void OnPreferenceChange(ezPreferences* pref); void UpdateState(); ActionType m_Type; };