Skip to content
This repository has been archived by the owner on Aug 7, 2022. It is now read-only.

Commit

Permalink
Removed argument useRTF from InputString
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Dec 7, 2019
1 parent 96cb823 commit 43c8890
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions OMODFramework.Example/ScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public List<int> Select(List<string> items, string title, bool isMultiSelect, Li
return new List<int>{0};
}

public string InputString(string title, string initialText, bool useRTF)
public string InputString(string title, string initialText)
{
Console.WriteLine($"[InputString]: {title}, text: {initialText}, rtf: {useRTF}");
Console.WriteLine($"[InputString]: {title}, text: {initialText}");
return "Hello World";
}

Expand Down
4 changes: 2 additions & 2 deletions OMODFramework.Test/ScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public List<int> Select(List<string> items, string title, bool isMultiSelect, Li
return new List<int>{0};
}

public string InputString(string title, string initialText, bool useRTF)
public string InputString(string title, string initialText)
{
Debug.WriteLine($"[InputString]: {title}, text: {initialText}, rtf: {useRTF}");
Debug.WriteLine($"[InputString]: {title}, text: {initialText}");
return "Hello World";
}

Expand Down
2 changes: 1 addition & 1 deletion OMODFramework/Scripting/DotNetScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ public string InputString(string title)
public string InputString(string title, string initial)
{
Utils.Script($"{MethodBase.GetCurrentMethod().Name} got called");
var result = _handler.ScriptFunctions.InputString(title, initial, false);
var result = _handler.ScriptFunctions.InputString(title, initial);
if(result == null)
FatalError();

Expand Down
2 changes: 1 addition & 1 deletion OMODFramework/Scripting/IScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ List<int> Select(
/// <param name="initialText">Initial contents of the text box, is never null</param>
/// <param name="useRTF">Whether to use a System.Windows.Forms.RichTextBox or a normal TextBox</param>
/// <returns>Contents of the text box or null if the user canceled</returns>
string InputString(string title, string initialText, bool useRTF);
string InputString(string title, string initialText);

/// <summary>
/// Displays a Yes/No dialog
Expand Down
2 changes: 1 addition & 1 deletion OMODFramework/Scripting/SharedFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ public override void Run(ref IReadOnlyCollection<string> line)
var title = line.Count > 2 ? line.ElementAt(2) : "";
var initialText = line.Count > 3 ? line.ElementAt(3) : "";

var result = Handler.ScriptFunctions.InputString(title, initialText, false);
var result = Handler.ScriptFunctions.InputString(title, initialText);
OBMMScriptHandler.Variables[line.ElementAt(1)] = result ?? "";
}
public override void Execute(ref IReadOnlyCollection<object> args)
Expand Down

0 comments on commit 43c8890

Please sign in to comment.