IPlayTestHost class
What a PlayTestController needs of the level editor that hosts it.
Constructors, destructors, conversion operators
- ~IPlayTestHost() defaulted virtual
Public functions
- auto GetDocument() -> LevelDocument& pure virtual
- Returns the level being edited.
-
auto GetDocumentRevision() const -> std::
uint32_t pure virtual - Returns the revision of the level being edited, see CommandHistory::
GetRevision(). - auto GetLevelName() const -> StringView pure virtual
- Returns the name of the level as episode/level.
- auto GetFilePath() const -> StringView pure virtual
- Returns the path of the level file, may be empty.
- auto GetEditHandler() const -> EditorLevelHandler* pure virtual
- Returns the level handler that shows the level being edited, or
nullptr. - auto GetPlayTestRoot() -> IRootController& pure virtual
- Returns the root controller the level handlers of play-tests get, it ends the play-test when they leave the level.
-
auto GetPlayTestHostReference() -> std::
weak_ptr<void> pure virtual - Returns a weak reference to the host, callbacks run later only while it's alive.
- void OnPlayTestViewChanged() pure virtual
- Sets up the view again, the game or the editor is shown now.
- auto OnPlayTestReturned() -> bool pure virtual
- Called once the level is edited again, the changes made meanwhile are shown then.
- auto GetAccentColor() -> Colorf pure virtual
- Returns the color of the rings into the level and back.
- void ShowMessage(StringView text) pure virtual
- Shows a short message.
- void ExitEditor() pure virtual
- Leaves the editor, as chosen in the pause menu of a play-test.
Function documentation
bool Jazz2:: Editor:: IPlayTestHost:: OnPlayTestReturned() pure virtual
Called once the level is edited again, the changes made meanwhile are shown then.
Returns true if the level shown was loaded again for them, its view is set up then, as by OnPlayTestViewChanged().