## XIDInterf
Class XIIIMenuDocument

source: C:\XIII\XIDInterf\Classes\XIIIMenuDocument.uc

    Core.Object
       |
       +--GUI.GUI
          |
          +--GUI.GUIComponent
             |
             +--GUI.GUIMultiComponent
                |
                +--GUI.GUIPage
                   |
                   +--XIDInterf.XIIIWindow
                      |
                      +--XIDInterf.XIIIMenuDocument

Direct Known Subclasses:None

class XIIIMenuDocument
extends XIDInterf.XIIIWindow

    //============================================================================
    // Save Game menu.
    //
    //============================================================================

Variables
`Doc11Button,` | `Doc12Button`
`Doc11Label,` | `Doc12Label`
`Doc11bisText,` | `Doc12bisText`
`Emission,` | `Ind`
`i,` | `Index`
`int` | `IsEmpty`
`int` | `MaxSlots`
`Hour,` | `Min`
`int` | `MyLastSlot`
`int` | `MyLastTime`
`int` | `NbMap`
`Doc12Text,` | `NoDocText`
`int` | `ReturnCode`
`int` | `Time`
`int` | `Year`
`sHighlight[12],` | `sOnomatopee[12]`
`tHighlight[12],` | `tOnomatopee[12]`

Function Summary
`void` | `AfterPaint(Canvas C, float X, float Y)`
    //============================================================================
`void` | `Created()`
    //============================================================================
`bool` | `InternalOnClick(GUIComponent Sender)`
    //============================================================================
    // Called when a button is clicked
`bool` | `InternalOnKeyEvent(out byte, out byte, float delta)`
    //============================================================================
`void` | `Paint(Canvas C, float X, float Y)`
    //============================================================================
`void` | `ShowWindow()`
    //============================================================================

