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: Windows and z-order  (Read 4773 times)

0 Members and 1 Guest are viewing this topic.

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Windows and z-order
« on: June 29, 2007, 10:59:35 AM »

Hello! I have very simple question ;D

Code: WME Script
  1. var note=Game.LoadWindow("windows\notebook\notebook.window");
  2. var tool=Game.LoadWindow("windows\toolbar\toolbar.window");

note window is fullscreen, while tool one is in corner. Player have access to these windows - he can click on note or tool control elements.

But when player clicks on note window, tool window suddenly :( becomes inaccessable. As I understand tool window moves after note one in z-order ??? How can I restore original state: both note and tool windows are accessible?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Windows and z-order
« Reply #1 on: June 29, 2007, 11:48:40 AM »

tool.Focus() should bring the window to foreground.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: Windows and z-order
« Reply #2 on: July 02, 2007, 09:24:54 AM »

Well, I tried it first time, but it didn't worked :-\

So, I modify an original wme 3d demo project to show the trouble (links have been removed). Player can click on the icon to show and hide the full-screen window. After the window with back.png image was clicked, the icon become unaccessable.

Scripts:
  • entities\toolbar\scr\on.script
  • scenes\items\notebook\scr\notebook.script
  • scripts\game_daemon.script
« Last Edit: July 03, 2007, 07:54:30 AM by mRax »
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Windows and z-order
« Reply #3 on: July 02, 2007, 09:59:11 AM »

OOPS. wrong. Will look some more.
« Last Edit: July 02, 2007, 10:03:10 AM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Windows and z-order
« Reply #4 on: July 02, 2007, 10:08:35 AM »

Got it. Add

IN_GAME = TRUE

to your notebook.window file.

Hope that helps.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: Windows and z-order
« Reply #5 on: July 02, 2007, 11:12:32 AM »

IN_GAME = TRUE

Thanks!! Now project is worked properly :D

But can you help me once more time, saying why window .InGame property solves that problem? :o In the documentation I find next information

Quote
InGame -- Specifies whether this is an "in-game" type window (it's always displayed before the inventory window)

and don't see any accordings to window .Focus() method ability ::)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Windows and z-order
« Reply #6 on: July 02, 2007, 06:10:46 PM »

In-game windows are always painted before non-in-game windows.

I'd like to mention though, that the above behaviour is by design. As you click a window, it becomes a foreground window. If the window covers the entire screen, it natually obstructs all the other windows. You might for example load the smaller window as a sub-window of the large one to prevent this.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mRax

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 55
    • View Profile
Re: Windows and z-order
« Reply #7 on: July 03, 2007, 07:56:11 AM »

I see :) Thanks all of you.
Logged
 

Page created in 0.061 seconds with 25 queries.