iutils: doModifiedAction() function added to allow for queueing modified/one click menu actions

This commit is contained in:
illumineawake 2020-11-05 23:38:24 +11:00
parent d96afd5078
commit ff885aa76d
15 changed files with 17 additions and 3 deletions

View File

@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
version = "1.7.0"
version = "1.8.0"
project.extra["PluginName"] = "iUtils"
project.extra["PluginDescription"] = "Illumine - Utils required for plugins to function with added automation"

View File

@ -169,7 +169,6 @@ public class iUtils extends Plugin {
public void doActionMsTime(MenuEntry entry, Point point, int timeToDelay)
{
Runnable runnable = () -> {
menu.setEntry(entry);
mouse.handleMouseClick(point);
@ -178,6 +177,22 @@ public class iUtils extends Plugin {
action.delayTime(timeToDelay, runnable);
}
public void doModifiedActionMsTime(MenuEntry entry, int modifiedID, int modifiedIndex, int modifiedOpcode, Rectangle rect, int timeToDelay)
{
Point point = mouse.getClickPoint(rect);
doModifiedActionMsTime(entry, modifiedID, modifiedIndex, modifiedOpcode, point, timeToDelay);
}
public void doModifiedActionMsTime(MenuEntry entry, int modifiedID, int modifiedIndex, int modifiedOpcode, Point point, int timeToDelay)
{
Runnable runnable = () -> {
menu.setModifiedEntry(entry, modifiedID, modifiedIndex, modifiedOpcode);
mouse.handleMouseClick(point);
};
action.delayTime(timeToDelay, runnable);
}
public void oneClickCastSpell(WidgetInfo spellWidget, MenuEntry targetMenu, long sleepLength) {
menu.setEntry(targetMenu, true);
mouse.delayMouseClick(new Rectangle(0, 0, 100, 100), sleepLength);

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.