Feature - Implemented The scripts menu has no scroll bar and goes offscreen with 30+ scripts

Ulti

New member
When there's 30+ files in your /scripts directory, the KolMafia's "Scripts" menu displays them all but the ones on the bottom get cut off the screen with no way to click them. There should be a scrolling feature to move up and down or a pagination of some sort, so you can click scripts near the bottom of the menu. Even if you use your keyboard arrows, you might be able to select an off-screen menu item but you wouldn't know which you selected since it never moves onto screen.
 

fronobulax

Developer
When there's 30+ files in your /scripts directory, the KolMafia's "Scripts" menu displays them all but the ones on the bottom get cut off the screen with no way to click them. There should be a scrolling feature to move up and down or a pagination of some sort, so you can click scripts near the bottom of the menu. Even if you use your keyboard arrows, you might be able to select an off-screen menu item but you wouldn't know which you selected since it never moves onto screen.

This is a known issue as of several years ago. My recollection from the time is that the Java construct used to display the list of Scripts did not support any kind of scroll bar. So it would require non-trivial refactoring, understanding that the definition of "non-trivial" may have changed over the years. It was not necessarily a high priority in anyone's mind because setting and using the script MRU option would keep the displayed list trimmed and any script that was not there could be selected using the Load Script menu option.

I seem to recall that another workaround was to organize scripts in sub-directories although that was never my preference. Note that there is a bug report out there because the Script MRU list will not find a file that is in the list and contained in a subdirectory.

Since my hatred for Swing has cooled I will at least look at this next time I'm in the code.
 

xKiv

Active member
Why you no like subdirectories? At least have one for non-runnable libraries, one for your personal scripts, and let anything from svn live away from possible conflicts.
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Fixed in r20712
 
Top