Jump to content

Widget is always visible if its not null


Yusi

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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");
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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