Recent Topics

Ads

MiracleGrowLight

Here you can post addons, or anything related to addons.
Forum rules
Before posting on this forum, be sure to read the Terms of Use
Krima
Posts: 602

Re: MiracleGrowLight

Post#21 » Fri Mar 19, 2021 6:16 pm

AUTO harvesting would be amazing! any chance?
Krima - WE RR 87
Carnage :ugeek:

Ads
User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#22 » Fri Mar 19, 2021 7:19 pm

Krima wrote: Fri Mar 19, 2021 6:16 pm AUTO harvesting would be amazing! any chance?
have yet to see how this works without causing lag, so for now no
Addons&more Addon News&Creation&Testing Addon News Blog
  • Idrinth - Swordmaster
  • Alitsa - Knight of the Blazing Sun
  • Alitza - Warrior Priestess
  • Idrynth - Disciple of Khaine

User avatar
Annihilate
Posts: 16

Re: MiracleGrowLight

Post#23 » 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 }

User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#24 » Sat Mar 20, 2021 8:25 pm

Annihilate 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 }
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 SavedVariables
Addons&more Addon News&Creation&Testing Addon News Blog
  • Idrinth - Swordmaster
  • Alitsa - Knight of the Blazing Sun
  • Alitza - Warrior Priestess
  • Idrynth - Disciple of Khaine

User avatar
Annihilate
Posts: 16

Re: MiracleGrowLight

Post#25 » Sat Mar 20, 2021 9:34 pm

Idrinth wrote: Sat Mar 20, 2021 8:25 pm
Spoiler:
Annihilate 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 }
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 SavedVariables
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?

For a start a toggle would be awesome, too. :D

User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#26 » Sat Mar 20, 2021 9:55 pm

Annihilate wrote: Sat Mar 20, 2021 9:34 pm
Idrinth wrote: Sat Mar 20, 2021 8:25 pm
Spoiler:
Annihilate 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 }
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 SavedVariables
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?

For a start a toggle would be awesome, too. :D
I don't usually work with lua or addons, so I'm still learning ;) most things are not easy yet
Addons&more Addon News&Creation&Testing Addon News Blog
  • Idrinth - Swordmaster
  • Alitsa - Knight of the Blazing Sun
  • Alitza - Warrior Priestess
  • Idrynth - Disciple of Khaine

User avatar
totaljazz
Posts: 26

Re: MiracleGrowLight

Post#27 » Sun Mar 21, 2021 8:30 am

Haven't used it long enough yet, but at first glance, it works great, just the way I wished. Thank you so much!

User avatar
Annihilate
Posts: 16

Re: MiracleGrowLight

Post#28 » Sun Mar 21, 2021 10:50 am

Idrinth wrote: Sat Mar 20, 2021 9:55 pm
Spoiler:
Annihilate wrote: Sat Mar 20, 2021 9:34 pm
Idrinth wrote: Sat Mar 20, 2021 8:25 pm
Spoiler:
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 SavedVariables
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?

For a start a toggle would be awesome, too. :D
I don't usually work with lua or addons, so I'm still learning ;) most things are not easy yet
Me neither. Anyhow I am eager to learn. :)

Currently I'm trying to figure out how TidyRoll does the tooltip positioning. Because it does exactly what the tooltip in backpack does, too. Move backpack to the left side relative to center screen, then tooltip shows on the right side. If backpack is moved to the right side, then item tooltip is shown on the left side.

Do you know if the creator of TidyRoll is still available somehow? It's kinda hard to reverse engineer if you have no idea where to start looking.

Ads
User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#29 » Sun Mar 21, 2021 12:34 pm

while making some core functions more careful about accessing none existant windons I found WindowGetScreenPosition - that should help.

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
Addons&more Addon News&Creation&Testing Addon News Blog
  • Idrinth - Swordmaster
  • Alitsa - Knight of the Blazing Sun
  • Alitza - Warrior Priestess
  • Idrynth - Disciple of Khaine

User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#30 » Sun Mar 21, 2021 1:14 pm

Annihilate wrote: Sat Mar 20, 2021 9:34 pm
Idrinth wrote: Sat Mar 20, 2021 8:25 pm
Spoiler:
Annihilate 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 }
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 SavedVariables
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?

For a start a toggle would be awesome, too. :D
ok, code for checking is the following, it's in 1.3.2:

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
  
Addons&more Addon News&Creation&Testing Addon News Blog
  • Idrinth - Swordmaster
  • Alitsa - Knight of the Blazing Sun
  • Alitza - Warrior Priestess
  • Idrynth - Disciple of Khaine

Who is online

Users browsing this forum: No registered users and 10 guests