Autor Tema: input prompt functions  (Leído 2832 veces)

handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • I'm the eye in the sky.
    • dyko designs
input prompt functions
« en: Marzo 28, 2012, 09:16:35 am »
I just thought of something could be usefull addition: console input functions like those from C: scanf(), fscanf() and sscanf(). These functions would be usefull in combination with say(), so that you can have input prompts in console applications without using commandline arguments.

Maybe a "graphical" version for use in combination with the write functions in mod_text is possible too. I know it's possible to make your own textinput function, but it's nicer to have something standard for this.

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12536
  • Karma: 370
Re:input prompt functions
« Respuesta #1 en: Marzo 28, 2012, 01:27:41 pm »
imposible...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • I'm the eye in the sky.
    • dyko designs
Re:input prompt functions
« Respuesta #2 en: Marzo 28, 2012, 02:49:13 pm »
Why would scanf be impossible?  ???

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12536
  • Karma: 370
Re:input prompt functions
« Respuesta #3 en: Marzo 28, 2012, 03:00:03 pm »
this was talk several times.

scanf* are insecure functions... and scanf* are wait functions that will block all system.

bennugd can't be blocked.

and... scanf* need std key input... we can implement a own scanf* that use SDL input, but this functions aren't a good idea.
« última modificación: Marzo 28, 2012, 03:01:52 pm por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • I'm the eye in the sky.
    • dyko designs
Re:input prompt functions
« Respuesta #4 en: Marzo 28, 2012, 03:35:26 pm »
But what about a self made function that's compatible with bennu's design instead using standard C or SDL functions? Or would that be similair to re-inventing the wheel?  :-\ Or is it because of the "semi-parallel" design that makes something like that very complicated?

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12536
  • Karma: 370
Re:input prompt functions
« Respuesta #5 en: Marzo 28, 2012, 04:04:41 pm »
sorry, I don't have plans of add it to bennugd official release.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2