View Single Post
Old 03-12-10, 01:54 AM   #75
maerean_m
Captain
 
Join Date: Mar 2007
Location: Bucharest, Romania
Posts: 529
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith
Quote:
Originally Posted by maerean_m
You haven't created the Page TDC.py . That file translates in the module the error is talking about.

And yes, there is a glitch in the Matrix. The script for menu pages are initialized when they are made visible for the first time. So you won't catch the first PageActivated. The solution is to call Menu_PageActivated( PageUZO ) as the last line in InitializeScript.
thanks maerean_m. I got it working now! I hadn't created a Page TDC.py like you said. Now how do I give the imported page a higher Z order priority (I want it on top of everything in the page that imported it)? Since I imported it does it fall under the hierarchy of the page that imported it (i.e. Page UZO imports Page TDC...does heirarchy look like this: PageUZO_PageTDC_XXXX?
The import keyword in python only imports the Globals from that script into your script so you can call those globals by their name. It has nothing to do with anything else.

The Z order is the one from the tree you see in the menu editor. If you want to bring a page closer to the player, drag it down in that tree. The Z order is saved in data\Menu\Pages\menu_1024_768.ini (so you include that file too in your mod).

The menu items also have methods for the z-order: MakeSureIsBehindOfZOrder, MakeSureInFrontOfZOrder, SendToBackZOrder and BringToFrontZOrder. BringToFrontZOrder must NOT be used on menu pages (will cause BIG bugs).

Mihai
__________________
Kilroy was here
maerean_m is offline   Reply With Quote