Release 0.48

master
Kasi 2018-05-16 20:35:55 +01:00
parent 4367c38877
commit 3943a3c7c6
2 changed files with 21 additions and 12 deletions

View File

@ -55,7 +55,7 @@ class Menu
* @description By default the game includes html code in menu actions/targets * @description By default the game includes html code in menu actions/targets
* This function returns those actions without the removal of the html code * This function returns those actions without the removal of the html code
* @return std::vector<std::string> of raw menu actions * @return std::vector<std::string> of raw menu actions
* @note The result can be inaccurate if the menu isn't open before calling this function * @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::vector<std::string> GetActionsRaw(); static std::vector<std::string> GetActionsRaw();
@ -65,7 +65,7 @@ class Menu
* @description By default the game includes html code in menu actions/targets * @description By default the game includes html code in menu actions/targets
* This function returns those targets without the removal of the html code * This function returns those targets without the removal of the html code
* @return std::vector<std::string> of targets * @return std::vector<std::string> of targets
* @note The result can be inaccurate if the menu isn't open before calling this function * @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::vector<std::string> GetTargetsRaw(); static std::vector<std::string> GetTargetsRaw();
@ -76,7 +76,7 @@ class Menu
* 'Use' - action 'gold bar' - target * 'Use' - action 'gold bar' - target
* 'Attack' - action 'Guard (level-21)' - target * 'Attack' - action 'Guard (level-21)' - target
* @return std::vector<std::string> array of menu actions * @return std::vector<std::string> array of menu actions
* @note The result can be inaccurate if the menu isn't open before calling this function * @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::vector<std::string> GetActions(); static std::vector<std::string> GetActions();
@ -87,7 +87,7 @@ class Menu
* 'Use' - action 'gold bar' - target * 'Use' - action 'gold bar' - target
* 'Attack' - action 'Guard (level-21)' - target * 'Attack' - action 'Guard (level-21)' - target
* @return std::vector<std::string> array of menu targets * @return std::vector<std::string> array of menu targets
* @note The result can be inaccurate if the menu isn't open before calling this function * @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::vector<std::string> GetTargets(); static std::vector<std::string> GetTargets();
@ -100,7 +100,7 @@ class Menu
* 'Use gold bar' - option * 'Use gold bar' - option
* 'Attack Guard (level-21)' - option * 'Attack Guard (level-21)' - option
* @return std::vector<std::string> array of menu options * @return std::vector<std::string> array of menu options
* @note The result can be inaccurate if the menu isn't open before calling this function * @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::vector<std::string> GetOptions(); static std::vector<std::string> GetOptions();
@ -116,9 +116,10 @@ class Menu
* If you pass 'Attack' as the 'Option' to look for, it'll select the very first guard, regardless of level. * If you pass 'Attack' as the 'Option' to look for, it'll select the very first guard, regardless of level.
* If you pass 'Attack Guard (level-40)' as the 'Option' to look for, it'll attack the guard whose level is 40. * If you pass 'Attack Guard (level-40)' as the 'Option' to look for, it'll attack the guard whose level is 40.
* @param Option %Menu option to look for, can be very specific, or very lenient * @param Option %Menu option to look for, can be very specific, or very lenient
* @return std::int32_t The index of the first found option, -1 if the menu isn't open, or the option wasn't found * @return std::int32_t The index of the first found option, -1 if the option wasn't found
* @note Notice that 'Attack Guard (level-40)' has a double space after 'Guard', menu options can vary, in this case the menu option i'm looking for * @note Notice that 'Attack Guard (level-40)' has a double space after 'Guard', menu options can vary, in this case the menu option i'm looking for
* has a double space after 'Guard'. * has a double space after 'Guard'.
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::int32_t IndexOf(const std::string& Option); static std::int32_t IndexOf(const std::string& Option);
@ -129,8 +130,9 @@ class Menu
* This function is just Menu::IndexOf(const std::string& Option), but instead of looking for one single option, this function looks for multiple * This function is just Menu::IndexOf(const std::string& Option), but instead of looking for one single option, this function looks for multiple
* *
* @param %Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be * @param %Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be
* @return std::int32_t The index of the first found option, -1 if the menu isn't open, or the option wasn't found * @return std::int32_t The index of the first found option, -1 if the option wasn't found
* @see Menu::IndexOf(const std::string& Option) * @see Menu::IndexOf(const std::string& Option)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::int32_t IndexOf(const std::vector<std::string>& Options); static std::int32_t IndexOf(const std::vector<std::string>& Options);
@ -140,10 +142,11 @@ class Menu
* *
* @param Index The index of the menu option to look at * @param Index The index of the menu option to look at
* @return std::tuple<bool, std::string, std::string> * @return std::tuple<bool, std::string, std::string>
* std::int32_t [0] = Index of the option that was found, -1 if the menu isn't open, or the option wasn't found * std::int32_t [0] = Index of the option that was found, -1 if the option wasn't found
* std::string [1] = Action that was found at index * std::string [1] = Action that was found at index
* std::string [2] = Target that was found at index * std::string [2] = Target that was found at index
* @see Menu::IndexOf(const std::string& Option) * @see Menu::IndexOf(const std::string& Option)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::tuple<std::int32_t, std::string, std::string> FindOption(std::uint32_t Index); static std::tuple<std::int32_t, std::string, std::string> FindOption(std::uint32_t Index);
@ -152,10 +155,11 @@ class Menu
* *
* @param Option %Menu option to look for, the more specific, the more accurate the result will be * @param Option %Menu option to look for, the more specific, the more accurate the result will be
* @return std::tuple<bool, std::string, std::string> * @return std::tuple<bool, std::string, std::string>
* std::int32_t [0] = Index of the option that was found, -1 if the menu isn't open, or the option wasn't found * std::int32_t [0] = Index of the option that was found, -1 if the option wasn't found
* std::string [1] = Action that was found * std::string [1] = Action that was found
* std::string [2] = Target that was found * std::string [2] = Target that was found
* @see Menu::IndexOf(const std::string& Option) * @see Menu::IndexOf(const std::string& Option)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::tuple<std::int32_t, std::string, std::string> FindOption(const std::string& Option); static std::tuple<std::int32_t, std::string, std::string> FindOption(const std::string& Option);
@ -164,10 +168,11 @@ class Menu
* *
* @param %Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be * @param %Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be
* @return std::tuple<bool, std::string, std::string> * @return std::tuple<bool, std::string, std::string>
* std::int32_t [0] = Index of the option that was found, -1 if the menu isn't open, or the option wasn't found * std::int32_t [0] = Index of the option that was found, -1 if the option wasn't found
* std::string [1] = Action that was found * std::string [1] = Action that was found
* std::string [2] = Target that was found * std::string [2] = Target that was found
* @see Menu::IndexOf(const std::string& Options) * @see Menu::IndexOf(const std::string& Options)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::tuple<std::int32_t, std::string, std::string> FindOption(const std::vector<std::string>& Options); static std::tuple<std::int32_t, std::string, std::string> FindOption(const std::vector<std::string>& Options);
@ -176,9 +181,10 @@ class Menu
* *
* @param Option %Menu option to look for, the more specific the option, the more accurate the result will be * @param Option %Menu option to look for, the more specific the option, the more accurate the result will be
* @return std::vector<std::tuple<std::int32_t, std::string, std::string>> * @return std::vector<std::tuple<std::int32_t, std::string, std::string>>
* std::int32_t [0] = Index of the option that was found, -1 if the menu isn't open, or the option wasn't found * std::int32_t [0] = Index of the option that was found, -1 if the option wasn't found
* std::string [1] = Action that was found * std::string [1] = Action that was found
* std::string [2] = Target that was found * std::string [2] = Target that was found
* @warning The result can be inaccurate if the menu isn't open before calling this function
* @see Menu::IndexOf(const std::string& Option) * @see Menu::IndexOf(const std::string& Option)
*/ */
static std::vector<std::tuple<std::int32_t, std::string, std::string>> FindOptions(const std::string& Option); static std::vector<std::tuple<std::int32_t, std::string, std::string>> FindOptions(const std::string& Option);
@ -188,10 +194,11 @@ class Menu
* *
* @param %Options %Menu options to look for, if the option is found within the menu options, it'll be added to the result array, the more specific the options, the more accurate the result will be * @param %Options %Menu options to look for, if the option is found within the menu options, it'll be added to the result array, the more specific the options, the more accurate the result will be
* @return std::vector<std::tuple<std::int32_t, std::string, std::string>> * @return std::vector<std::tuple<std::int32_t, std::string, std::string>>
* std::int32_t [0] = Index of the option that was found, -1 if the menu isn't open, or the option wasn't found * std::int32_t [0] = Index of the option that was found, -1 if the option wasn't found
* std::string [1] = Action that was found * std::string [1] = Action that was found
* std::string [2] = Target that was found * std::string [2] = Target that was found
* @see Menu::IndexOf(const std::string& Options) * @see Menu::IndexOf(const std::string& Options)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static std::vector<std::tuple<std::int32_t, std::string, std::string>> FindOptions(const std::vector<std::string>& Options); static std::vector<std::tuple<std::int32_t, std::string, std::string>> FindOptions(const std::vector<std::string>& Options);
@ -202,6 +209,7 @@ class Menu
* @param Option %Menu option to look for, the more specific the option, the more specific the option, the more accurate the result will be * @param Option %Menu option to look for, the more specific the option, the more specific the option, the more accurate the result will be
* @return true if the found index is valid (Index >= 0) * @return true if the found index is valid (Index >= 0)
* @see Menu::IndexOf(const std::string& Option) * @see Menu::IndexOf(const std::string& Option)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static bool Contains(const std::string& Option); static bool Contains(const std::string& Option);
@ -211,6 +219,7 @@ class Menu
* @param %Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be * @param %Options %Menu options to look for, returns on first option found, the more specific the options, the more accurate the result will be
* @return true if the found index is valid (Index >= 0) * @return true if the found index is valid (Index >= 0)
* @see Menu::IndexOf(const std::string& Options) * @see Menu::IndexOf(const std::string& Options)
* @warning The result can be inaccurate if the menu isn't open before calling this function
*/ */
static bool Contains(const std::vector<std::string>& Options); static bool Contains(const std::vector<std::string>& Options);

Binary file not shown.