Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Question about LeftRelease event  (Read 2828 times)

0 Members and 1 Guest are viewing this topic.

PlushDez

  • Obey Plush Fuhrer!
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 13
  • Plush will rules the world...
    • View Profile
    • Plush Attack!
Question about LeftRelease event
« on: September 10, 2007, 03:25:00 PM »

Is it normal for WME to handle "LeftRelease" event on window only when window in SystemExclusive mode? If my window not in SystemExclusive mode "LeftRelease" event doesn't work  :( ???
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Question about LeftRelease event
« Reply #1 on: September 10, 2007, 03:46:35 PM »

No, it's not normal. Can you post your script and/or more info?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

PlushDez

  • Obey Plush Fuhrer!
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 13
  • Plush will rules the world...
    • View Profile
    • Plush Attack!
Re: Question about LeftRelease event
« Reply #2 on: September 10, 2007, 03:59:06 PM »

It's not my script :) it's WME_Demo (1.7.003)

I only add this small code to game.script

Code: WME Script
  1. on "LeftRelease"
  2. {
  3. Game.Msg("LF RELEASE ON GAME!");
  4. }
  5.  

and this one to mainmenu.script

Code: WME Script
  1. on "LeftRelease"
  2. {
  3.  Game.Msg("LF RELEASE ON WINDOW!");
  4. }
  5.  

Now I get "LF RELEASE ON WINDOW" message only when this window in SystemExclusive, when not I get "LF RELEASE ON GAME!"
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Question about LeftRelease event
« Reply #3 on: September 10, 2007, 09:03:03 PM »

Yup, because if a window runs in system exclusive mode, the game.script it suspended, so the window gets the event.
If you want the window to always receive the event, simply reroute it from game.script by adding something like this (to game.script):

Code: WME Script
  1. on "LeftRelease"
  2. {
  3.   var ActObj = Game.ActiveObject;
  4.   if(ActObj != null) ActObj.ApplyEvent("LeftRelease");
  5. }
  6.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

PlushDez

  • Obey Plush Fuhrer!
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 13
  • Plush will rules the world...
    • View Profile
    • Plush Attack!
Re: Question about LeftRelease event
« Reply #4 on: September 11, 2007, 12:10:29 AM »

 ;)Thanx
Logged
 

Page created in 0.044 seconds with 20 queries.