Source Code

    00001	//============================================================================
    00002	// Save Game menu.
    00003	//
    00004	//============================================================================
    00005	class XIIIMenuDocument extends XIIIWindow;
    00006
    00007
    00008	var XIIITextureButton Doc1Button, Doc2Button, Doc3Button, Doc4Button, Doc5Button, Doc6Button, Doc7Button, Doc8Button, Doc9Button, Doc10Button, Doc11Button, Doc12Button;
    00009	var XIIILabel Doc1Label, Doc2Label, Doc3Label, Doc4Label, Doc5Label, Doc6Label, Doc7Label, Doc8Label, Doc9Label, Doc10Label, Doc11Label, Doc12Label;
    00010	var  localized string TitleText, Doc1Text, Doc2Text, Doc3Text, Doc4Text, Doc5Text, Doc6Text, Doc7Text, Doc8Text, Doc9Text, Doc10Text, Doc11Text, Doc12Text, NoDocText;
    00011	var  string Doc1bisText, Doc2bisText, Doc3bisText, Doc4bisText, Doc5bisText, Doc6bisText, Doc7bisText, Doc8bisText, Doc9bisText, Doc10bisText, Doc11bisText, Doc12bisText;
    00012
    00013	var texture tBackGround[12], tHighlight[12], tOnomatopee[12];
    00014	var string sBackGround[12], sHighlight[12], sOnomatopee[12];
    00015
    00016	var int MaxSlots;
    00017	var int ReturnCode;
    00018	var int IsEmpty;
    00019	var int i, Index;
    00020	var int Year;
    00021	var byte Month, Day, Hour, Min;
    00022
    00023	var string Description, Emission, Ind;
    00024
    00025	var int Time;
    00026	var int MyLastTime;
    00027	var int MyLastSlot;
    00028	var int NbMap;
    00029
    00030
    00031	//============================================================================
    00032	function Created()
    00033	{
    00034	    local int i;
    00035
    00036	    Super.Created();
    00037
    00038	    for (i=0; i<12; i++)
    00039	    {
    00040	        tHighlight[i] = texture(DynamicLoadObject(sHighlight[i], class'Texture'));
    00041	        tBackGround[i] = texture(DynamicLoadObject(sBackGround[i], class'Texture'));
    00042	    }
    00043	    for (i=0; i<5; i++)
    00044	        tOnomatopee[i] = texture(DynamicLoadObject(sOnomatopee[i], class'Texture'));
    00045
    00046	    Doc1Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 138-40, 80*fScaleTo, 98, 98*fScaleTo));
    00047	    Doc1Button.tFirstTex[0]=tHighlight[0];
    00048	    Doc1Button.tFirstTex[1]=tHighlight[0];
    00049	    Doc1Button.bUseBorder=false;
    00050	    if (NbMap < 3)
    00051	    {
    00052	     Doc1Button.Hint=NoDocText;
    00053	     Doc1Button.tFirstTex[0]=tBackGround[0];
    00054	     Doc1Button.tFirstTex[1]=tBackGround[0];
    00055	    }
    00056	    else
    00057		Doc1bisText=Doc1Text;
    00058
    00059	    Doc2Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 255-40, 80*fScaleTo, 98, 98*fScaleTo));
    00060	    Doc2Button.tFirstTex[0]=tHighlight[1];
    00061	    Doc2Button.tFirstTex[1]=tHighlight[1];
    00062	    Doc2Button.bUseBorder=false;
    00063	    if (NbMap < 4)
    00064	    {
    00065	     Doc2Button.Hint=NoDocText;
    00066	     Doc2Button.tFirstTex[0]=tBackGround[1];
    00067	     Doc2Button.tFirstTex[1]=tBackGround[1];
    00068	    }
    00069	    else
    00070		Doc2bisText=Doc2Text;
    00071
    00072
    00073	    Doc3Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 372-40, 80*fScaleTo, 98, 98*fScaleTo));
    00074	    Doc3Button.tFirstTex[0]=tHighlight[2];
    00075	    Doc3Button.tFirstTex[1]=tHighlight[2];
    00076	    Doc3Button.bUseBorder=false;
    00077	    if (NbMap < 8)
    00078	    {
    00079	     Doc3Button.Hint=NoDocText;
    00080	     Doc3Button.tFirstTex[0]=tBackGround[2];
    00081	     Doc3Button.tFirstTex[1]=tBackGround[2];
    00082	    }
    00083	    else
    00084		Doc3bisText=Doc3Text;
    00085
    00086
    00087
    00088	    Doc4Button = XIIITexturebutton(CreateControl(class'XIIITextureButton', 489-40, 80*fScaleTo, 98, 98*fScaleTo));
    00089	    Doc4Button.tFirstTex[0]=tHighlight[3];
    00090	    Doc4Button.tFirstTex[1]=tHighlight[3];
    00091	    Doc4Button.bUseBorder=false;
    00092	    if (NbMap < 12)
    00093	    {
    00094	     Doc4Button.Hint=NoDocText;
    00095	     Doc4Button.tFirstTex[0]=tBackGround[3];
    00096	     Doc4Button.tFirstTex[1]=tBackGround[3];
    00097	    }
    00098	    else
    00099		Doc4bisText=Doc4Text;
    00100
    00101
    00102
    00103	    Doc5Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 138-40, 192*fScaleTo, 98, 98*fScaleTo));
    00104	    Doc5Button.tFirstTex[0]=tHighlight[4];
    00105	    Doc5Button.tFirstTex[1]=tHighlight[4];
    00106	    Doc5Button.bUseBorder=false;
    00107	    if (NbMap < 14)
    00108	    {
    00109	     Doc5Button.Hint=NoDocText;
    00110	     Doc5Button.tFirstTex[0]=tBackGround[4];
    00111	     Doc5Button.tFirstTex[1]=tBackGround[4];
    00112	    }
    00113	    else
    00114		Doc5bisText=Doc5Text;
    00115
    00116
    00117
    00118
    00119	    Doc6Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 255-40, 192*fScaleTo, 98, 98*fScaleTo));
    00120	    Doc6Button.tFirstTex[0]=tHighlight[5];
    00121	    Doc6Button.tFirstTex[1]=tHighlight[5];
    00122	    Doc6Button.bUseBorder=false;
    00123	    if (NbMap < 18)
    00124	    {
    00125	     Doc6Button.Hint=NoDocText;
    00126	     Doc6Button.tFirstTex[0]=tBackGround[5];
    00127	     Doc6Button.tFirstTex[1]=tBackGround[5];
    00128	    }
    00129	    else
    00130		Doc6bisText=Doc6Text;
    00131
    00132
    00133
    00134	    Doc7Button = XIIITexturebutton(CreateControl(class'XIIITextureButton', 372-40, 192*fScaleTo, 98, 98*fScaleTo));
    00135	    Doc7Button.tFirstTex[0]=tHighlight[6];
    00136	    Doc7Button.tFirstTex[1]=tHighlight[6];
    00137	    Doc7Button.bUseBorder=false;
    00138	    if (NbMap < 22)
    00139	    {
    00140	     Doc7Button.Hint=NoDocText;
    00141	     Doc7Button.tFirstTex[0]=tBackGround[6];
    00142	     Doc7Button.tFirstTex[1]=tBackGround[6];
    00143	    }
    00144	    else
    00145		Doc7bisText=Doc7Text;
    00146
    00147
    00148
    00149	    Doc8Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 489-40, 192*fScaleTo, 98, 98*fScaleTo));
    00150	    Doc8Button.tFirstTex[0]=tHighlight[7];
    00151	    Doc8Button.tFirstTex[1]=tHighlight[7];
    00152	    Doc8Button.bUseBorder=false;
    00153	    if (NbMap < 25)
    00154	    {
    00155	     Doc8Button.Hint=NoDocText;
    00156	     Doc8Button.tFirstTex[0]=tBackGround[7];
    00157	     Doc8Button.tFirstTex[1]=tBackGround[7];
    00158	    }
    00159	    else
    00160		Doc8bisText=Doc8Text;
    00161
    00162
    00163
    00164	    Doc9Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 138-40, 302*fScaleTo, 98, 98*fScaleTo));
    00165	    Doc9Button.tFirstTex[0]=tHighlight[8];
    00166	    Doc9Button.tFirstTex[1]=tHighlight[8];
    00167	    Doc9Button.bUseBorder=false;
    00168	    if (NbMap < 25)
    00169	    {
    00170	     Doc9Button.Hint=NoDocText;
    00171	     Doc9Button.tFirstTex[0]=tBackGround[8];
    00172	     Doc9Button.tFirstTex[1]=tBackGround[8];
    00173	    }
    00174	    else
    00175		Doc9bisText=Doc9Text;
    00176
    00177
    00178
    00179
    00180	    Doc10Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 255-40, 302*fScaleTo, 98, 98*fScaleTo));
    00181	    Doc10Button.tFirstTex[0]=tHighlight[9];
    00182	    Doc10Button.tFirstTex[1]=tHighlight[9];
    00183	    Doc10Button.bUseBorder=false;
    00184	    if (NbMap < 30)
    00185	    {
    00186	     Doc10Button.Hint=NoDocText;
    00187	     Doc10Button.tFirstTex[0]=tBackGround[9];
    00188	     Doc10Button.tFirstTex[1]=tBackGround[9];
    00189	    }
    00190	    else
    00191		Doc10bisText=Doc10Text;
    00192
    00193
    00194
    00195	    Doc11Button = XIIITexturebutton(CreateControl(class'XIIITextureButton', 372-40, 302*fScaleTo, 98, 98*fScaleTo));
    00196	    Doc11Button.tFirstTex[0]=tHighlight[10];
    00197	    Doc11Button.tFirstTex[1]=tHighlight[10];
    00198	    Doc11Button.bUseBorder=false;
    00199	    if (NbMap < 31)
    00200	    {
    00201	     Doc11Button.Hint=NoDocText;
    00202	     Doc11Button.tFirstTex[0]=tBackGround[10];
    00203	     Doc11Button.tFirstTex[1]=tBackGround[10];
    00204	    }
    00205	    else
    00206		Doc11bisText=Doc11Text;
    00207
    00208
    00209	    Doc12Button = XIIITextureButton(CreateControl(class'XIIITextureButton', 489-40, 302*fScaleTo, 98, 93*fScaleTo));
    00210	    Doc12Button.tFirstTex[0]=tHighlight[11];
    00211	    Doc12Button.tFirstTex[1]=tHighlight[11];
    00212	    Doc12Button.bUseBorder=false;
    00213	    if (NbMap < 33)
    00214	    {
    00215	     Doc12Button.Hint=NoDocText;
    00216	     Doc12Button.tFirstTex[0]=tBackGround[11];
    00217	     Doc12Button.tFirstTex[1]=tBackGround[11];
    00218	    }
    00219	    else
    00220		Doc12bisText=Doc12Text;
    00221
    00222
    00223	    Controls[0]=Doc1Button;
    00224	    Controls[1]=Doc2Button;
    00225	    Controls[2]=Doc3Button;
    00226	    Controls[3]=Doc4Button;
    00227	    Controls[4]=Doc5Button;
    00228	    Controls[5]=Doc6Button;
    00229	    Controls[6]=Doc7Button;
    00230	    Controls[7]=Doc8Button;
    00231	    Controls[8]=Doc9Button;
    00232	    Controls[9]=Doc10Button;
    00233	    Controls[10]=Doc11Button;
    00234	    Controls[11]=Doc12Button;
    00235
    00236	if (Doc1BisText != "")
    00237	    InitLabel(Doc1Label, 116-40, 160*fScaleTo, 128, 32*fScaleTo, Doc1bisText);
    00238	if (Doc2BisText != "")
    00239	    InitLabel(Doc2Label, 233-40, 160*fScaleTo, 128, 32*fScaleTo, Doc2bisText);
    00240	if (Doc3BisText != "")
    00241	    InitLabel(Doc3Label, 350-40, 160*fScaleTo, 128, 32*fScaleTo, Doc3bisText);
    00242	if (Doc4BisText != "")
    00243	    InitLabel(Doc4Label, 467-40, 160*fScaleTo, 128, 32*fScaleTo, Doc4bisText);
    00244	if (Doc5BisText != "")
    00245
