/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Editor/EditorFramework/Actions/GameObjectContextActions.h
44 строки
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 <EditorFramework/EditorFrameworkDLL.h> #include <GuiFoundation/Action/BaseActions.h> #include <GuiFoundation/GuiFoundationDLL.h> class EZ_EDITORFRAMEWORK_DLL ezGameObjectContextActions { public: static void RegisterActions(); static void UnregisterActions(); static void MapToolbarActions(ezStringView sMapping); static void MapContextMenuActions(ezStringView sMapping); static ezActionDescriptorHandle s_hCategory; static ezActionDescriptorHandle s_hPickContextScene; static ezActionDescriptorHandle s_hPickContextObject; static ezActionDescriptorHandle s_hClearContextObject; }; class EZ_EDITORFRAMEWORK_DLL ezGameObjectContextAction : public ezButtonAction { EZ_ADD_DYNAMIC_REFLECTION(ezGameObjectContextAction, ezButtonAction); public: enum class ActionType { PickContextScene, PickContextObject, ClearContextObject, }; ezGameObjectContextAction(const ezActionContext& context, const char* szName, ActionType type); ~ezGameObjectContextAction(); virtual void Execute(const ezVariant& value) override; private: void SelectionEventHandler(const ezSelectionManagerEvent& e); void Update(); ActionType m_Type; };