arkinventory icon indicating copy to clipboard operation
arkinventory copied to clipboard

[Feature Request] "New Item Glow: Reset" in Refresh-Rightclick-Menu if Enabled

Open fubaWoW opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. No Error! It is just a Feature Request with a possible solution.

Describe the solution you'd like Already did "my own" but not Localized code changes :D

I added the following Code in your ArkInventoryMenu.lua above the "New Item: Reset" Line:

if ArkInventory.db.option.newitemglow.enable then
	ArkInventory.Lib.Dewdrop:AddLine(
		"text", string.format( "%s: %s", ArkInventory.Localise["NEW_ITEM_GLOW"], ArkInventory.Localise["RESET"] ),
		"tooltipTitle", ArkInventory.Localise["CONFIG_DESIGN_ITEM_OVERRIDE_NEW_GLOW_RESET_DESC"],
		"closeWhenClicked", true,
		"func", function( )
			for bag_id in pairs( ArkInventory.Global.Location[loc_id].Bags ) do
				local blizzard_id = ArkInventory.InternalIdToBlizzardBagId( loc_id, bag_id )
				for slot_id = 1, ArkInventory.Global.Location[loc_id].maxSlot[bag_id] or 0 do
					if C_NewItems.IsNewItem( blizzard_id, slot_id ) then
						C_NewItems.RemoveNewItem( blizzard_id, slot_id )
						local objname, obj = ArkInventory.ContainerItemNameGet( loc_id, bag_id, slot_id )
						ArkInventory.Frame_Item_Update_New( obj, nil, true )
					end
				end
			end
		end
	)
	
	ArkInventory.Lib.Dewdrop:AddLine( )
end

and in your enUS.lua i've just added:

L["CONFIG_DESIGN_ITEM_OVERRIDE_NEW_GLOW_RESET_DESC"] = "reset the new item glow"

at line 549, so it's not translated to all languages right now!

Currently it looks like this for me: image

maybe you can add this if you have spare time? thanks!

fubaWoW avatar Dec 27 '22 13:12 fubaWoW

just in case, you know theres a config option to clear them every time you close the bag?

arkayenro avatar Jan 03 '23 02:01 arkayenro

just in case, you know theres a config option to clear them every time you close the bag?

yeah but i don't like it tbh ^^

fubaWoW avatar Jan 03 '23 02:01 fubaWoW

will be in the next release

arkayenro avatar Jan 03 '23 03:01 arkayenro

will be in the next release thanks, no pressure for this ;)

fubaWoW avatar Jan 03 '23 05:01 fubaWoW