ChooseOption¶
Methods to interact with the game context menu.
TOption¶
Helper record to interact with ChooseOption.
TChooseOption¶
Core record responsible with interacting with the ChooseOption context menu.
ChooseOption.IsOpen¶
function TChooseOption.IsOpen(): Boolean;
Returns True/False if the ChooseOption menu is currently visible/open.
Example:
WriteLn ChooseOption.IsOpen();
ChooseOption.WaitOpen¶
function TChooseOption.WaitOpen(time: Integer; interval: Integer = -1): Boolean;
Returns True/False if the ChooseOption menu is becomes visible/open within the specified time.
Example:
WriteLn ChooseOption.WaitOpen();
ChooseOption.Open¶
function TChooseOption.Open(): Boolean;
Opens the ChooseOption context menu if it’s not currently open.
Example:
WriteLn ChooseOption.Open();
ChooseOption.GetOptions¶
function TChooseOption.GetOptions(): TChooseOption_OptionArray;
Returns a TOptionArray of all available options in the ChooseOption context menu.
This is a internal method, you probably don’t need to call it.
ChooseOption.Close¶
function TChooseOption.Close(): Boolean;
Closes the ChooseOption context menu if it’s open. Returns True on success.
Example:
WriteLn ChooseOption.Close();
ChooseOption.Find¶
function TChooseOption.Find(strings: TStringArray; out option: TOption; matchCase: Boolean = True; closeOnFail: Boolean = True): Boolean;
Check if an option is available in the ChooseOption context menu.
Returns true if any of the specified strings is available and the option parameter will
return the TOption data.
Example:
{$I WaspLib/main.simba}
var
option: TOption;
begin
if ChooseOption.Find(['Take'], option) then
ShowOnTarget(option.Bounds);
end.
ChooseOption.ContainsAny¶
function TChooseOption.ContainsAny(strings: TStringArray; matchCase, closeOnFail: Boolean = True): Boolean;
Checks if an option is available in the ChooseOption context menu.
Returns true if any of the specified strings is available.
Example:
{$I WaspLib/main.simba}
begin
WriteLn ChooseOption.ContainsAny(['Take']);
end.
ChooseOption.Hover¶
procedure TChooseOption.Hover(const option: TOption);
function TChooseOption.Hover(strings: TStringArray; matchCase, closeOnFail: Boolean = True): Boolean; overload;
function TChooseOption.Hover(text: String; matchCase, closeOnFail: Boolean = True): Boolean; overload;
Hovers the specified option if it exists on the ChooseOption context menu.
Example:
WriteLn ChooseOption.Select('Take Bones');
ChooseOption.Select¶
procedure TChooseOption.Select(const option: TOption);
function TChooseOption.Select(strings: TStringArray; matchCase, closeOnFail: Boolean = True): Boolean; overload;
function TChooseOption.Select(text: String; matchCase, closeOnFail: Boolean = True): Boolean; overload;
Selects the specified option if it exists on the ChooseOption context menu.
Example:
WriteLn ChooseOption.Select('Take Bones');
ChooseOption variable¶
Global TChooseOption variable.