Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
What i need:
i need to type number in textbox object but typed number cannot be greater than 99 or not less than 0
(i use advanced textbox object)
how i should create events to block typing text (numbers) than two characters?
Here's one way. Under the on changed event check all the inputted characters and only keep the digits, then only keep the first two.
https://dl.dropboxusercontent.com/u/542 ... input.capx
Develop games in your browser. Powerful, performant & highly capable.
Thats p[erfect also first time i see 'len' expression
> Here's one way. Under the on changed event check all the inputted characters and only keep the digits, then only keep the first two.
> https://dl.dropboxusercontent.com/u/542 ... input.capx
R0J0hound how i can make condition,
when textboxs is finished editing do something
It depends on how you specify when editing is done.
If it's when nothing has been inputted for some timeframe then you can do that with a timer. You start or restart the timer when the "on text changed" trigger is run. A possible implementation could be:
global number myTimer=-1
on text changed
--- set myTimer to 60
--- subtract 1 from my timer
myTimer = 0
--- do something[/code:ii7dlbgo]
Another idea is to do stuff when the TextBox no longer has focus. That could be when you click and the mouse is no longer over the TextBox or something.
There are probably other ways. The simplest would be to just have a button to do something.