InitLabel(Doc5Label, 116-40, 266*fScaleTo, 128, 32*fScaleTo, Doc5bisText); 00246 if (Doc6BisText != "") 00247 InitLabel(Doc6Label, 233-40, 266*fScaleTo, 128, 32*fScaleTo, Doc6bisText); 00248 if (Doc7BisText != "") 00249 InitLabel(Doc7Label, 350-40, 266*fScaleTo, 128, 32*fScaleTo, Doc7bisText); 00250 if (Doc8BisText != "") 00251 InitLabel(Doc8Label, 467-40, 266*fScaleTo, 128, 32*fScaleTo, Doc8bisText); 00252 if (Doc9BisText != "") 00253 InitLabel(Doc9Label, 116-40, 372*fScaleTo, 128, 32*fScaleTo, Doc9bisText); 00254 if (Doc10BisText != "") 00255 InitLabel(Doc10Label, 233-40, 372*fScaleTo, 128, 32*fScaleTo, Doc10bisText); 00256 if (Doc11BisText != "") 00257 InitLabel(Doc11Label, 350-40, 372*fScaleTo, 128, 32*fScaleTo, Doc11bisText); 00258 if (Doc12BisText != "") 00259 InitLabel(Doc12Label, 467-40, 372*fScaleTo, 128, 32*fScaleTo, Doc12bisText); 00260 } 00261 00262 00263 //============================================================================ 00264 function ShowWindow() 00265 { 00266 Super.ShowWindow(); 00267 bShowBCK = true; 00268 bShowSEL = true; 00269 } 00270 00271 00272 //============================================================================ 00273 function Paint(Canvas C, float X, float Y) 00274 { 00275 local float fScale, fHeight, W, H; 00276 00277 super.paint(C,X,Y); 00278 00279 // big black border behind documents 00280 C.bUseBorder = true; 00281 DrawStretchedTexture(C, 80*fRatioX, 45*fRatioY, 490*fRatioX, 378*fRatioY*fScaleTo, myRoot.FondMenu); 00282 00283 // image behind title 00284 //DrawStretchedTexture(C, 40*fRatioX, 36*fRatioY, 180*fRatioX, 100*fRatioY, tBackGround[0]); 00285 00286 // Title 00287 C.bUseBorder = true; 00288 DrawStretchedTexture(C, 40*fRatioX, 40*fRatioY*fScaleTo, 160*fRatioX, 32*fRatioY*fScaleTo, myRoot.FondMenu); 00289 C.TextSize(TitleText, W, H); 00290 C.DrawColor = BlackColor; 00291 C.SetPos((40*fRatioX + (160*fRatioX-W)/2), (40*fRatioY+(32*fRatioY-H)/2)*fScaleTo); C.DrawText(TitleText, false); 00292 C.bUseBorder = false; 00293 C.DrawColor = WhiteColor; 00294 00295 } 00296 00297 00298 //============================================================================ 00299 function AfterPaint(Canvas C, float X, float Y) 00300 { 00301 local float zoom; 00302 00303 Super.AfterPaint(C, X, Y); 00304 00305 C.Style = 5; 00306 if (Doc1Button.bDisplayTex) { 00307 zoom = Doc1Button.zoom; 00308 DrawLabel(C, Doc1Label); 00309 } 00310 if (Doc2Button.bDisplayTex) { 00311 zoom = Doc2Button.zoom; 00312 DrawLabel(C, Doc2Label); 00313 } 00314 if (Doc3Button.bDisplayTex) { 00315 zoom = Doc3Button.zoom; 00316 DrawLabel(C, Doc3Label); 00317 } 00318 if (Doc4Button.bDisplayTex) { 00319 zoom = Doc4Button.zoom; 00320 DrawLabel(C, Doc4Label); 00321 } 00322 if (Doc5Button.bDisplayTex){ 00323 zoom = Doc5Button.zoom; 00324 DrawLabel(C, Doc5Label); 00325 } 00326 if (Doc6Button.bDisplayTex) { 00327 zoom = Doc6Button.zoom; 00328 DrawLabel(C, Doc6Label); 00329 } 00330 if (Doc7Button.bDisplayTex) { 00331 zoom = Doc7Button.zoom; 00332 DrawLabel(C, Doc7Label); 00333 } 00334 if (Doc8Button.bDisplayTex){ 00335 zoom = Doc8Button.zoom; 00336 DrawLabel(C, Doc8Label); 00337 } 00338 if (Doc9Button.bDisplayTex){ 00339 zoom = Doc9Button.zoom; 00340 DrawLabel(C, Doc9Label); 00341 } 00342 if (Doc10Button.bDisplayTex) { 00343 zoom = Doc10Button.zoom; 00344 DrawLabel(C, Doc10Label); 00345 } 00346 if (Doc11Button.bDisplayTex) { 00347 zoom = Doc11Button.zoom; 00348 DrawLabel(C, Doc11Label); 00349 } 00350 if (Doc12Button.bDisplayTex){ 00351 zoom = Doc12Button.zoom; 00352 DrawLabel(C, Doc12Label); 00353 } 00354 C.Style = 1; 00355 } 00356 00357 00358 //============================================================================ 00359 // Called when a button is clicked 00360 function bool InternalOnClick(GUIComponent Sender) 00361 { 00362 local int i; 00363 00364 00365 if (Sender == Doc1Button) 00366 { 00367 if (NbMap>2) 00368 { 00369 Index = 0; 00370 Description = 00371 "?Emission="$Emission$ 00372 "?Ind="$Index; 00373 Controller.OpenMenu("XIDInterf.XIIIMenuDoc1",,Description); 00374 } 00375 } 00376 if (Sender == Doc2Button) 00377 { 00378 if (NbMap>3) 00379 { 00380 Index = 1; 00381 Description = 00382 "?Emission="$Emission$ 00383 "?Ind="$Index; 00384 00385 Controller.OpenMenu("XIDInterf.XIIIMenuDoc2",,Description); 00386 } 00387 } 00388 if (Sender == Doc3Button) 00389 { 00390 if (NbMap>7) 00391 { 00392 Index = 2; 00393 Description = 00394 "?Emission="$Emission$ 00395 "?Ind="$Index; 00396 Controller.OpenMenu("XIDInterf.XIIIMenuDoc3",,Description); 00397 } 00398 } 00399 if (Sender == Doc4Button) 00400 { 00401 if (NbMap>=12) 00402 { 00403 Index = 3; 00404 Description = 00405 "?Emission="$Emission$ 00406 "?Ind="$Index; 00407 Controller.OpenMenu("XIDInterf.XIIIMenuDoc4",,Description); 00408 } 00409 } 00410 if (Sender == Doc5Button) 00411 { 00412 if (NbMap>=14) 00413 { 00414 Index = 4; 00415 Description = 00416 "?Emission="$Emission$ 00417 "?Ind="$Index; 00418 Controller.OpenMenu("XIDInterf.XIIIMenuDoc5",,Description); 00419 } 00420 } 00421 if (Sender == Doc6Button) 00422 { 00423 if (NbMap>=18) 00424 { 00425 Index = 5; 00426 Description = 00427 "?Emission="$Emission$ 00428 "?Ind="$Index; 00429 Controller.OpenMenu("XIDInterf.XIIIMenuDoc6",,Description); 00430 } 00431 } 00432 if (Sender == Doc7Button) 00433 { 00434 if (NbMap>=22) 00435 { 00436 Index = 6; 00437 Description = 00438 "?Emission="$Emission$ 00439 "?Ind="$Index; 00440 Controller.OpenMenu("XIDInterf.XIIIMenuDoc7",,Description); 00441 } 00442 } 00443 if (Sender == Doc8Button) 00444 { 00445 if (NbMap>=25) 00446 { 00447 Index = 7; 00448 Description = 00449 "?Emission="$Emission$ 00450 "?Ind="$Index; 00451 Controller.OpenMenu("XIDInterf.XIIIMenuDoc8",,Description); 00452 } 00453 } 00454 if (Sender == Doc9Button) 00455 { 00456 if (NbMap>=25) 00457 { 00458 Index = 8; 00459 Description = 00460 "?Emission="$Emission$ 00461 "?Ind="$Index; 00462 Controller.OpenMenu("XIDInterf.XIIIMenuDoc9",,Description); 00463 } 00464 } 00465 if (Sender == Doc10Button) 00466 { 00467 if (NbMap>=30) 00468 { 00469 Index = 9; 00470 Description = 00471 "?Emission="$Emission$ 00472 "?Ind="$Index; 00473 Controller.OpenMenu("XIDInterf.XIIIMenuDoc10",,Description); 00474 } 00475 } 00476 if (Sender == Doc11Button) 00477 { 00478 if (NbMap>=31) 00479 { 00480 Index = 10; 00481 Description = 00482 "?Emission="$Emission$ 00483 "?Ind="$Index; 00484 Controller.OpenMenu("XIDInterf.XIIIMenuDoc11",,Description); 00485 } 00486 } 00487 if (Sender == Doc12Button) 00488 { 00489 if (NbMap>=33) 00490 { 00491 Index = 11; 00492 Description = 00493 "?Emission="$Emission$ 00494 "?Ind="$Index; 00495 Controller.OpenMenu("XIDInterf.XIIIMenuDoc12",,Description); 00496 } 00497 } 00498 00499 return true; 00500 } 00501 00502 00503 00504 //============================================================================ 00505 function bool InternalOnKeyEvent(out byte Key, out byte State, float delta) 00506 { 00507 local int index; 00508 local bool bLeft, bRight, bUp, bDown; 00509 00510 if (State==1)// IST_Press // to avoid auto-repeat 00511 { 00512 00513 if ((Key==0x0D/*IK_Enter*/) || (Key==0x01)) 00514 { 00515 // Controller.FocusedControl.OnClick(Self); 00516 return InternalOnClick(FocusedControl);//true; 00517 } 00518 00519 if ((Key==0x08/*IK_Escape*/) || (Key==0x1B)) 00520 { 00521 myRoot.CloseMenu(true); 00522 return true; 00523 } 00524 00525 00526 bUp = (Key==0x26); 00527 bDown = (Key==0x28); 00528 bLeft = (Key==0x25); 00529 bRight = (Key==0x27); 00530 00531 // controls are 00532 // 0 1 00533 // 4 00534 // 2 3 00535 if ( bUp || bDown || bLeft || bRight ) 00536 { 00537 index = FindComponentIndex(FocusedControl); 00538 switch (index) 00539 { 00540 case 0 : 00541 if ( bRight ) Controls[1].FocusFirst(Self,false); 00542 if ( bDown) Controls[4].FocusFirst(Self,false); 00543 if ( bLeft ) Controls[3].FocusFirst(Self,false); 00544 if ( bUp ) Controls[8].FocusFirst(Self,false); 00545 break; 00546 case 1 : 00547 if ( bDown ) Controls[5].FocusFirst(Self,false); 00548 if ( bLeft ) Controls[0].FocusFirst(Self,false); 00549 if ( bRight ) Controls[2].FocusFirst(Self,false); 00550 if ( bUp ) Controls[9].FocusFirst(Self,false); 00551 break; 00552 case 2 : 00553 if ( bDown) Controls[6].FocusFirst(Self,false); 00554 if ( bLeft ) Controls[1].FocusFirst(Self,false); 00555 if ( bRight ) Controls[3].FocusFirst(Self,false); 00556 if ( bUp ) Controls[10].FocusFirst(Self,false); 00557 break; 00558 case 3 : 00559 if ( bDown) Controls[7].FocusFirst(Self,false); 00560 if ( bLeft ) Controls[2].FocusFirst(Self,false); 00561 if ( bRight ) Controls[0].FocusFirst(Self,false); 00562 if ( bUp ) Controls[11].FocusFirst(Self,false); 00563 break; 00564 case 4 : 00565 if ( bUp ) Controls[0].FocusFirst(Self,false); 00566 if ( bLeft ) Controls[7].FocusFirst(Self,false); 00567 if ( bRight ) Controls[5].FocusFirst(Self,false); 00568 if ( bDown) Controls[8].FocusFirst(Self,false); 00569 break; 00570 case 5 : 00571 if ( bUp ) Controls[1].FocusFirst(Self,false); 00572 if ( bLeft ) Controls[4].FocusFirst(Self,false); 00573 if ( bRight ) Controls[6].FocusFirst(Self,false); 00574 if ( bDown) Controls[9].FocusFirst(Self,false); 00575 break; 00576 case 6 : 00577 if ( bUp ) Controls[2].FocusFirst(Self,false); 00578 if ( bLeft ) Controls[5].FocusFirst(Self,false); 00579 if ( bRight ) Controls[7].FocusFirst(Self,false); 00580 if ( bDown) Controls[10].FocusFirst(Self,false); 00581 break; 00582 case 7 : 00583 if ( bUp ) Controls[3].FocusFirst(Self,false); 00584 if ( bLeft ) Controls[6].FocusFirst(Self,false); 00585 if ( bRight ) Controls[4].FocusFirst(Self,false); 00586 if ( bDown) Controls[11].FocusFirst(Self,false); 00587 break; 00588 case 8 : 00589 if ( bUp ) Controls[4].FocusFirst(Self,false); 00590 if ( bLeft ) Controls[11].FocusFirst(Self,false); 00591 if ( bRight ) Controls[9].FocusFirst(Self,false); 00592 if ( bDown) Controls[0].FocusFirst(Self,false); 00593 break; 00594 case 9 : 00595 if ( bUp ) Controls[5].FocusFirst(Self,false); 00596 if ( bLeft ) Controls[8].FocusFirst(Self,false); 00597 if ( bRight ) Controls[10].FocusFirst(Self,false); 00598 if ( bDown) Controls[1].FocusFirst(Self,false); 00599 break; 00600 case 10 : 00601 if ( bUp ) Controls[6].FocusFirst(Self,false); 00602 if ( bLeft ) Controls[9].FocusFirst(Self,false); 00603 if ( bRight ) Controls[11].FocusFirst(Self,false); 00604 if ( bDown) Controls[2].FocusFirst(Self,false); 00605 break; 00606 case 11 : 00607 if ( bUp ) Controls[7].FocusFirst(Self,false); 00608 if ( bLeft ) Controls[10].FocusFirst(Self,false); 00609 if ( bRight ) Controls[8].FocusFirst(Self,false); 00610 if ( bDown) Controls[3].FocusFirst(Self,false); 00611 break; 00612 } 00613 return true; 00614 } 00615 } 00616 return super.InternalOnKeyEvent(Key, state, delta); 00617 } 00618 00619 event HandleParameters(string Param1, string Param2) 00620 { 00621 //Description = Param1; 00622 Description = localParseOption(Param1,"Transmitted",""); 00623 log("Param1="$Description); 00624 Index = int(localParseOption(Param1,"Ind","")); 00625 log("button index ="$Index); 00626 if (Description=="Brighton Beach 1") 00627 NbMap=0; 00628 if ((Description=="Brighton Beach 2") || (Description=="Brighton Beach 3")) 00629 NbMap=1; 00630 if ((Description=="Winslow Bank") || (Description=="Winslow Bank 2") || (Description=="Winslow Bank 3")) 00631 NbMap=2; 00632 if ((Description=="FBI") || (Description=="FBI 2") || (Description=="FBI 3")) 00633 NbMap=3; 00634 if ((Description=="Major Jones") || (Description=="Major Jones 1") || (Description=="Major Jones 2") || (Description=="Major Jones 3")) 00635 NbMap=4; 00636 if (Description=="Emerald Base bridge") 00637 NbMap=5; 00638 if (Description=="Emerald Base roof") 00639 NbMap=6; 00640 if ((Description=="Carrington's cell") || (Description=="Carrington's cell 1") || (Description=="Carrington's cell 2") || (Description=="Carrington's cell 3")) 00641 NbMap=7; 00642 if (Description=="Cable car station") 00643 NbMap=8; 00644 if ((Description=="Cable car") || (Description=="Cable car 1")) 00645 NbMap=9; 00646 if ((Description=="Kellownee Lake") || (Description=="Kellownee Lake 1")) 00647 NbMap=10; 00648 if ((Description=="Kellownee hideout") || (Description=="Kellownee hideout 1")) 00649 NbMap=11; 00650 if ((Description=="Plain Rock 1") || (Description=="Plain Rock 2") || (Description=="Plain Rock 3") || (Description=="Plain Rock 4")) 00651 NbMap=12; 00652 if ((Description=="Doc Johansson") || (Description=="Doc Johansson 1")) 00653 NbMap=13; 00654 if ((Description=="Canyon 1") || (Description=="Canyon 2") || (Description=="Canyon 3")) 00655 NbMap=14; 00656 if ((Description=="Canyon 4") || (Description=="Canyon 5") || (Description=="Canyon 6")) 00657 NbMap=15; 00658 if (Description=="Sewage") 00659 NbMap=16; 00660 if ((Description=="SPADS camp 1") || (Description=="SPADS camp 2") || (Description=="SPADS camp 3")) 00661 NbMap=17; 00662 if ((Description=="McCall") || (Description=="McCall 1")) 00663 NbMap=18; 00664 if ((Description=="Submarine base") || (Description=="Submarine base 1")) 00665 NbMap=19; 00666 if ((Description=="Submarine 1") || (Description=="Submarine 2")) 00667 NbMap=20; 00668 if ((Description=="Submarine 3") || (Description=="Submarine 4")) 00669 NbMap=21; 00670 if ((Description=="Sabotage") || (Description=="Sabotage 1")) 00671 NbMap=22; 00672 if ((Description=="Quay 33") || (Description=="Quay 33-1")) 00673 NbMap=23; 00674 if ((Description=="Bristol Suites Hotel") || (Description=="Bristol Suites Hotel 1")) 00675 NbMap=24; 00676 if ((Description=="Sanctuary garden") || (Description=="Sanctuary garden 1")) 00677 NbMap=25; 00678 if ((Description=="Sanctuary hall") || (Description=="Sanctuary hall 1")) 00679 NbMap=26; 00680 if ((Description=="Sanctuary crypt") || (Description=="Sanctuary crypt 1")) 00681 NbMap=27; 00682 if ((Description=="Sanctuary cliff") || (Description=="Sanctuary cliff 1")) 00683 NbMap=28; 00684 if ((Description=="SSH1 base admission") || (Description=="SSH1 base admission 1") || (Description=="SSH1 base admission 2")) 00685 NbMap=29; 00686 if ((Description=="SSH1 trap") || (Description=="SSH1 trap 1")) 00687 NbMap=30; 00688 if (Description=="Total Red") 00689 NbMap=31; 00690 if ((Description=="SSH1 final") || (Description=="SSH1 final 1")) 00691 NbMap=32; 00692 if (Description=="Lady Bee") 00693 NbMap=33; 00694 if (Description=="Bove President") 00695 NbMap=0; 00696 //else 00697 // NbMap=0; 00698 log("NbMap = "$NbMap); 00699 Emission=Description; 00700 //Controls[Index].FocusFirst(Self,false); 00701 Controller.FocusedControl.LoseFocus(None); 00702 Controller.FocusedControl = Controls[Index]; 00703 //SetFocus(Controls[Index]); 00704 log("Index Focus ="$Index); 00705 00706 00707 } 00708 00709 00710 //============================================================================ 00711 00712 00713 defaultproperties 00714 { 00715 TitleText="Documents" 00716 Doc1Text="Document1" 00717 Doc2Text="Document2" 00718 Doc3Text="Document3" 00719 Doc4Text="Document4" 00720 Doc5Text="Document5" 00721 Doc6Text="Document6" 00722 Doc7Text="Document7" 00723 Doc8Text="Document8" 00724 Doc9Text="Document9" 00725 Doc10Text="Document10" 00726 Doc11Text="Document11" 00727 Doc12Text="Document12" 00728 NoDocText="Not available yet" 00729 Doc1bisText="?" 00730 Doc2bisText="?" 00731 Doc3bisText="?" 00732 Doc4bisText="?" 00733 Doc5bisText="?" 00734 Doc6bisText="?" 00735 Doc7bisText="?" 00736 Doc8bisText="?" 00737 Doc9bisText="?" 00738 Doc10bisText="?" 00739 Doc11bisText="?" 00740 Doc12bisText="?" 00741 sBackground(0)="XIIIMenuStart.doc.malettegris" 00742 sBackground(1)="XIIIMenuStart.doc.dossierFBI1gris" 00743 sBackground(2)="XIIIMenuStart.doc.dossierWhiteHouseGRIS" 00744 sBackground(3)="XIIIMenuStart.doc.dossierXVIIGRIS" 00745 sBackground(4)="XIIIMenuStart.doc.dossierXXGRIS" 00746 sBackground(5)="XIIIMenuStart.doc.dossierPentagonGRIS" 00747 sBackground(6)="XIIIMenuStart.doc.dossierVIIGRIS" 00748 sBackground(7)="XIIIMenuStart.doc.dossierIXGRIS" 00749 sBackground(8)="XIIIMenuStart.doc.dossierVGRIS" 00750 sBackground(9)="XIIIMenuStart.doc.dossierIIIGRIS" 00751 sBackground(10)="XIIIMenuStart.doc.dossierIIGRIS" 00752 sBackground(11)="XIIIMenuStart.doc.dossierIGRIS" 00753 sHighlight(0)="XIIIMenuStart.doc.malette" 00754 sHighlight(1)="XIIIMenuStart.doc.dossierFBI1" 00755 sHighlight(2)="XIIIMenuStart.doc.dossierWhiteHouse" 00756 sHighlight(3)="XIIIMenuStart.doc.dossierXVII" 00757 sHighlight(4)="XIIIMenuStart.doc.dossierXX" 00758 sHighlight(5)="XIIIMenuStart.doc.dossierPentagon" 00759 sHighlight(6)="XIIIMenuStart.doc.dossierVII" 00760 sHighlight(7)="XIIIMenuStart.doc.dossierIX" 00761 sHighlight(8)="XIIIMenuStart.doc.dossierV" 00762 sHighlight(9)="XIIIMenuStart.doc.dossierIII" 00763 sHighlight(10)="XIIIMenuStart.doc.dossierII" 00764 sHighlight(11)="XIIIMenuStart.doc.dossierI" 00765 sOnomatopee(0)="XIIIMenuStart.newgameWoowoo" 00766 sOnomatopee(1)="XIIIMenuStart.multiplayerBam" 00767 sOnomatopee(2)="XIIIMenuStart.optionBrrrr" 00768 sOnomatopee(3)="XIIIMenuStart.loadgameSlam" 00769 sOnomatopee(4)="XIIIMenuStart.bang" 00770 }

End Source Code