Skip to content

Commit

Permalink
Add NoteFieldPreview class
Browse files Browse the repository at this point in the history
controllable by lua
  • Loading branch information
poco0317 committed Jan 16, 2021
1 parent b9058c7 commit 6449af3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Etterna/Actor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ list(APPEND ACTOR_GAMEPLAY_SRC
"Gameplay/LyricDisplay.cpp"
"Gameplay/NoteDisplay.cpp"
"Gameplay/NoteField.cpp"
"Gameplay/NoteFieldPreview.cpp"
"Gameplay/Player.cpp"
"Gameplay/PlayerPractice.cpp"
"Gameplay/PlayerReplay.cpp"
Expand All @@ -63,6 +64,7 @@ list(APPEND ACTOR_GAMEPLAY_HPP
"Gameplay/LyricDisplay.h"
"Gameplay/NoteDisplay.h"
"Gameplay/NoteField.h"
"Gameplay/NoteFieldPreview.h"
"Gameplay/Player.h"
"Gameplay/PlayerPractice.h"
"Gameplay/PlayerReplay.h"
Expand Down
2 changes: 1 addition & 1 deletion src/Etterna/Actor/Gameplay/NoteField.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class NoteData;
/** @brief An Actor that renders NoteData. */
class NoteField final : public ActorFrame
class NoteField : public ActorFrame
{
public:
NoteField();
Expand Down
12 changes: 12 additions & 0 deletions src/Etterna/Actor/Gameplay/NoteFieldPreview.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "Etterna/Globals/global.h"
#include "Etterna/Models/Lua/LuaBinding.h"
#include "Etterna/Actor/Base/ActorUtil.h"
#include "NoteFieldPreview.h"

REGISTER_ACTOR_CLASS(NoteFieldPreview);

void
NoteFieldPreview::LoadFromNode(const XNode* pNode)
{
Actor::LoadFromNode(pNode);
}
12 changes: 12 additions & 0 deletions src/Etterna/Actor/Gameplay/NoteFieldPreview.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef NOTE_FIELDPREVIEW_H
#define NOTE_FIELDPREVIEW_H

#include "NoteField.h"

class NoteFieldPreview : public NoteField
{
void LoadFromNode(const XNode* pNode) override;
[[nodiscard]] auto Copy() const -> NoteFieldPreview* override;
};

#endif

0 comments on commit 6449af3

Please sign in to comment.