Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Window inactive  (Read 2483 times)

0 Members and 1 Guest are viewing this topic.

plobone

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
    • View Profile
Window inactive
« on: February 05, 2012, 02:40:07 AM »

Hello everyone

I have just made a window with a button inside so every time i press the button the inventory will appear and disappear.I also set up a Keypress event, every time you press the tab key do the same.
Everything works coooolll but...

When I tryed this in a scene that it had several active entities and regions...every time I move the mouse over in those entities or regions the window(with the button inside) somehow disabled or set itself inactive.

If I click with the mouse the button, inventory will appear and disappear, but when I press the tab key wont work because the window is inactive all the time.

Do I need some code so that the window should be active all the time?
Do I miss something in window editor?


if the there is a post with the same problem and I missed it I'm sorry!giveme a link to check it out.
Thank you!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Window inactive
« Reply #1 on: February 05, 2012, 10:03:52 AM »

I recommend handling the tab key in game.script, not in the window's script. The window is not guaranteed to receive keyboard input unless it runs in exclusive mode, which is probably not what you want.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

plobone

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
    • View Profile
Re: Window inactive
« Reply #2 on: February 05, 2012, 03:27:09 PM »

OOooo god!!!!!

Yea I did try to control my inventory with the Tab key from the game.script but it didn't work the first time!
and I though that it wasn't the correct way to do it ....so I read some post here and started to make the window with the button to control it.

But as you said the best way to control the tab key is to put it in the game.script and I try it again.....BUT you don't have to put a second keypress event (I already have one for the Esc button) just in the same keypress event you put the the tad key!!! and it works great!!!

Thank YOUUUUUU Mnemonic!!!
After spending to days just for the inventory button!!!! Lets drinnk a beerrrr  ::beer

 
Logged
 

Page created in 0.04 seconds with 24 queries.