Introduction
Add UI utilities that show in-game dialog windows. These should be similar to the prompts seen during the tutorial section of the game.
Description of the feature
Feature usage
Would provide a basic method for mod authors to get input from the player. One example is when a mod needs to get the player's confirmation before doing something. Another would be when a mod needs to show the player a message that is worth pausing the game for (when GameMessage.Broadcast isn't enough).
Dependencies and PrerequisitesDoes this feature require any new dependencies? No.
Implementation details
My gut feeling is that it is going to be difficult to use the game's tutorial dialog system for this... that code is probably coupled to the "case" and "objectives" systems. We'll probably have to create a hacky solution using the game's interface system.
Two possible approaches below, but we can discuss other ideas also.
// Idea 1: Create dialog objects
var dlg = new Dialog("Title", "Question");
var noBtn = dlg.AddResponse(buttonText: "No", Dialog.LeftButtonPosition);
var yesBtn = dlg.AddResponse(buttonText: "Yes", Dialog.RightButtonPosition);
noBtn.OnClicked += SomeAction;
Lib.Interface.ShowDialog(dialog: dlg, pauseWhileShowing: true, destroyAfterResponse: true);
// Idea 2: Create one helper function that handles everything
ShowDialog(string title, string question, string leftButtonText, Action leftButtonClicked, string centerButtonText, Action ...)
Introduction Add UI utilities that show in-game dialog windows. These should be similar to the prompts seen during the tutorial section of the game.
Description of the feature
Feature usage Would provide a basic method for mod authors to get input from the player. One example is when a mod needs to get the player's confirmation before doing something. Another would be when a mod needs to show the player a message that is worth pausing the game for (when GameMessage.Broadcast isn't enough).
Dependencies and Prerequisites Does this feature require any new dependencies? No.
Implementation details My gut feeling is that it is going to be difficult to use the game's tutorial dialog system for this... that code is probably coupled to the "case" and "objectives" systems. We'll probably have to create a hacky solution using the game's interface system.
Two possible approaches below, but we can discuss other ideas also.
Note: Not a priority for v1.1.0