Edit Box Issue

For questions about using Classic.

Post » Mon Nov 15, 2010 7:51 am

I'm using an edit box as part of an inventory function tht takes input from a player. Space bar is used to open and close the inventory. If I set focus on the edit box it works great. However, if i later set focus off (using the action) or disable (again with an action) the edit box, although those functions work, spacebar no longer opens or closes the inventory. It is clear that the edit box is still intercepting the keypresses because if i set it to read only or don't disable / defocus it spacebar will work correctly). Any way to get around this?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Mon Nov 15, 2010 6:41 pm

Another issue relating to the edit box is the system 'ding' sound it makes when hitting enter after inputting a value. Any way to turn that off? Any alternatives to using edit boxes for users to input inventory-related numbers (e.g. such as inputting a number for how many items from a stack of 30 items to pick up and place in a 'quick use' slot) ?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Mon Nov 15, 2010 9:43 pm

As an alternate to the editbox you can input numbers with the mouse&keyboard plugin.
Here an example to give you some ideas. It shows two methods that do the same thing.

[url:1r6ww50d]http://dl.dropbox.com/u/5426011/examples3/NumberInput2.cap[/url:1r6ww50d]
made in 0.99.96
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Tue Nov 16, 2010 1:15 am

Hmm that seems like it could work. It has a downside of lacking a blinking cursor, any way to implement that? If not something easy to do, i couldalternatively put a border around to highlight it when in 'focus'.

Thanks!
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Tue Nov 16, 2010 11:41 am

A blinking cursor is pretty easy. Here's an older example that I had kicking around:
[url:2zcdch0x]http://dl.dropbox.com/u/5426011/examples/NumberInput.cap[/url:2zcdch0x]
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Tue Nov 16, 2010 12:06 pm

I've had similar problem with cursor when doing my program. Here's the link:
viewtopic.php?f=4&t=7188&p=56200&hilit=mincovka#p56200
Silent Cacophony and R0J0hound helped me a lot, so if you use it you should give them the credit
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Tue Nov 16, 2010 4:03 pm

Brilliantly simple solution R0J0hound, thanks! Since this is in an invetory which sets timescale to 0 I'll need to be a bit careful about my specific implementation but this idea will work :) (or is timer unaffected by timescale? cant test now since I'm at work)
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests