Filtering Parser Input

Started by Pogwizd, Sat 20/03/2021 15:20:48

Previous topic - Next topic

Pogwizd

I feel like this question might have been already asked on the forums, but I am struggling finding the answer to it.

Where I can filter the parser input before it gets displayed in the TextBox? I want to check if the key pressed by the player isn't a letter.

I tried checking the last char from the TextBox in repeatedly_execute_always() and removing it if necessary, but this still shows the letter for a split of a second.

Thanks :)

eri0o

Never used textbox, but have you tried on_key_press event?

Alternatively, is it possible to hide the real textbox and show a label in place so you have more control on how to present the text ?

Crimson Wizard

AFAIK text boxes intercept any key press before it is sent to the script.

Scripting your own text input (e.g. with a Label) may be the only solution. Maybe there are already modules made for this.

Pogwizd

Oh, I see what you guys mean -  I will give it a bash. Thanks for the tip!

SMF spam blocked by CleanTalk