diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml
index 8ee918027a..2f754a6983 100644
--- a/Docs/Luadoc/LuaDocumentation.xml
+++ b/Docs/Luadoc/LuaDocumentation.xml
@@ -3887,15 +3887,19 @@ NETWORK:WebSocket{
Makes the NoteField act as if a tap note was hit in the column, with the given score and bright setting.
The callback for did_tap_note will not be called.
-
+
Returns whether beat bars are enabled on this NoteField.
Returns a table of the actors for the columns. This means that each column is an actor, so you can move it around or animate it like an actor. See the NoteColumnRenderer class for a list of special functions for the column's actor.
-
+
Sets whether beat bars are enabled on this NoteField.
+
+ Sets the alpha for the beat bars on this NoteField.
+ Specify the alpha for the measure, fourth, eighth, and sixteenth beat bars at the same time.
+
Same as SetDidTapNoteCallback, but for hold notes. Uses HoldNoteScore instead of TapNoteScore.
@@ -5908,7 +5912,7 @@ local args = {
Returns the preferred sort section name for the specified Song.
-
+
Returns a table containing all songs in the specified preferred sort section.
diff --git a/src/NoteField.cpp b/src/NoteField.cpp
index 28939fdbda..20cc9a84f1 100644
--- a/src/NoteField.cpp
+++ b/src/NoteField.cpp
@@ -47,6 +47,10 @@ NoteField::NoteField()
m_pCurDisplay = nullptr;
m_drawing_board_primitive= false;
m_bShowBeatBars = SHOW_BEAT_BARS;
+ m_fBarMeasureAlpha = BAR_MEASURE_ALPHA;
+ m_fBar4thAlpha = BAR_4TH_ALPHA;
+ m_fBar8thAlpha = BAR_8TH_ALPHA;
+ m_fBar16thAlpha = BAR_16TH_ALPHA;
m_textMeasureNumber.LoadFromFont( THEME->GetPathF("NoteField","MeasureNumber") );
m_textMeasureNumber.SetZoom( 1.0f );
@@ -107,6 +111,14 @@ bool NoteField::GetBeatBars()
return m_bShowBeatBars;
}
+void NoteField::SetBeatBarsAlpha(float measure, float fourth, float eighth, float sixteenth)
+{
+ m_fBarMeasureAlpha = measure;
+ m_fBar4thAlpha = fourth;
+ m_fBar8thAlpha = eighth;
+ m_fBar16thAlpha = sixteenth;
+}
+
void NoteField::CacheNoteSkin( const RString &sNoteSkin_ )
{
RString sNoteSkinLower = sNoteSkin_;
@@ -397,7 +409,7 @@ void NoteField::DrawBeatBar( const float fBeat, BeatBarType type, int iMeasureIn
if( bIsMeasure )
{
- fAlpha = BAR_MEASURE_ALPHA;
+ fAlpha = m_fBarMeasureAlpha;
iState = 0;
}
else
@@ -417,15 +429,15 @@ void NoteField::DrawBeatBar( const float fBeat, BeatBarType type, int iMeasureIn
DEFAULT_FAIL( type );
case measure: // handled above
case beat:
- fAlpha = BAR_4TH_ALPHA;
+ fAlpha = m_fBar4thAlpha;
iState = 1;
break;
case half_beat:
- fAlpha = SCALE(fScrollSpeed,1.0f,2.0f,0.0f,BAR_8TH_ALPHA);
+ fAlpha = SCALE(fScrollSpeed,1.0f,2.0f,0.0f,m_fBar8thAlpha);
iState = 2;
break;
case quarter_beat:
- fAlpha = SCALE(fScrollSpeed,2.0f,4.0f,0.0f,BAR_16TH_ALPHA);
+ fAlpha = SCALE(fScrollSpeed,2.0f,4.0f,0.0f,m_fBar16thAlpha);
iState = 3;
break;
}
@@ -1290,6 +1302,12 @@ public:
return 0;
}
+ static int SetBeatBarsAlpha(T* p, lua_State* L)
+ {
+ p->SetBeatBarsAlpha(FArg(1), FArg(2), FArg(3), FArg(4));
+ return 0;
+ }
+
LunaNoteField()
{
ADD_METHOD(set_step_callback);
@@ -1303,6 +1321,7 @@ public:
ADD_METHOD(get_column_actors);
ADD_METHOD(GetBeatBars);
ADD_METHOD(SetBeatBars);
+ ADD_METHOD(SetBeatBarsAlpha);
}
};
diff --git a/src/NoteField.h b/src/NoteField.h
index 51c89630d5..8a621035d3 100644
--- a/src/NoteField.h
+++ b/src/NoteField.h
@@ -69,6 +69,7 @@ public:
void SetBeatBars(bool active);
bool GetBeatBars();
+ void SetBeatBarsAlpha(float measure, float fourth, float eighth, float sixteenth);
protected:
void CacheNoteSkin( const RString &sNoteSkin );
@@ -131,6 +132,10 @@ protected:
Quad m_rectAreaHighlight;
bool m_bShowBeatBars;
+ float m_fBarMeasureAlpha;
+ float m_fBar4thAlpha;
+ float m_fBar8thAlpha;
+ float m_fBar16thAlpha;
};
#endif