Skip to content

Commit

Permalink
Allow ComboGraphs to be cleared from Lua
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 19, 2019
1 parent c7be276 commit 04ce0cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Etterna/Actor/Menus/ComboGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ ComboGraph::Set(const StageStats& s, const PlayerStageStats& pss)
const float fFirstSecond = 0;
const float fLastSecond = s.GetTotalPossibleStepsSeconds();

// Unhide the templates.
m_pNormalCombo->SetVisible(true);
m_pMaxCombo->SetVisible(true);
m_pComboNumber->SetVisible(true);

// Find the largest combo.
int iMaxComboSize = 0;
for (unsigned i = 0; i < pss.m_ComboList.size(); ++i)
Expand Down Expand Up @@ -163,11 +168,17 @@ class LunaComboGraph : public Luna<ComboGraph>
p->Set(*pStageStats, *pPlayerStageStats);
COMMON_RETURN_SELF;
}
static int Clear(T* p, lua_State* L)
{
p->DeleteAllChildren();
COMMON_RETURN_SELF;
}

LunaComboGraph()
{
ADD_METHOD(Load);
ADD_METHOD(Set);
ADD_METHOD(Clear);
}
};

Expand Down

0 comments on commit 04ce0cf

Please sign in to comment.