beryx / text-io

A library for creating interactive console applications in Java
http://text-io.beryx.org/
Apache License 2.0
342 stars 45 forks source link

How to change the prompt for a EnumInputReader? #47

Open fe-sak opened 2 months ago

fe-sak commented 2 months ago
  private static Operacao escolherUmaOperacao() {
      return IO.getTextIO().newEnumInputReader(Operacao.class)
              .withInvalidIndexErrorMessagesProvider((s, s1, i, i1) ->
                      Collections.singletonList("Opção inválida. Digite um número de " + i + " até " + i1))
              .withValueFormatter(Operacao::getNome)
              .read("Escolha uma operação: ");
  }

I'd like to change this text right here: image

I've tried accessing the method printPrompt which is inherited from org.beryx.textio.InputReader but it cannot be accessed.

3.4.1 version is installed