Yusi Posted May 18, 2023 Posted May 18, 2023 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?
Khaleesi Posted May 18, 2023 Posted May 18, 2023 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 1
Yusi Posted May 18, 2023 Author Posted May 18, 2023 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"); }
Khaleesi Posted May 18, 2023 Posted May 18, 2023 26 minutes ago, Yusi said:  I have made this and its working properly thank you  if (ernestTheChickenQuest != null && ernestTheChickenQuest.isVisible() && ernestTheChickenQuest.getAbsY() > 254 && ernestTheChickenQuest.getAbsY() < 415) { log("koyashScript"); } Nice! 1