XIDInterf
Class XIIIMenuItemsIngame

source: C:\XIII\XIDInterf\Classes\XIIIMenuItemsIngame.uc
Core.Object
   |
   +--GUI.GUI
      |
      +--GUI.GUIComponent
         |
         +--GUI.GUIMultiComponent
            |
            +--GUI.GUIPage
               |
               +--XIDInterf.XIIIWindow
                  |
                  +--XIDInterf.XIIIMenuItemsIngame
Direct Known Subclasses:None

class XIIIMenuItemsIngame
extends XIDInterf.XIIIWindow

//============================================================================ // Items light ingame menu. // //============================================================================
Variables
 string TitleText


Function Summary
 void Created()
 bool InternalOnKeyEvent(out byte, out byte, float delta)
 void Paint(Canvas C, float X, float Y)



Source Code


00001	//============================================================================
00002	// Items light ingame menu.
00003	//
00004	//============================================================================
00005	class XIIIMenuItemsIngame extends XIIIWindow;
00006	
00007	var localized string TitleText;
00008	
00009	function Created()
00010	{
00011	    local int i;
00012	
00013	    Super.Created();
00014	
00015	    bShowBCK = true;
00016	    bShowSEL = true;
00017	
00018	}
00019	
00020	function Paint(Canvas C, float X, float Y)
00021	{
00022	    local float W, H;
00023	    local int i;
00024	
00025	    Super.Paint(C,X,Y);
00026	
00027	    // main design
00028	    if (!myRoot.GetLevel().bCineFrame)
00029		{
00030			C.DrawMsgboxBackground(false, 120*fRatioX, 50*fRatioY*fScaleTo, 10, 10, 420*fRatioX, 350*fRatioY*fScaleTo);
00031		}
00032	    else
00033	    {
00034			C.DrawMsgboxBackground(false, 0.09*C.ClipX*fRatioX, 0.2*C.ClipY*fRatioY*fScaleTo, 10, 10, 0.82*C.ClipX*fRatioX, 0.6*C.ClipY*fRatioY*fScaleTo);
00035	    }
00036	
00037	    // page title
00038	    C.bUseBorder = true;
00039	    C.DrawColor = WhiteColor;
00040	    C.TextSize(Caps(TitleText), W, H);
00041	    DrawStretchedTexture(C, 80, 110*fRatioY, (W+40)*fRatioX, 40*fScaleTo*fRatioY, myRoot.FondMenu);
00042	    C.DrawColor = BlackColor;
00043	    C.SetPos(90*fRatioX, (125*fScaleTo*fRatioY)-H/2);
00044	    C.DrawText(Caps(TitleText), false);
00045	    
00046	    // restore old param
00047		C.DrawColor = WhiteColor;
00048	    C.DrawColor.A = 255; C.Style = 1; C.bUseBorder = false;
00049	}
00050	
00051	function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
00052	{
00053	    if (State==1)// IST_Press // to avoid auto-repeat
00054	    {
00055	        if ((Key==0x0D/*IK_Enter*/) || (Key==0x01)/*IK_LeftMouse*/)
00056		    {
00057		        myRoot.CloseMenu(true);
00058	            return true;
00059		    }
00060		    else if ((Key==0x08/*IK_Backspace*/)|| (Key==0x1B) /*IK_Escape*/)
00061		    {
00062		        myRoot.CloseMenu(true);
00063	    	    return true;
00064		    }
00065	    }
00066	    return super.InternalOnKeyEvent(Key, state, delta);
00067	}
00068	
00069	
00070	
00071	defaultproperties
00072	{
00073	     TitleText="temp page - Items ingame"
00074	     bForceHelp=True
00075	     Background=None
00076	}

End Source Code