Skip to content

Conversation

@myplmy
Copy link

@myplmy myplmy commented Aug 20, 2025

Short and concise description about my pull request:

modmanger_thumb
  • Add a search box for filtering the displayed list to the top-left corner of the mod manager dialog. [video demonstration]
  • As part of the implementation, several methods were modified in the RT_Dialog_ListingWithTuple class.
  • Note: This change currently only affects the mod manager dialog, but confirmed compatible with the event manager dialog. [video demonstration]

TODOs:

  • - I confirm this PR is at its final form and will not receive more pushes to it unless modifications are required.
  • - I confirm this PR has been previously tested by me and has no apparent issues.
  • - I confirm this PR is complying with this project's Contribution Guidelines.
  • - I confirm this PR is complying with this project's Syntax Ruleset.

Longer / More informative description about what my pull request does:

RT_Dialog_ListingWithTuple.cs

  • New Feature: Search box for filtering keys
    • RT_Dialog_ListingWithTuple() accepts a new optional argument: bool searchBoxEnabled (default: false).
      If searchBoxEnabled is true, a search box will show in the top-left corner of the dialog.
    • Modified most methods related to dialog drawing (e.g., DoWindowContents(), FillMainRect()) for filtering displayed keys
    • Compatible with the event manager, but excluded from this PR.
  • New Method: SetDisplayVariables()
    • This method updates display arrays (e.g., 'displayKeys', 'displayKeyOrgIndex') based on the search box input.
      If the search box is empty, it mirrors the 'Keys' array and its original indices.
      Otherwise, it sets them to the values filtered by the searchBoxInput
  • Minor refactoring: Rename some variables, add comments, consolidate loops.

ModManager.cs

  • Modified the code to call RT_Dialog_ListingWithTuple() with searchBoxEnabled = true.

myplmy added 3 commits August 17, 2025 03:49
RT_Dialog_ListingWithTuple.cs
 * add new feature : SearchBoxUI
   - now RT_Dialog_ListingWithTuple() has new argument: bool searchBoxEnabled (default value: false)
   - Add 5 properties to RT_Dialog_ListingWithTuple Class
   - Most of the methods that affect dialog drawing have been modified. ( DoWindowContents(), FillMainRect(), DrawCustomRow(), ShowFloatMenu() )
 * Add new method : SetDisplayVariables()
   -  This refreshes the arrays (displayKeys, displayValueString, displayKeysOrgIndex) that control displayed rows based on the results from the search box.

ModManager.cs
 * Modified the code to call RT_Dialog_ListingWithTuple() with searchBoxEnabled = true.
RT_Dialog_ListingWithTuple.cs
 * Delete unused variable : displayValues
    - There's no reason to use (yet)
 * Add comments for detailed description
 * Set max length of search box's input to constant value : SEARCHBOXINPUTMAXLENGTH
 * Change variable name : height -> viewRectHeight
RT_Dialog_ListingWithTuple.cs
 * Refactor initialization of ValueString, ValueInt, and displayKeysOrgIndex in RT_Dialog_ListingWithTuple()
 * Remove namespace : Shared.CommonEnumerators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant