/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/EditorPlugins/Assets/EditorPluginAssets/SkeletonAsset/SkeletonActions.h
53 строки
1 KB
Jan Krassnigg
Reorganized menu structure and added support for global mapping names (#1018)
28 июл 2023, 09:18
Не верифицирован
28 июл 2023, 09:18
fb024c5
Код
Авторство
О чём код?
#pragma once #include <EditorPluginAssets/EditorPluginAssetsDLL.h> #include <GuiFoundation/Action/BaseActions.h> #include <GuiFoundation/GuiFoundationDLL.h> class ezSkeletonAssetDocument; struct ezSkeletonAssetEvent; class ezSkeletonActions { public: static void RegisterActions(); static void UnregisterActions(); static void MapActions(ezStringView sMapping); static ezActionDescriptorHandle s_hCategory; static ezActionDescriptorHandle s_hRenderBones; static ezActionDescriptorHandle s_hRenderColliders; static ezActionDescriptorHandle s_hRenderJoints; static ezActionDescriptorHandle s_hRenderSwingLimits; static ezActionDescriptorHandle s_hRenderTwistLimits; static ezActionDescriptorHandle s_hRenderPreviewMesh; }; class ezSkeletonAction : public ezButtonAction { EZ_ADD_DYNAMIC_REFLECTION(ezSkeletonAction, ezButtonAction); public: enum class ActionType { RenderBones, RenderColliders, RenderJoints, RenderSwingLimits, RenderTwistLimits, RenderPreviewMesh, }; ezSkeletonAction(const ezActionContext& context, const char* szName, ActionType type); ~ezSkeletonAction(); virtual void Execute(const ezVariant& value) override; private: void AssetEventHandler(const ezSkeletonAssetEvent& e); void UpdateState(); ezSkeletonAssetDocument* m_pSkeletonpDocument = nullptr; ActionType m_Type; };