Re: MiracleGrowLight
Posted: Fri Mar 19, 2021 6:16 pm
AUTO harvesting would be amazing! any chance?
Warhammer Online
https://www.returnofreckoning.com/forum/
https://www.returnofreckoning.com/forum/viewtopic.php?t=44026
have yet to see how this works without causing lag, so for now no
Code: Select all
local anchor = { Point = "topleft", RelativeTo = "MiracleGrowLight", RelativePoint = "topright", XOffset = -10, YOffset = 0 }
Will try to figure out how to do that automatically - just haven't found a way yet. Could otherwise add a toggle, so you don't need to change the code, just a variable in SavedVariablesAnnihilate wrote: Sat Mar 20, 2021 10:26 am I made the tooltip alighn to the left side so it will display and extend to the left, because I have MGL placed on the right side of my screen. Otherwise the tooltip overlaps the main window.
In MiracleGrowLight.lua line 57
Code: Select all
local anchor = { Point = "topleft", RelativeTo = "MiracleGrowLight", RelativePoint = "topright", XOffset = -10, YOffset = 0 }
Couldn't you take either the middle of the screen, or another frame (like Soloq window) for an anchor which is centered as default and check for MGL if relative x offset is - or + to decide if the tooltip will be placed left or right automatically?Idrinth wrote: Sat Mar 20, 2021 8:25 pmWill try to figure out how to do that automatically - just haven't found a way yet. Could otherwise add a toggle, so you don't need to change the code, just a variable in SavedVariablesSpoiler:
I don't usually work with lua or addons, so I'm still learningAnnihilate wrote: Sat Mar 20, 2021 9:34 pmCouldn't you take either the middle of the screen, or another frame (like Soloq window) for an anchor which is centered as default and check for MGL if relative x offset is - or + to decide if the tooltip will be placed left or right automatically?Idrinth wrote: Sat Mar 20, 2021 8:25 pmWill try to figure out how to do that automatically - just haven't found a way yet. Could otherwise add a toggle, so you don't need to change the code, just a variable in SavedVariablesSpoiler:
For a start a toggle would be awesome, too.![]()
Me neither. Anyhow I am eager to learn.Idrinth wrote: Sat Mar 20, 2021 9:55 pmI don't usually work with lua or addons, so I'm still learningSpoiler:most things are not easy yet
Code: Select all
local wgsp = WindowGetScreenPosition
WindowGetScreenPosition = function(window)
if DoesWindowExist(window) then
return wgsp(window)
else
d("Failed to get screen position of "..window)
return 0,0,0,0
end
end
ok, code for checking is the following, it's in 1.3.2:Annihilate wrote: Sat Mar 20, 2021 9:34 pmCouldn't you take either the middle of the screen, or another frame (like Soloq window) for an anchor which is centered as default and check for MGL if relative x offset is - or + to decide if the tooltip will be placed left or right automatically?Idrinth wrote: Sat Mar 20, 2021 8:25 pmWill try to figure out how to do that automatically - just haven't found a way yet. Could otherwise add a toggle, so you don't need to change the code, just a variable in SavedVariablesSpoiler:
For a start a toggle would be awesome, too.![]()
Code: Select all
local rootWidth,rootHeight = WindowGetDimensions("Root")
local mglX,mglY = WindowGetScreenPosition(windowName)
local anchor = nil
if mglX*2 > rootWidth then
anchor = { Point = "topleft", RelativeTo = windowName, RelativePoint = "topright", XOffset = -10, YOffset = 0 }
else
anchor = { Point = "topright", RelativeTo = windowName, RelativePoint = "topleft", XOffset = 10, YOffset = 0 }
end