Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
HotbarElementBase.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/EnableGetWeakRef.h"
7#include "mc/editor/IHotbarElementPayloadHandler.h"
8
9// auto generated forward declare list
10// clang-format off
11namespace Editor { struct SerializableProbabilityHotbarElement; }
12namespace Editor { struct SerializableSimpleHotbarElement; }
13namespace Editor::Network { class HotbarCollectionHotbarElementDisplayNameChangedPayload; }
14// clang-format on
15
16namespace Editor {
17
18class HotbarElementBase : public ::Editor::IHotbarElementPayloadHandler,
19 public ::EnableGetWeakRef<::Editor::HotbarElementBase> {
20public:
21 // HotbarElementBase inner types define
22 enum class HotbarElementType : int {
23 Simple = 0,
24 Probability = 1,
25 };
26
27public:
28 // member variables
29 // NOLINTBEGIN
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 HotbarElementBase& operator=(HotbarElementBase const&);
40 HotbarElementBase(HotbarElementBase const&);
41 HotbarElementBase();
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 virtual ~HotbarElementBase() = default;
47
48 virtual ::Editor::HotbarElementBase::HotbarElementType getHotbarElementType() const = 0;
49
50 virtual ::std::variant<::Editor::SerializableSimpleHotbarElement, ::Editor::SerializableProbabilityHotbarElement>
51 baseSnapshotFrom() const = 0;
52
53 virtual void removeDisallowedIds() = 0;
54
55 virtual bool operator==(::Editor::HotbarElementBase const&) const;
56
57 virtual void _handleHotbarCollectionHotbarElementDisplayNameChangedPayload(
59 ) /*override*/;
60 // NOLINTEND
61};
62
63} // namespace Editor
Definition HotbarElementBase.h:19
Definition IHotbarElementPayloadHandler.h:12
Definition HotbarCollectionHotbarElementDisplayNameChangedPayload.h:16
Definition EnableGetWeakRef.h:6
Definition SerializableProbabilityHotbarElement.h:12
Definition SerializableSimpleHotbarElement.h:7
Definition Alias.h:14