authorblues / bizhawk-shuffler-2

A script to randomly shuffle between games played in Bizhawk, with plugins to enhance the experience
MIT License
58 stars 21 forks source link

Introduce a password form parameter. #21

Closed dennisrijsdijk closed 3 years ago

dennisrijsdijk commented 3 years ago

This PR introduces a password form that will visually hide text. Currently, it does NOT prevent using cut and copy shortcuts, and it does not prevent cutting and copying from the context menu.

Currently, the code forms.setproperty(setting, "UseSystemPasswordChar", false) results in a NLua.Exceptions.LuaScriptException: .\shuffler-src\setupform.lua:189: invalid arguments to method call

authorblues commented 3 years ago

The only way that I was able to get this to work was with the "PasswordChar" property instead. Using "UseSystemPasswordChar" at all seems to have the side effect of disallowing the box to be modified in any meaningful way (moving location, hiding, etc), and I think this might just be an issue up the chain somehow -- either with Bizhawk's winforms support or with winforms themselves, who knows.

The feature has nonetheless been added, but using asterisks for the password character rather than whatever your system's default character is.