Fixes track titles not being set from WML.

The current implementation of the [music] tag sets the title after adding the track, however the title field was read only.  This makes the field writable.
This commit is contained in:
Pentarctagon 2018-08-12 23:00:21 -05:00
parent a28fb94520
commit 5ac01dc195
2 changed files with 2 additions and 0 deletions

View file

@ -274,6 +274,7 @@ static int impl_track_set(lua_State* L) {
modify_bool_attrib("once", (*track)->set_play_once(value));
modify_int_attrib("ms_before", (*track)->set_ms_before(value));
modify_int_attrib("ms_after", (*track)->set_ms_after(value));
modify_string_attrib("title", (*track)->set_title(value));
return 0;
}

View file

@ -50,6 +50,7 @@ public:
void set_shuffle(bool v) { shuffle_ = v; }
void set_ms_before(int v) { ms_before_ = v; }
void set_ms_after(int v) { ms_after_ = v; }
void set_title(const std::string& v) { title_ = v; }
private:
void resolve();