Plasma Engine  2.0
Loading...
Searching...
No Matches
GameObjectSelectionActions.h
1#pragma once
2
3#include <EditorFramework/EditorFrameworkDLL.h>
4#include <GuiFoundation/Action/BaseActions.h>
5#include <GuiFoundation/GuiFoundationDLL.h>
6
8
10class PL_EDITORFRAMEWORK_DLL plGameObjectSelectionActions
11{
12public:
13 static void RegisterActions();
14 static void UnregisterActions();
15
16 static void MapActions(plStringView sMapping);
17 static void MapContextMenuActions(plStringView sMapping);
18 static void MapViewContextMenuActions(plStringView sMapping);
19
20 static plActionDescriptorHandle s_hSelectionCategory;
21 static plActionDescriptorHandle s_hShowInScenegraph;
22 static plActionDescriptorHandle s_hFocusOnSelection;
23 static plActionDescriptorHandle s_hFocusOnSelectionAllViews;
24 static plActionDescriptorHandle s_hSnapCameraToObject;
25 static plActionDescriptorHandle s_hMoveCameraHere;
26 static plActionDescriptorHandle s_hCreateEmptyGameObjectHere;
27};
28
30class PL_EDITORFRAMEWORK_DLL plGameObjectSelectionAction : public plButtonAction
31{
32 PL_ADD_DYNAMIC_REFLECTION(plGameObjectSelectionAction, plButtonAction);
33
34public:
35 enum class ActionType
36 {
37 ShowInScenegraph,
38 FocusOnSelection,
39 FocusOnSelectionAllViews,
40 SnapCameraToObject,
41 MoveCameraHere,
42 CreateGameObjectHere,
43 };
44
45 plGameObjectSelectionAction(const plActionContext& context, const char* szName, ActionType type);
47
48 virtual void Execute(const plVariant& value) override;
49
50private:
51 void SelectionEventHandler(const plSelectionManagerEvent& e);
52
53 void UpdateEnableState();
54
55 plGameObjectDocument* m_pSceneDocument;
56 ActionType m_Type;
57};
Handle for a plAction.
Definition Action.h:27
Definition BaseActions.h:159
Definition GameObjectDocument.h:95
Definition GameObjectSelectionActions.h:31
Definition GameObjectSelectionActions.h:11
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
Definition Action.h:67
Definition SelectionManager.h:10