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
User avatar
Annihilate
Posts: 16

Re: MiracleGrowLight

Post#31 » Sun Mar 21, 2021 2:16 pm

Idrinth wrote: 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.
Spoiler:

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
Yes, that helped. Thanks! I made it switch sides automatically, but it does not take the offset values. Still gotta figure out what is causing this.

[EDIT] Nope, can't get the offsets working since I have no idea what the return value of wgsp is so I could "if" for it. But the autoswitching sides is working with the following change starting from line 57:

Code: Select all

	--local anchor = { Point = "topright",  RelativeTo = "MiracleGrowLight", RelativePoint = "topleft",   XOffset = 10, YOffset = 0 }
	local wgsp = WindowGetScreenPosition;
	WindowGetScreenPosition = function(windowName)
		if DoesWindowExist(windowName) then
			return wgsp(windowName)
		else
			d("Failed to get screen position of "..windowName)
			return 0,0,0,0
		end
	end
	Tooltips.AnchorTooltip( anchor )
Last edited by Annihilate on Sun Mar 21, 2021 3:43 pm, edited 1 time in total.

Ads
User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#32 » Sun Mar 21, 2021 2:43 pm

Annihilate wrote: Sun Mar 21, 2021 2:16 pm Yes, that helped. Thanks! I made it switch sides automatically, but it does not take the offset values. Still gotta figure out what is causing this.
have a look at the code in 1.3.2, maybe that helps :)
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#33 » Sun Mar 21, 2021 3:46 pm

Idrinth wrote: Sun Mar 21, 2021 1:14 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
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
  
Oh yeah. That is much better. :D Thank you!

[EDIT] Maybe it's time to update the OP.

User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#34 » Wed Mar 24, 2021 2:01 am

With 1.3.3 the addon is no longer trying to plant while you are dead(at 0 hp)
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#35 » Wed Mar 24, 2021 9:38 am

Idrinth wrote: Wed Mar 24, 2021 2:01 am With 1.3.3 the addon is no longer trying to plant while you are dead(at 0 hp)
Thanks!

User avatar
Sybreal
Posts: 40

Re: MiracleGrowLight

Post#36 » Mon Apr 19, 2021 3:30 am

Will this cause the same buildup of lag as MGR?

User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#37 » Mon Apr 19, 2021 9:42 am

Did everything possible to prevent this, so should not @Sybreal :)
Addons&more Addon News&Creation&Testing Addon News Blog
  • Idrinth - Swordmaster
  • Alitsa - Knight of the Blazing Sun
  • Alitza - Warrior Priestess
  • Idrynth - Disciple of Khaine

yvandureve02200
Posts: 11

Re: MiracleGrowLight

Post#38 » Tue Apr 20, 2021 9:53 am

Hi, first, ty for this great work !

An auto gather function can be amazing, either if it make some lag, maybe you can make one we can "ON / OFF" as we like.

Ads
User avatar
Idrinth
Addon Developer
Posts: 665
Contact:

Re: MiracleGrowLight

Post#39 » Thu Apr 22, 2021 9:51 am

With 1.3.4 there is a fix to liniment seed selection, that fixes some rare errors when sorting seeds randomly.
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
Opeteh
Posts: 41

Re: MiracleGrowLight

Post#40 » Thu Apr 22, 2021 7:59 pm

Is it possible to turn on the sound when seed is ready to be harvested the same way as with normal MGR?
Opeteh (87 zealot) / Ovvi (80 Witch Elf)

Who is online

Users browsing this forum: No registered users and 13 guests