Suggestion: an (input-text:) macro for <input type="text" />, in an alternative to (input-box:) and <textarea></textarea>
Hello. First of all, great job for version 3.2 of Harlowe. Having more input options was something I was waiting with anticipation. I have a suggestion/proposal, regarding one of the new macros: (input-box:) because, while useful, it has a little oversight.
(input-box:)
creates a <textarea>
element. Textarea is not exactly the same as an <input type="text">
, and I prefer using inputs because the aspect (a single row input) fits its use in the story better. For instance: inputting a name, mimicking a computer's login screen, etc. It would also be easier to place wherever you want in the page.
I propose creating a macro called (input-text:)
. This macro would take the following arguments:
(input-text: [Bind] val, [Number] size, [Number] maxlength, [String] default)
-
val
: the variable binded to the text -
size
: the value of the input's "size" attribute (<input type="text" />
behaves like "normal" text and only needs 1 dimension) -
maxlength
: the value of the input's "maxlength" attribute, useful if you want to keep some inputs at a reasonable size, such as names -
default
: the value of the inputd's "placeholder" attribute, the default content of the box