SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 06-17-13, 03:02 PM   #1
divingbluefrog
Medic
 
Join Date: Jan 2006
Posts: 164
Downloads: 63
Uploads: 1
Default [TEC]linking Pages files

I need some help from the UI's gurus...
I don't figure, neither find any hint in the various threads about menu_1024_768, how a clickable zone, or button, in a given page xxx.ini file can load another page.
It's done everywhere, but no clue about the "how". And I don't believe in magic...
divingbluefrog is offline   Reply With Quote
Old 06-17-13, 04:12 PM   #2
SkyBaron
Lieutenant
 
Join Date: Mar 2010
Location: South Atlantic
Posts: 262
Downloads: 673
Uploads: 2
Default

I implemented my Enigma simulator based on these two threads:

http://www.subsim.com/radioroom/showthread.php?t=163118

http://www.subsim.com/radioroom/showthread.php?t=165968

...and of course some previous programming knowledge.

Hope this helps!
__________________


SkyBaron is offline   Reply With Quote
Old 06-18-13, 02:07 AM   #3
divingbluefrog
Medic
 
Join Date: Jan 2006
Posts: 164
Downloads: 63
Uploads: 1
Default

Thanks SkyBaron, unfortunately I've already read those and many others without finding the answer.
Perhaps should I have been more precise in my question.
Take this as an example :


This is a view of the Page Crew.ini displayed in game.
When you click on the text "torpedo", which is in fact a button, the game loads the Page Guns.ini where this tab is discribed.
But, in Page Crew.ini, the only reference to this button is :

[G61 I6]
Name=TorpedoBtn
Type=1032;Button
ItemID=0x61040008
ParentID=0x61040000
Pos=613,-28,296,34
Zone= 663 693 296 34 2 1 0x6104000C 0.5 -0.5 0x61040008 -0.5 0.5 0 0
StyleSheetNames=GrayTabButton
Materials=4
Display=0;No stretch
Font=30
Text=6411
TextFlags=0x5
StatesColors=0xEDBF72FF, 0x747474FF, 0xE0E0E0FF, 0xEDBF72FF

And that's all! Where is the link? How the game knows to load the Page Guns.ini and not the UZO page? It doesn't come from the associated .py files as they are empty.
ParentID=0x61040000 is nothing more than the menu group that describes the page layout.

EDIT :I think it could only be related to menu.txt, the capital letters entries must be harcoded somewhere. Must practice some tests to validate....

Last edited by divingbluefrog; 06-18-13 at 02:56 AM.
divingbluefrog is offline   Reply With Quote
Old 06-18-13, 07:45 AM   #4
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,451
Downloads: 166
Uploads: 28


Default

Are you using the menu editor to check

__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 06-18-13, 08:25 AM   #5
divingbluefrog
Medic
 
Join Date: Jan 2006
Posts: 164
Downloads: 63
Uploads: 1
Default

Yes I do. And I'm almost sure now that it's done via the text entry :
when a clickable zone, or a button is referenced with a text=x line in the Page file,
and it's displayed as string : [x]UPPERCASE in the Item Text zone (last one) of
the menu Editor, it's in fact a call to the Page xyz.ini file.
I think that the link between UPPERCASE name and xyz name is harcoded somewhere, cause I can't find a file giving it.

But there is another feature that bothers me now (I know, the more you learn, the more you discover the extent of your ignorance).
Let me prepare a clear explanation and I will post it soon.

Last edited by divingbluefrog; 06-18-13 at 01:54 PM.
divingbluefrog is offline   Reply With Quote
Old 06-18-13, 08:50 AM   #6
divingbluefrog
Medic
 
Join Date: Jan 2006
Posts: 164
Downloads: 63
Uploads: 1
Default



In various items description you find a line text=1, which is reported as String : [0001]GO TO GAME in the Item text display.
And of course, when the game is running, it displays the proper name.
And the question is the same as the previous one : How?
divingbluefrog is offline   Reply With Quote
Old 06-23-13, 11:58 AM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by divingbluefrog View Post
I need some help from the UI's gurus...
I don't figure, neither find any hint in the various threads about menu_1024_768, how a clickable zone, or button, in a given page xxx.ini file can load another page.
It's done everywhere, but no clue about the "how". And I don't believe in magic...
Take a big picture look at the problem you are having and you will realize the error in your thinking. A page is never loaded by a button click. Almost all the pages are loaded at game start. To load a page that isn't integral to the game you have to tell the game to load it (using ScriptManagerManaged.MakeSureIsLoaded). What else can make a page hide/show (think big picture - hint: inherited ScriptManager method)?

Quote:
Originally Posted by divingbluefrog View Post
Yes I do. And I'm almost sure now that it's done via the text entry :
when a clickable zone, or a button is referenced with a text=x line in the Page file,
and it's displayed as string : [x]UPPERCASE in the Item Text zone (last one) of
the menu Editor, it's in fact a call to the Page xyz.ini file.
I think that the link between UPPERCASE name and xyz name is harcoded somewhere, cause I can't find a file giving it.

But there is another feature that bothers me now (I know, the more you learn, the more you discover the extent of your ignorance).
Let me prepare a clear explanation and I will post it soon.
Almost all the pages that have no .py files for them are hard coded in the game. The game code updates all the menu item's text properties, bitmap state, checked state, etc. The problem you are having is you fail to understand how the menu items work (and the inherited methods they have). Examine the .ini files and the inherited ScriptManager methods for the menu items using the ScriptManager edit in game. Your answer lies in the entries for each menu entry and how the inherited ScriptManager methods works with those.

Quote:
Originally Posted by divingbluefrog View Post
In various items description you find a line text=1, which is reported as String : [0001]GO TO GAME in the Item text display.
And of course, when the game is running, it displays the proper name.
And the question is the same as the previous one : How?
I do this same thing with my UIs mod. Once again see above

Last edited by TheDarkWraith; 06-23-13 at 12:10 PM.
TheDarkWraith is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.