This method is called when loading a savefile. This is where all the data you've given to this object will need to be processed.
This method is called when loading a savefile. This is where all the data you've given to this object will need to be processed.
1 guiElementInstance targetElement
the event box element this data is being displayed on.
2 any data
the data you gave to this element via game.addToEventBox().
-- taken from game/game/project.lua eventBoxText:registerNew({ id = "review_published", getText = function(self, data) return _format(_T("REVIEWER_HAS_REVIEWED_LAYOUT", "'REVIEWER' has published a review of 'GAME_PROJECT'"), "REVIEWER", data.review:getReviewer():getName(), "GAME_PROJECT", data.game:getName()) end, saveData = function(self, data) return {reviewer = data.review:getReviewer():getID(), game = data.game:getUniqueID()} end, loadData = function(self, targetElement, data) local gameObj = studio:getGameByUniqueID(data.game) local review = gameObj:getReviewObject(data.reviewer) targetElement:setReview(review) return {review = review, game = gameObj} --studio:getGameByUniqueID(data) end })