You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
302B

  1. #pragma once
  2. #include "ui/common.hpp"
  3. #include "ui/TextField.hpp"
  4. namespace rack {
  5. struct PasswordField : TextField {
  6. void draw(NVGcontext *vg) override {
  7. std::string textTmp = text;
  8. text = std::string(textTmp.size(), '*');
  9. TextField::draw(vg);
  10. text = textTmp;
  11. }
  12. };
  13. } // namespace rack