Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SoundComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/ComponentReceiveActionType.h"
7#include "mc/client/gui/controls/SoundEventConditions.h"
8#include "mc/client/gui/controls/UIComponent.h"
9#include "mc/client/gui/screens/ScreenEventType.h"
10
11// auto generated forward declare list
12// clang-format off
15class UIControl;
16class UISoundPlayer;
17class VisualTree;
18struct ScreenEvent;
19// clang-format on
20
21class SoundComponent : public ::UIComponent {
22public:
23 // SoundComponent inner types declare
24 // clang-format off
25 struct SoundEventInfo;
26 // clang-format on
27
28 // SoundComponent inner types define
29 struct SoundEventInfo {
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 32, ::std::string> mSoundName;
34 ::ll::TypedStorage<4, 4, float> mVolume;
35 ::ll::TypedStorage<4, 4, float> mPitch;
36 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mLastPlayTime;
37 ::ll::TypedStorage<8, 8, ::std::chrono::milliseconds> mMinTimeBetweenPlays;
38 ::ll::TypedStorage<4, 4, ::ScreenEventType> mScreenEventType;
39 ::ll::TypedStorage<4, 8, ::SoundEventConditions> mEventConditions;
40 // NOLINTEND
41
42 public:
43 // prevent constructor by default
44 SoundEventInfo();
45
46 public:
47 // member functions
48 // NOLINTBEGIN
50 ::std::string soundName,
51 float volume,
52 float pitch,
53 ::std::chrono::milliseconds minTimeBetweenPlays,
54 ::ScreenEventType screenEventType,
55 ::SoundEventConditions const& screenEventConditions
56 );
57 // NOLINTEND
58
59 public:
60 // constructor thunks
61 // NOLINTBEGIN
62 MCNAPI void* $ctor(
63 ::std::string soundName,
64 float volume,
65 float pitch,
66 ::std::chrono::milliseconds minTimeBetweenPlays,
67 ::ScreenEventType screenEventType,
68 ::SoundEventConditions const& screenEventConditions
69 );
70 // NOLINTEND
71 };
72
73public:
74 // member variables
75 // NOLINTBEGIN
76 ::ll::TypedStorage<8, 8, ::UISoundPlayer const*> mSoundPlayer;
77 ::ll::TypedStorage<4, 4, float> mVolume;
78 ::ll::TypedStorage<4, 4, float> mPitch;
79 ::ll::TypedStorage<8, 32, ::std::string> mSoundName;
80 ::ll::TypedStorage<8, 24, ::std::vector<::SoundComponent::SoundEventInfo>> mSoundEvents;
81 // NOLINTEND
82
83public:
84 // virtual functions
85 // NOLINTBEGIN
86 virtual ~SoundComponent() /*override*/ = default;
87
88 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
89
90 virtual void reset() /*override*/;
91
92 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
93
94 virtual ::ComponentReceiveActionType receive(
95 ::VisualTree& visualTree,
97 ::UIAnimationController& animationController,
98 ::ScreenEvent const& screenEvent
99 ) /*override*/;
100 // NOLINTEND
101
102public:
103 // member functions
104 // NOLINTBEGIN
105 MCNAPI void addSoundEvent(
106 ::std::string const& soundName,
107 float volume,
108 float pitch,
109 ::std::chrono::milliseconds minTimeBetweenPlays,
110 ::ScreenEventType screenEventType,
111 ::SoundEventConditions const& screenEventConditions
112 );
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCNAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
119
120 MCNAPI void $reset();
121
122 MCNAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
123
124 MCNAPI ::ComponentReceiveActionType $receive(
125 ::VisualTree& visualTree,
127 ::UIAnimationController& animationController,
128 ::ScreenEvent const& screenEvent
129 );
130 // NOLINTEND
131};
Definition ScreenInputContext.h:5
Definition SoundComponent.h:5
MCAPI void addSoundEvent(::std::string const &soundName, float volume, float pitch, ::std::chrono::milliseconds minTimeBetweenPlays, ::ScreenEventType screenEventType, ::SoundEventConditions const &screenEventConditions)
MCAPI::ComponentReceiveActionType $receive(::VisualTree &visualTree, ::ScreenInputContext &context, ::UIAnimationController &animationController, ::ScreenEvent const &screenEvent)
MCAPI void $reset()
MCAPI ::std::unique_ptr<::UIComponent > $clone(::UIControl &cloneOwner) const
MCAPI::ComponentReceiveActionType $receive(::ScreenEvent const &screenEvent)
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition UISoundPlayer.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5
Definition SoundComponent.h:13
MCAPI void * $ctor(::std::string soundName, float volume, float pitch, ::std::chrono::milliseconds minTimeBetweenPlays, ::ScreenEventType screenEventType, ::SoundEventConditions const &screenEventConditions)
MCAPI SoundEventInfo(::std::string soundName, float volume, float pitch, ::std::chrono::milliseconds minTimeBetweenPlays, ::ScreenEventType screenEventType, ::SoundEventConditions const &screenEventConditions)
Definition context.h:5
Definition SoundEventConditions.h:9