nebularg / Parrot2

Floating Combat Text of Awesomeness
GNU Lesser General Public License v2.1
24 stars 21 forks source link

Increase maximum value for event filters #128

Closed fenyan-16 closed 1 month ago

fenyan-16 commented 1 month ago

What steps will reproduce the problem?

As damage values have been increasing again since TWW, I find myself wanting to increase the filter values for incoming&outgoing damage&healing to decrease spam in my scroll areas.

The maximum value that can be set for a filter is 100.000. This is too low for my needs, because my DPS is so crazy high :) (or rather because of number inflation over the expansions).

What version of Parrot are you using?

Parrot 2.2.5 Retail

Do you have an error log of what happened?

No, but it is easily reproducible by opening the Parrot window and navigating to "Events" -> "Filters" and trying to set them higher than 100.000.

Please provide any additional information below. (example: localization of your client if not enUS or enGB)

fenyan-16 commented 1 month ago

Issue is fixed by changing the following function in Code/CombatEvents.lua:

    function createFilterOption(filterType)
        local localName = filterTypes[filterType]
        events_opt.args.filters.args[filterType] = {
            type = 'range',
            name = localName,
            desc = L["What amount to filter out. Any amount below this will be filtered.\nNote: a value of 0 will mean no filtering takes place."],
            min = 0,
            max = 1000000,
            step = 1000,
            bigStep = 20000,
            get = getAmount,
            set = setAmount,
            arg = filterType
        }
    end

I can't seem to create a PR (or don't know how), so I'll just leave this here. Value for max is the maximum value the filters can be set to, step changes in what steps the value can be changed by typing in the textbox and bigStep sets how granual the slider is.

nebularg commented 1 month ago

Thanks, bumped it up