ChooseOption ============ The ChooseOption file holds functions and procedures that are related to the ingame context menu. ------------ type TRSChooseOption ~~~~~~~~~~~~~~~~~~~~ The type that holds functions and properties of the context menu. ------------ var ChooseOption ~~~~~~~~~~~~~~~~ Variable that stores functions and properties of the context menu. ------------ ChooseOption.Open ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.Open(): Boolean; Opens the optionbox, returns true if it worked. .. note:: by slacky ------------ ChooseOption.Open ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.Open(Box:TBox): Boolean; overload; Opens the menu and stores it's bounds, returns true if it worked. .. note:: by slacky ------------ ChooseOption.IsOpen ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.IsOpen(): Boolean; Checks if the menu is open, it repeats the check for a +/-2 sec if it's ``False`` (expecting it to open). .. note:: by slacky ------------ ChooseOption.IsClosed ~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.IsClosed(): Boolean; Checks if the menu is closed, it repeats the check for a +/-650ms if it's ``True`` (expecting it to close). .. note:: by slacky ------------ ChooseOption.Find ~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.Find(): Boolean; Is used internally to find the option-menu, and store the coordinates in the instance. Returns True if it's found. .. note:: by slacky ------------ ChooseOption.GetOptions ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.GetOptions(): TOptionArray; Returns each option in the menu. .. note:: by slacky ------------ ChooseOption.SelectID ~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.SelectID(ID: Int32; MouseAction: Int32=mouse_left; CloseIt: Boolean=True): Boolean; By default it will click the given option `ID`, if it's not there the menu will be closed. Returns True if the select-action was performed. Slows down the mouse movement for more realistic sliding through the lines of text. .. note:: by slacky ------------ ChooseOption.Select ~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.Select(SubStrings: TStringArray; MouseAction:Int32=mouse_left; AClose:Boolean=True; CaseSensitive:Boolean=True): Boolean; function TRSChooseOption.Select(Option: String; MouseAction:Int32=mouse_left; AClose:Boolean=True; CaseSensitive:Boolean=True): Boolean; Same as SelectID, except that this will look for the option by it's text, rather than by id. ------------ ChooseOption.MissSelect ~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.MissSelect(Option, MissOpt: TStringArray; ChanceOfMiss: Int32=5): Boolean; function TRSChooseOption.MissSelect(Option, MissOpt: String; ChanceOfMiss: Int32=5): Boolean; For example, click Inspect when you meant to click Drop. By default there's a 5% chance of misclick, it will automatically click the right one after a missclick. ------------ ChooseOption.Close ~~~~~~~~~~~~~~~~~~~ .. code-block:: pascal function TRSChooseOption.Close(tryTime:Int32=-1): Boolean; Closes the option menu by dragging the mouse away from it, if that failed it clicks the "Close"-option. .. note:: by slacky ------------