Skip to content

Commit

Permalink
add lightweight rename profile that only saves to editable.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 20, 2018
1 parent c06e17a commit 12a44f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,12 @@ class LunaProfile : public Luna<Profile>
return 1;
}

static int RenameProfile(T* p, lua_State *L) {
p->m_sDisplayName = SArg(1);
p->SaveEditableDataToDir(p->m_sProfileID);
return 1;
}

LunaProfile()
{
ADD_METHOD( AddScreenshot );
Expand Down Expand Up @@ -1676,6 +1682,7 @@ class LunaProfile : public Luna<Profile>
ADD_METHOD(CalculateCaloriesFromHeartRate);
ADD_METHOD(IsCurrentChartPermamirror);
ADD_METHOD(GetEasiestGoalForChartAndRate);
ADD_METHOD(RenameProfile);
}
};

Expand Down

0 comments on commit 12a44f3

Please sign in to comment.