4#include "Etterna/Actor/Base/ActorFrame.h"
5#include "Etterna/Actor/Base/AutoActor.h"
6#include "Etterna/Models/Lua/LuaExpressionTransform.h"
7#include "RageUtil/Sound/RageSound.h"
8#include "RageUtil/Misc/RageTimer.h"
10#include "Etterna/Models/Misc/ThemeMetric.h"
11#include "WheelItemBase.h"
13#define NUM_WHEEL_ITEMS (static_cast<int>(ceil(NUM_WHEEL_ITEMS_TO_DRAW + 2)))
18 STATE_FLYING_OFF_BEFORE_NEXT_SORT,
19 STATE_FLYING_ON_AFTER_NEXT_SORT,
20 STATE_ROULETTE_SPINNING,
21 STATE_ROULETTE_SLOWING_DOWN,
22 STATE_RANDOM_SPINNING,
28WheelStateToString(WheelState ws) ->
const std::string&;
30StringToWheelState(
const std::string& sDC) -> WheelState;
31LuaDeclareType(WheelState);
38 virtual void Load(
const std::string& sType);
41 void HandleMessage(
const Message& msg)
override;
43 void Update(
float fDeltaTime)
override;
45 virtual void Move(
int n);
46 void ChangeMusicUnlessLocked(
int n);
47 virtual void ChangeMusic(
int dist);
48 virtual void SetOpenSection(
const std::string& group) {}
51 auto IsMoving()
const -> int;
52 auto IsSettled()
const -> bool;
54 void GetItemPosition(
float fPosOffsetsFromMiddle,
58 float& fRotationX_out);
59 void SetItemPosition(
Actor& item,
int item_index,
float offset_from_middle);
64 auto GetCurrentGroup() -> std::string;
66 auto GetWheelState() -> WheelState {
return m_WheelState; }
67 void Lock() { m_WheelState = STATE_LOCKED; }
68 auto WheelIsLocked() ->
bool
70 return (m_WheelState == STATE_LOCKED ?
true :
false);
72 void RebuildWheelItems(
int dist = INT_MAX);
75 virtual void ReloadSongList(
bool searching,
const std::string& findme) {}
77 virtual auto GetNumItems()
const ->
unsigned int
79 return m_CurWheelItemData.size();
81 auto IsEmpty() ->
bool {
return m_bEmpty; }
86 if (i < 0 || i >=
static_cast<int>(m_WheelBaseItems.size())) {
89 return m_WheelBaseItems[i];
91 auto GetExpandedSectionName() -> std::string
93 return m_sExpandedSectionName;
95 auto GetCurrentIndex() ->
int {
return m_iSelection; }
97 auto GetSelectedType() -> WheelItemDataType
99 return m_CurWheelItemData[m_iSelection]->m_Type;
103 void PushSelf(lua_State* L)
override;
106 void TweenOnScreenForSort();
107 void TweenOffScreenForSort();
110 virtual void UpdateSwitch();
111 virtual auto MoveSpecific(
int n) -> bool;
113 void MaintainItemCount();
115 auto FirstVisibleIndex() -> int;
120 std::vector<WheelItemBaseData*> m_CurWheelItemData;
121 std::vector<WheelItemBase*> m_WheelBaseItems;
126 std::string m_sExpandedSectionName;
128 int m_iSwitchesLeftInSpinDown{};
129 float m_fLockedWheelVelocity{};
133 float m_TimeBeforeMovingBegins{};
136 WheelState m_WheelState;
137 float m_fTimeLeftInState{};
138 float m_fPositionOffsetFromSelection{};
146 void UpdateScrollbar();
A container for other Actors.
Definition ActorFrame.h:8
Base class for all objects that appear on the screen.
Definition Actor.h:77
A smart pointer for Actor.
Definition AutoActor.h:13
Definition RageSound.h:130
The theme specific data.
Definition ThemeMetric.h:52
A wheel with data elements.
Definition WheelBase.h:35
An item on the wheel.
Definition WheelItemBase.h:42
Definition MessageManager.h:96
Definition WheelItemBase.h:30