StingerTopGun / ContractHUD

Farming Simulator 2022 Mod - Helpful small HUD displaying the current completion percentage of all active contracts
4 stars 7 forks source link

[Feature Request] User definable contract sort order #6

Open daFreeMan opened 2 years ago

daFreeMan commented 2 years ago

Found this mod a little while ago and I'm loving it!

Unfortunately, it can be difficult to find the fields that are currently being worked when there is a large list of contracts: image

Even with the bar graphs turned on, the difference between the | symbol showing completion and the : filling the space is subtle and can still be difficult to identify: image

It often takes shifting the view around to find a contrasting background color (as I've done here) to make it easier to see, and even then it can be difficult.

I would love to see an option (even if I have to edit the XML file to set it, instead of having an entry in the GUI config settings somewhere - just so long as there's a way to reload the config.XML in game), to be able to define the contract sort order. As it stands, I think it sorts them in the order they were accepted, but I'd like to be able to sort them by a couple of different options:

  1. Default sort order (whatever that currently is)
  2. By field number
  3. By completion percentage
  4. By sort current sort order in the contracts display
    1. I also have BetterContracts installed and it allows 3 different sort orders for contracts, if you could tie into this and sort the HUD in the same order, that would be fantastic.
    2. I realize that you might not be able to read that data to follow that sort order and that it would take hooking further into that mod to identify when the sort order is changed in BetterContracts so you can change it here.
    3. This would be a major bonus option and I realize that it might never happen, but while I'm putting together a wish list... ;)
daFreeMan commented 2 years ago

Alternatively, simply coloring the active contracts blue might make things a bit easier:

                -- handle color and completion
                if contract.status == 2 and contract.success == true then  -- contract finished, set completion to 100% and text green
                    completion = 1
                    textColor = 6  -- green
                elseif contract.status == 2 and contract.success == false then  -- contract failed
                    completion = contract.completion
                    textColor = 5  -- red
                else  -- contract active, get current completion and set text white if not yet started, blue if in progress
                    completion = contract.completion
-- adding this option:
            if completion > 0   -- contract in progress 
            textColor = 4   -- blue
            else    -- contract not yet started
            textColor = 1  -- white
            end
                end