Plasma Engine  2.0
Loading...
Searching...
No Matches
FmodActions.h
1#pragma once
2
3#include <EditorPluginFmod/EditorPluginFmodDLL.h>
4#include <Foundation/Configuration/CVar.h>
5#include <GuiFoundation/Action/BaseActions.h>
6#include <GuiFoundation/GuiFoundationDLL.h>
7
8class plPreferences;
9
10class PL_EDITORPLUGINFMOD_DLL plFmodActions
11{
12public:
13 static void RegisterActions();
14 static void UnregisterActions();
15
16 static void MapMenuActions(plStringView sMapping);
17 static void MapToolbarActions(plStringView sMapping);
18
19 static plActionDescriptorHandle s_hCategoryFmod;
20 static plActionDescriptorHandle s_hProjectSettings;
21 static plActionDescriptorHandle s_hMuteSound;
22 static plActionDescriptorHandle s_hMasterVolume;
23};
24
25
26class PL_EDITORPLUGINFMOD_DLL plFmodAction : public plButtonAction
27{
28 PL_ADD_DYNAMIC_REFLECTION(plFmodAction, plButtonAction);
29
30public:
31 enum class ActionType
32 {
33 ProjectSettings,
34 MuteSound,
35 };
36
37 plFmodAction(const plActionContext& context, const char* szName, ActionType type);
39
40 virtual void Execute(const plVariant& value) override;
41
42private:
43 void OnPreferenceChange(plPreferences* pref);
44
45 ActionType m_Type;
46};
47
48class PL_EDITORPLUGINFMOD_DLL plFmodSliderAction : public plSliderAction
49{
50 PL_ADD_DYNAMIC_REFLECTION(plFmodSliderAction, plSliderAction);
51
52public:
53 enum class ActionType
54 {
55 MasterVolume,
56 };
57
58 plFmodSliderAction(const plActionContext& context, const char* szName, ActionType type);
60
61 virtual void Execute(const plVariant& value) override;
62
63private:
64 void OnPreferenceChange(plPreferences* pref);
65 void UpdateState();
66
67 ActionType m_Type;
68};
Handle for a plAction.
Definition Action.h:27
Definition BaseActions.h:159
Definition FmodActions.h:27
Definition FmodActions.h:11
Definition FmodActions.h:49
Base class for all preferences.
Definition Preferences.h:17
Definition BaseActions.h:206
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