Jump to content

Widget is always visible if its not null


Recommended Posts

Posted

Hello, I want to make the map bigger until the icon that symboling my player on map interface is visible

so the point is even if widget is not visible on main screen osbot dedects it as visible. It works more like != null than isVisible()

even if i use something like this:



randomQuestWidget = Quests.Quest.Doric's_Quest

if (randomQuestWidget != null && randomQuestWidget.isVisible()) {

    randomQuestWidget.hover();
}

 

it hovers the mouse on invisible quest -> https://prnt.sc/ROEan6Kj0oZH

how can i check if a widget actually isVisible or not?

Posted
9 hours ago, Yusi said:

Hello, I want to make the map bigger until the icon that symboling my player on map interface is visible

so the point is even if widget is not visible on main screen osbot dedects it as visible. It works more like != null than isVisible()

even if i use something like this:



randomQuestWidget = Quests.Quest.Doric's_Quest

if (randomQuestWidget != null && randomQuestWidget.isVisible()) {

    randomQuestWidget.hover();
}

 

it hovers the mouse on invisible quest -> https://prnt.sc/ROEan6Kj0oZH

how can i check if a widget actually isVisible or not?

You check the Y coordinate to be in the actual visible rectangle :)

  • Like 1
Posted
44 minutes ago, Khaleesi said:

You check the Y coordinate to be in the actual visible rectangle :)

 

I have made this and its working properly thank you 🙂

 

if (ernestTheChickenQuest != null && ernestTheChickenQuest.isVisible() && ernestTheChickenQuest.getAbsY() > 254 && ernestTheChickenQuest.getAbsY() < 415) {

log("koyashScript");
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...