/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Editor/EditorFramework/Actions/ViewActions.h
68 строк
2 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 <EditorFramework/EditorFrameworkDLL.h> #include <GuiFoundation/Action/BaseActions.h> /// class EZ_EDITORFRAMEWORK_DLL ezViewActions { public: static void RegisterActions(); static void UnregisterActions(); enum Flags { PerspectiveMode = EZ_BIT(0), RenderMode = EZ_BIT(1), ActivateRemoteProcess = EZ_BIT(2), }; static void MapToolbarActions(ezStringView sMapping, ezUInt32 uiFlags); static ezActionDescriptorHandle s_hRenderMode; static ezActionDescriptorHandle s_hPerspective; static ezActionDescriptorHandle s_hActivateRemoteProcess; static ezActionDescriptorHandle s_hLinkDeviceCamera; }; /// class EZ_EDITORFRAMEWORK_DLL ezRenderModeAction : public ezEnumerationMenuAction { EZ_ADD_DYNAMIC_REFLECTION(ezRenderModeAction, ezEnumerationMenuAction); public: ezRenderModeAction(const ezActionContext& context, const char* szName, const char* szIconPath); virtual ezInt64 GetValue() const override; virtual void Execute(const ezVariant& value) override; }; /// class EZ_EDITORFRAMEWORK_DLL ezPerspectiveAction : public ezEnumerationMenuAction { EZ_ADD_DYNAMIC_REFLECTION(ezPerspectiveAction, ezEnumerationMenuAction); public: ezPerspectiveAction(const ezActionContext& context, const char* szName, const char* szIconPath); virtual ezInt64 GetValue() const override; virtual void Execute(const ezVariant& value) override; }; class EZ_EDITORFRAMEWORK_DLL ezViewAction : public ezButtonAction { EZ_ADD_DYNAMIC_REFLECTION(ezViewAction, ezButtonAction); public: enum class ButtonType { ActivateRemoteProcess, LinkDeviceCamera, }; ezViewAction(const ezActionContext& context, const char* szName, ButtonType button); ~ezViewAction(); virtual void Execute(const ezVariant& value) override; private: ButtonType m_ButtonType; };