Gah - a solution with more questions. – EntropicLqd

Legacy:Scratchpad

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 14:04, 24 October 2002 by Will (Talk) (missed! ;))

Jump to: navigation, search


class MyGUITabPanel extends GUITabPanel;
 
 
 
var string Button1;
 
var float ButtonTop,
          ButtonLeft;
var		float ButtonWidth;
var		float ButtonHeight;
 
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
    Super.Initcomponent(MyController, MyOwner);
    // Button 1
    	Controls[0].WinTop = ButtonTop;
	Controls[0].WinLeft = ButtonLeft;
        Controls[0].WinWidth = ButtonWidth;
        Controls[0].WinHeight = ButtonHeight;
	Controls[0].OnClick = internalOnClick;
    }
}
 
function bool InternalOnClick(GUIComponent Sender)
{
    local MyPlayerController MPC;
    if(Sender==Controls[0]) 
	{
		//Here shoult MyFunction in MyPlayerController (extending xPlayer) be executed!
		MPC=MyPlayerController(PlayerOwner());
		MPC.MyFunction(1);
	}
	return true;
}
 
defaultproperties
{
 
   Begin Object Class=GUIButton name=Button1
      Caption="Button1"
      StyleName="MidGameButton"
   End Object
   Controls(0)=GUIButton'Button1'
 
   ButtonWidth=0.375
   BuyButtonWidth=0.055
   ButtonHeight=0.055
   ButtonTop=0.05
   ButtonLeft=0.025
   bAcceptsInput=false
}
 
put it here

Will: MISSED! ;) I beleive you are looking for ScratchPad (note the capitalisation)