MoreLenses icon indicating copy to clipboard operation
MoreLenses copied to clipboard

Custom Color for Lenses (from CQUI)

Open the-m4a opened this issue 3 years ago • 0 comments

I mentioned in #45 - I had enough requests and personal interest in this kind of thing with CQUI that I wanted to give it a shot. And because it built off of your work with ML, I wanted to also share the changes if you were interested in incorporating that functionality into ML. Pictures/gifs below.

Notes on the Code Changes:

  • By and large this is the same logic that I put into CQUI to do this; anything "CQUI" was renamed to "ML", and I removed references to the custom CQUI Citizen Management lens.
  • The updates to the non-English Text XML are not yet part of this PR. I will add them next time I get the chance to do the work on this, sometime over the next few days.
  • In order to allow the settings code to make some assumptions, I did some renaming of objects so their "COLOR" and "LOC_HUD" names aligned
    • for example: "COLOR_FOO_LENS_BAR" will now always have a "LOC_HUD_FOO_LENS_BAR" counterpart.
  • In spite of many files changed, I tried to keep changes as reasonable as I could.
  • Using the "ignore whitespace" option for at least the ML_Settings.xml, as I had to add some controls and it messes with indenting and whatnot.

Notes on Functionality:

  • The values apply on a per-saved game basis, like most settings of this nature.
  • The "default" button reverts a lens color back to the value found in the Color Settings table
  • The updated colors apply when the panel is closed, updating colors immediately (like when moving the scroll bar for a color) was really slow (at least with CQUI, anyway)
  • Once updated the Key will also update (if opened via the Lenses panel)

Pics / Gifs: image gif gif

the-m4a avatar May 27 '21 07:05 the-m4a