View Single Post
Old 10-06-09, 10:06 AM   #71
karamazovnew
The Old Man
 
Join Date: Mar 2009
Location: Bucharest, Romania
Posts: 1,403
Downloads: 151
Uploads: 0


Default

Thanks Tomi, it's not that much work but I need to be veery careful on each step.

Now here's a question: has anyone managed to create a working button in the Periscope screens? Here's what I've found so far.
I've stated multiple times before that the commands.cfg files no longer links commands to interface items. I was wrong. That file works exactly the same as in SH3. In both, you can only link commands to items in the layout page (G3F). For example:

[Cmd194]
Name=Periscope_depth
Ctxt=1
MnID=0x3F050009
Str=1032
Key0=0x50,C,"P"

I have managed to make a working button in the layout page by simply copying a working button (the unused pause button). In red is the neccesary part for receiving the command and in green are "useless" parts. As you can see there's no need for BmpState or other lines that were used for BmpArrays(dials). From what I just tested, any other combination, any other type of item will no longer accept commands from the cfg file.
[G3F I412]
Name=Pause
Type=1032;Button
ItemID=0x3F030FFF
ParentID=0x3F000000
Pos=309,0,100,100
Zone= 309 768 100 100 1 1 0x3F000000 1 0 0x3F030FFF 0 0 0 0
Color=0xFFFFFF32
Materials=4
Display=2;Linear
Mat 0=data/menu/gui/layout/bkgr.tga
Mat 1=data/menu/gui/layout/bkgr.tga
Mat 2=data/menu/gui/layout/bkgr.tga
Mat 3=data/menu/gui/layout/bkgr.tga
MatFlags=0x1
TexFmt=0x0
Font=4
Text=2708
TextFlags=0x1
StatesColors=0xB0B0B0FF, 0xAAAAAAFF, 0xFFFFFFFF, 0xFFFF00FF
ToolTipText=2210
ToolTipBox=0x3F01000E, 0x0


So I've tried to parent the item to the notepad. But the game screamed at me that it can't find that id. So then I tried to just use the notepad as a position parent. That screwed the position, I can't seem to place any item above the middle of the screen and of course, the button doesn't move with the TDC (notepad). I've placed the item in the periscope page (but kept it's id), the button is placed correctly but it doesn't recieve the command. So... case closed. Yes I can mimic what OLC did and put the Autoupdate button in the layout page, but it will be easier to just make an Order button in the Periscope Page of the Order Bar. Too bad the only reminder that the autoupdate is on/off will be the clicking sounds when you move the periscope (and the order button itself).

Last edited by karamazovnew; 10-06-09 at 11:34 AM.
karamazovnew is offline   Reply With Quote